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

webapp init error with flask 2.2.4: from flask import Markup fails #1173

Closed
jgehrcke opened this issue Apr 25, 2023 · 3 comments
Closed

webapp init error with flask 2.2.4: from flask import Markup fails #1173

jgehrcke opened this issue Apr 25, 2023 · 3 comments
Labels
bug behavior violates specification

Comments

@jgehrcke
Copy link
Member

just seen in CI:

[230425-19:09:00.982] [1] [conbench.db] INFO: psycopg2.__libpq_version__: 130009
[230425-19:09:01.356] [1] [conbench.entities.commit] INFO: GITHUB_API_TOKEN env is set, length of data: 81
[230425-19:09:01.356] [1] [conbench.entities.commit] INFO: configured GitHub HTTP API authentication token pool: ghp_i7..., ghp_l3...
[230425-19:09:01.356] [1] [conbench.entities.commit] INFO: current auth token has length 40 and starts with: ghp_i7
[230425-19:09:01.715] [1] [conbench.buildinfo] INFO: decoded build info JSON: {'branch_name': '1172/merge', 'version_string': '3ec02638a-dev', 'commit': '3ec02638a1026b561153ba2343ef99affd194149', 'build_time_rfc3339': '2023-04-25 19:07:37Z', 'build_hostname': 'fv-az561-661'}
ImportError while loading conftest '/app/conbench/tests/conftest.py'.
conbench/__init__.py:261: in <module>
    application = create_application(Config)
conbench/__init__.py:56: in create_application
    _init_flask_application(app)
conbench/__init__.py:107: in _init_flask_application
    from .app import app as blueprint_app
conbench/app/__init__.py:9: in <module>
    from .auth import *  # noqa
conbench/app/auth.py:7: in <module>
    import flask_wtf
/usr/local/lib/python3.11/site-packages/flask_wtf/__init__.py:4: in <module>
    from .recaptcha import Recaptcha
/usr/local/lib/python3.11/site-packages/flask_wtf/recaptcha/__init__.py:1: in <module>
    from .fields import RecaptchaField
/usr/local/lib/python3.11/site-packages/flask_wtf/recaptcha/fields.py:3: in <module>
    from . import widgets
/usr/local/lib/python3.11/site-packages/flask_wtf/recaptcha/widgets.py:2: in <module>
    from flask import Markup
E   ImportError: cannot import name 'Markup' from 'flask' (/usr/local/lib/python3.11/site-packages/flask/__init__.py)
make: *** [Makefile:34: tests] Error 4
Error: Process completed with exit code 2.

Indeed, a new version was released today:

Version 2.2.4
Released 2023-04-25
Update for compatibility with Werkzeug 2.3.

Let's pin to 2.2.3 for now.

@jgehrcke
Copy link
Member Author

jgehrcke commented Apr 25, 2023

Let the storm begin: pallets/flask#5084 🌪️

@davidism
Copy link

davidism commented Apr 26, 2023

This was fixed in Flask 2.3.1, although it will still be removed in Flask 2.4. It's also been reported to Flask-WTF which will release a fix to be compatible.

@jgehrcke
Copy link
Member Author

Thanks for the lovely work on Flask @davidism -- I saw yesterday that you had quite a bit of release work to do and that you responded super quickly to this problem! Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug behavior violates specification
Projects
None yet
Development

No branches or pull requests

2 participants