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

werkzeug 3.0.0 Import issue with url_quote #2789

Closed
mababio opened this issue Oct 2, 2023 · 3 comments
Closed

werkzeug 3.0.0 Import issue with url_quote #2789

mababio opened this issue Oct 2, 2023 · 3 comments

Comments

@mababio
Copy link

mababio commented Oct 2, 2023

This issue tracker is a tool to address bugs in Werkzeug itself. Please
use Pallets Discord or Stack Overflow for questions about your own code.

Getting this error message when on 3.0.0:
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.11/site-packages/werkzeug/urls.py)
Not getting this issue with version before 3.0.0

Describe how to replicate the bug.
Create a Dockerfile with

FROM python RUN pip install Flask==2.2.2 RUN pip install Werkzeug==3.0.0 RUN echo "from flask import Flask" >> app.py CMD python app.py

No issue at all is the expect output

Environment:

  • Python version: 3.11.5
  • Werkzeug version:3.0.0
@mababio
Copy link
Author

mababio commented Oct 2, 2023

NVM I think this new version of werkzeug (3.0.0) is not compatible with flask 2.2.2. url_quote was removed from werkzeug==3.0.0 but flask==2.2.2 is referring to it.

@davidism
Copy link
Member

davidism commented Oct 2, 2023

You are using an unsupported version of Flask, please update to the latest version 3 if possible. 2.3 is also compatible.

When writing an application, you must use a tool like pip-tools to pin your application's full dependency tree. This gives you reproducible deployments, allowing you to control when you get updates. Be sure to run your tests with deprecation warnings treated as errors so that you get notified of those types of changes early.

Please review any of the following for more information:

@davidism davidism closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2023
@mababio
Copy link
Author

mababio commented Oct 2, 2023

Thanks! This was a leaning listen

@pallets pallets deleted a comment from russiantech Oct 16, 2023
@pallets pallets deleted a comment from ThiefMaster Oct 16, 2023
@pallets pallets deleted a comment from russiantech Oct 16, 2023
@pallets pallets deleted a comment from ThiefMaster Oct 16, 2023
@pallets pallets locked and limited conversation to collaborators Oct 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants