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

Import Markup from markupsafe (future deprecation) #71

Merged
merged 1 commit into from
Apr 29, 2021
Merged

Import Markup from markupsafe (future deprecation) #71

merged 1 commit into from
Apr 29, 2021

Conversation

ziddey
Copy link
Contributor

@ziddey ziddey commented Apr 24, 2021

Noticed this while testing the current flask2 rc suite. Note there's a bug in the current rc preventing jinja2.Markup from working. A fix has been committed already.

Instead, Markup should be imported from markupsafe. I checked and this has been possible for many years now (jinja 2.9.x branch from 2y ago imports from here already).

Note jinja 3.0.0 will emit a deprecation warning, with removal in 3.1, so a whiles away for sure. Nonetheless, it should be a backwards-compatible change, so there shouldn't be any issue changing it now.

Noticed this while testing the current flask2 rc suite. Note there's a bug in the current rc preventing `jinja2.Markup` from working. A fix has been committed already.

Instead, `Markup` should be imported from `markupsafe`. I checked and this has been possible for many years now (jinja 2.9.x branch from 2y ago imports from here already).

Note jinja 3.0.0 will emit a deprecation warning, with removal in 3.1, so a whiles away for sure. Nonetheless, it should be a backwards-compatible change, so there shouldn't be any issue changing it now.
@miguelgrinberg miguelgrinberg merged commit b1c48c4 into miguelgrinberg:master Apr 29, 2021
@ziddey ziddey deleted the patch-1 branch April 29, 2021 23:20
@tryhubov tryhubov mentioned this pull request May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants