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

Web UI: flask and werkzeug library version mismatch #1233

Closed
rdmark opened this issue Oct 2, 2023 · 2 comments
Closed

Web UI: flask and werkzeug library version mismatch #1233

rdmark opened this issue Oct 2, 2023 · 2 comments
Assignees

Comments

@rdmark
Copy link
Member

rdmark commented Oct 2, 2023

We've fixed the Flask library version to 2.2.2 but when pip resolves requirements on Ubuntu 22.04 we get werkzeug 3.0.0 which is incompatible with Flask 2.x.

Using werkzeug 2.2.3 fixes the problem (the final Flask 2.2 compatible version.)

https://flask.palletsprojects.com/en/3.0.x/changes/
https://werkzeug.palletsprojects.com/en/3.0.x/changes/

As a side note, Flask 3 and werkzeug 2.3 makes some major API changes, including deprecating werkzeug.urls (need to use urllib instead) and dropping support for Python 3.7.

@rdmark
Copy link
Member Author

rdmark commented Oct 2, 2023

Hotfix in #1234

@rdmark
Copy link
Member Author

rdmark commented Oct 2, 2023

Additionally, if bumping to Flask 3 we have to bump to flask-babel 4 as well. They are all interdependent, with the common goal of dropping support for Python 3.7.

However the flask-babel API has changed so it's not as easy as just bumping the lib version. At least the method to initialize the Babel app has changed from Babel(app) to babel.init_app(app, locale_selector=get_locale) while the @babel.localeselector decorator isn't used anymore.

https://stackoverflow.com/questions/75270265/attributeerror-babel-object-has-no-attribute-localeselector

@rdmark rdmark self-assigned this Oct 22, 2023
@rdmark rdmark closed this as completed Oct 24, 2023
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

No branches or pull requests

1 participant