Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Flask 2.0+ deprecation warning related to using jinja2.Markup, now it uses markupsafe.Markup #434

Merged
merged 1 commit into from
May 19, 2021
Merged

Fix Flask 2.0+ deprecation warning related to using jinja2.Markup, now it uses markupsafe.Markup #434

merged 1 commit into from
May 19, 2021

Conversation

nickjj
Copy link
Contributor

@nickjj nickjj commented May 12, 2021

Hi,

I recently updated a project to use Flask 2.0 which came with Jinja 3.0 as a dependency.

After doing that upgrade I started to get this warning from Flask-WTF:

python3.9/site-packages/flask_wtf/form.py:133: DeprecationWarning: 'jinja2.Markup' is deprecated
and will be removed in Jinja 3.1. Import 'markupsafe.Markup' instead.
    return Markup(

This PR takes that advice and imports Markup from markupsafe instead of jinja2.

@davidism davidism added this to the v0.15 milestone May 12, 2021
@nickjj
Copy link
Contributor Author

nickjj commented May 12, 2021

The CI failure looks maybe unrelated to this PR, any guidance on how to make it pass?

@greyli
Copy link
Member

greyli commented May 12, 2021

The CI failure looks maybe unrelated to this PR

It seems related to sphinx-doc/sphinx#9216.

@jugmac00
Copy link
Contributor

I created #437 as a temporary fix for building the docs.

@azmeuk azmeuk merged commit 91f592e into pallets-eco:master May 19, 2021
@azmeuk
Copy link
Member

azmeuk commented May 19, 2021

Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants