maxcountryman/flask-login

ImportError for 'url_decode' from 'werkzeug.urls' in Flask-Login

Closed this issue · 1 comments

Describe the bug
When using Flask-Login alongside Werkzeug, an ImportError is encountered when trying to import url_decode from werkzeug.urls. The error message is as follows: ImportError: cannot import name 'url_decode' from 'werkzeug.urls'.

To Reproduce
Steps to reproduce the behavior:

  1. Install Flask-Login and a version of Werkzeug where url_decode is not present or has been moved.
  2. Attempt to run a Flask app that imports and uses Flask-Login.
  3. See the ImportError regarding url_decode in the terminal.

Expected behavior
The Flask application should run without encountering an ImportError, and Flask-Login should be able to utilize url_decode from Werkzeug without issues.

Screenshots
If you have screenshots of the error trace, you may add them here.

Desktop (please complete the following information):

  • OS: Linux
  • Python Version: 3.9.16
  • Werkzeug Version: 3.0.0
  • Flask-Login Version: 0.6.2

Smartphone (please complete the following information):
If applicable, otherwise you might remove this section.

Additional context
This issue is related to specific versions of Werkzeug 3.0 where url_decode and url_encodehas been moved or refactored from the module from werkzeug.urls.

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