pallets-eco / flask-debugtoolbar

A toolbar overlay for debugging Flask applications
https://flask-debugtoolbar.readthedocs.io
BSD 3-Clause "New" or "Revised" License
953 stars 146 forks source link

Breaks with Flask 2.3.0 (okay with 2.3.1) #202

Closed macnewbold closed 1 year ago

macnewbold commented 1 year ago

Turns out that Flask 2.3.0 deprecates importing Markup or escape from flask, instead preferring to get them from markupsafe directly. But 2.3.0 broke it completely instead of just deprecating it, then 2.3.1 has the fix for that. In any case, it would be great to get flask-debugtoolbar compatible with the deprecation sometime soon.


  File "...\app.py", line 17, in <module>
    from flask_debugtoolbar import DebugToolbarExtension
  File "...\venv\lib\site-packages\flask_debugtoolbar\__init__.py", line 12, in <module>
    from flask_debugtoolbar.utils import decode_text, gzip_compress, gzip_decompress
  File "...\venv\lib\site-packages\flask_debugtoolbar\utils.py", line 23, in <module>
    from flask import current_app, Markup
ImportError: cannot import name 'Markup' from 'flask' (...\venv\lib\site-packages\flask\__init__.py)```
davidism commented 1 year ago

Flask 2.3.1 is available on PyPI.