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

Cannot import Markup from flask #5084

Closed
lucaswerkmeister opened this issue Apr 25, 2023 · 2 comments · Fixed by #5085
Closed

Cannot import Markup from flask #5084

lucaswerkmeister opened this issue Apr 25, 2023 · 2 comments · Fixed by #5085
Milestone

Comments

@lucaswerkmeister
Copy link
Contributor

lucaswerkmeister commented Apr 25, 2023

from flask import Markup and flask.Markup both don’t work. This is merely supposed to be deprecated, not broken, in Flask 2.3.0.

Example A:

import flask

print(flask.Markup('hi'))
Traceback (most recent call last):
  File "/tmp/flask230/1.py", line 3, in <module>
    print(flask.Markup('hi'))
  File "/tmp/flask230/venv/lib/python3.10/site-packages/flask/__init__.py", line 102, in __getattr__
    raise AttributeError(name)
AttributeError: Markup

Example B:

from flask import Markup

print(Markup('hi'))
Traceback (most recent call last):
  File "/tmp/flask230/2.py", line 1, in <module>
    from flask import Markup
ImportError: cannot import name 'Markup' from 'flask' (/tmp/flask230/venv/lib/python3.10/site-packages/flask/__init__.py)

Environment:

  • Python version: 3.10.10
  • Flask version: 2.3.0
@davidism
Copy link
Member

PyPI's upload API is down at the moment, I will retry the release later.

@pallets pallets locked and limited conversation to collaborators Apr 25, 2023
@davidism
Copy link
Member

Flask 2.3.1 is now available on PyPI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants