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

ImportError: cannot import name 'url_decode' from 'werkzeug.urls' after upgrading werkzeug to 3.0.0 #803

Closed
globau opened this issue Oct 17, 2023 · 2 comments

Comments

@globau
Copy link

globau commented Oct 17, 2023

flask-login no long works after upgrading to werkzeug 3.0.0

Traceback (most recent call last):
  File "src/web.py", line 8, in <module>
    import auth
  File "src/auth.py", line 5, in <module>
    import flask_login
  File "venv/lib/python3.11/site-packages/flask_login/__init__.py", line 12, in <module>
    from .login_manager import LoginManager
  File "venv/lib/python3.11/site-packages/flask_login/login_manager.py", line 33, in <module>
    from .utils import _create_identifier
  File "venv/lib/python3.11/site-packages/flask_login/utils.py", line 14, in <module>
    from werkzeug.urls import url_decode
ImportError: cannot import name 'url_decode' from 'werkzeug.urls' (venv/lib/python3.11/site-packages/werkzeug/urls.py)

As per https://werkzeug.palletsprojects.com/en/3.0.x/changes/, deprecated features were removed via pallets/werkzeug#2768
This includes:

Remove our copy of urllib.parse from our urls module, in favor of using the built-in module directly

url.py was deprecated in werkzeug 2.3.0 via pallets/werkzeug@d4ddff6

@globau
Copy link
Author

globau commented Oct 17, 2023

Oops, looks like this is a duplicate of #744, which doesn't appear to be in a release yet.

@globau globau closed this as completed Oct 17, 2023
@davidism
Copy link
Collaborator

Duplicate of #744, fixed by #746. A volunteer maintainer will work on making a release when they have time available.

Repository owner locked and limited conversation to collaborators Oct 27, 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