Adopt to new python-werkzeug 3.0 API

Bug #2048769 reported by Lukas Märdian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
flask (Ubuntu)
Fix Released
Undecided
Unassigned
flask-dance (Ubuntu)
Fix Released
Undecided
Lukas Märdian
flask-login (Ubuntu)
Fix Released
Undecided
Lukas Märdian
lektor (Ubuntu)
Fix Released
Undecided
Pushkar Kulkarni
onionshare (Ubuntu)
Fix Released
Undecided
Pushkar Kulkarni
python-werkzeug (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Python-werkzeug 3.0 was syncronized from Debian experimental.

The 3.x track is not API compatible with the 2.x track:
https://werkzeug.palletsprojects.com/en/3.0.x/urls/
https://werkzeug.palletsprojects.com/en/2.3.x/urls/

Especially the werkzeug.urls.url_decode method is gone, which leads to import failures like this:

==================================== ERRORS ====================================
_____________ ERROR collecting tests/consumer/storage/test_sqla.py _____________
ImportError while importing test module '/<<PKGBUILDDIR>>/tests/consumer/storage/test_sqla.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/consumer/storage/test_sqla.py:10: in <module>
    from flask_login import (
/usr/lib/python3/dist-packages/flask_login/__init__.py:12: in <module>
    from .login_manager import LoginManager
/usr/lib/python3/dist-packages/flask_login/login_manager.py:33: in <module>
    from .utils import _create_identifier
/usr/lib/python3/dist-packages/flask_login/utils.py:14: in <module>
    from werkzeug.urls import url_decode
E ImportError: cannot import name 'url_decode' from 'werkzeug.urls' (/usr/lib/python3/dist-packages/werkzeug/urls.py)

Related branches

Revision history for this message
Lukas Märdian (slyon) wrote :

python-werkzeug 3.x from experimental was a dependency to get flask to be Python 3.12 compatible.

Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

flask-dance should be fixed in 7.0.1 (which FTBFS): https://github.com/singingwolfboy/flask-dance/pull/426

But it depends on the flask-login FTBFS to be fixed first.

Lukas Märdian (slyon)
no longer affects: pytest-httpserver (Ubuntu)
Lukas Märdian (slyon)
Changed in python-werkzeug (Ubuntu):
assignee: nobody → Lukas Märdian (slyon)
Changed in flask-login (Ubuntu):
assignee: nobody → Lukas Märdian (slyon)
Changed in flask-dance (Ubuntu):
assignee: nobody → Lukas Märdian (slyon)
Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

https://launchpad.net/ubuntu/+source/flask-login/0.6.3-1ubuntu1 (This should probably also unlock flask-dance)

Changed in flask-login (Ubuntu):
status: New → Fix Committed
Changed in python-werkzeug (Ubuntu):
status: New → Invalid
status: Invalid → New
Revision history for this message
Lukas Märdian (slyon) wrote :
Changed in flask-dance (Ubuntu):
status: New → Fix Released
Changed in flask-login (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

Lektor, see https://github.com/lektor/lektor/pull/1172 (to be fixed in lektor v3.4)

We need to drop the "python-werkzeug < 3" dependency definition in debian/control to fix the installability. And get the required changes land in lektor codebase to make it actually work with that new version of werkzeug3.

Lukas Märdian (slyon)
Changed in python-werkzeug (Ubuntu):
assignee: Lukas Märdian (slyon) → nobody
Changed in lektor (Ubuntu):
assignee: nobody → Pushkar Kulkarni (pushkarnk)
Changed in onionshare (Ubuntu):
assignee: nobody → Pushkar Kulkarni (pushkarnk)
Changed in lektor (Ubuntu):
status: New → In Progress
Changed in onionshare (Ubuntu):
status: New → In Progress
Revision history for this message
Julian Andres Klode (juliank) wrote :

Unsubscribing Ubuntu sponsors as there are no debdiffs here - and the merges have their own ubuntu sponsors assignee

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :
Revision history for this message
Jeremy Bícha (jbicha) wrote :

I'm adding a flask task so that this shows on the excuses report. Feel free to close the task when this transition is done.

Changed in flask (Ubuntu):
status: New → Triaged
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Debian MRs for onionshare and lektor were merged and the Ubuntu packages synced from Debian.

Changed in lektor (Ubuntu):
status: In Progress → Fix Released
Changed in onionshare (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Transitioned to main.

Changed in python-werkzeug (Ubuntu):
status: New → Fix Released
Changed in flask (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.