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

add Werkzeug version constraint to requirements #109

Merged
merged 1 commit into from May 19, 2024

Conversation

doctorcolossus
Copy link
Contributor

@doctorcolossus doctorcolossus commented Oct 19, 2023

brotab's mediator failed to run for me on Ubuntu 20.04 due to the following error:
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.8/dist-packages/werkzeug/urls.py) in mediator/brotab_mediator.py.

This occurs with Werkzeug >= 3.0. Flask 2.0.2's should therefore specify Werkzeug < 3.0, but specifies only Werkzeug >= 2.0. Unless and until this is fixed upstream, clients of Flask 2.0.2 must specify Werkzeug < 3.0 themselves to avoid this error.

Werkzeug >= 3.0 causes `ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.8/dist-packages/werkzeug/urls.py)` in `mediator/brotab_mediator.py`. Flask 2.0.2's requirements specify only Werkzeug >= 2.0 but should also specify Werkzeug < 3.0. Unless and until this is fixed upstream, clients of Flask 2.0.2 must specify Werkzeug < 3.0 themselves to avoid this error.
@mcint
Copy link

mcint commented Apr 18, 2024

Sharing here since this will be relevant until this PR is merged.

If brotab is installed via pipx, you can just run this:

. ~/.local/pipx/venvs/brotab/bin/activate

test $(pip list | awk '/Werkzeug/{ print $2 }' | cut -d. -f1) == 3 \
  && { pip uninstall werkzeug; pip install 'werkzeug<3'; echo updated; } \
  || echo already ok;

Affecting #105, #37, #80, reply #43 (comment), mainly included already.

@balta2ar balta2ar merged commit 6f2ab29 into balta2ar:master May 19, 2024
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.

None yet

3 participants