incompatible with werkzeug 2.2.0, can't import parse_rule
See original GitHub issueImporting flask-login with werkzeug 2.2.0a1 ends up with:
Traceback:
/usr/lib64/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_packager_dashboard_pagure.py:4: in <module>
from oraculum.utils import pagure
oraculum/__init__.py:29: in <module>
from flask_login import LoginManager
/usr/lib/python3.11/site-packages/flask_login/__init__.py:12: in <module>
from .login_manager import LoginManager
/usr/lib/python3.11/site-packages/flask_login/login_manager.py:35: in <module>
from .utils import _create_identifier
/usr/lib/python3.11/site-packages/flask_login/utils.py:14: in <module>
from werkzeug.routing import parse_rule
E ImportError: cannot import name 'parse_rule' from 'werkzeug.routing' (/usr/lib/python3.11/site-packages/werkzeug/routing/__init__.py)
Issue Analytics
- State:
- Created a year ago
- Reactions:15
- Comments:11
Top Results From Across the Web
ImportError: cannot import name 'parse_rule' from 'werkzeug ...
The latest version of Flask requires Werkzeug >= 2.2.0 but Flask v2.1.2 requires Werkzeug >= 2.0 . Therefore Werkzeug was downgraded to v2.1.2...
Read more >Changes — Werkzeug Documentation (2.2.x)
Update subpackage imports in werkzeug.routing to use the import as syntax for explicitly ... If parse_authorization_header can't decode the header value, ...
Read more >Cannot import name 'parse_rule' from 'werkzeug.routing'
To solve the error, pin the werkzeug module to version 2.1.2 . importerror cannot import name parse rule from werkzeug routing. shell.
Read more >8.5 Release Notes Red Hat Enterprise Linux 8
For more information on unsupported conversions, see How to perform an unsupported ... Improved the import and export of secure key objects in...
Read more >Werkzeug Documentation (0.15.x) - Read the Docs
Werkzeug originally had a magical import system hook that enabled ... input stream is set you can't modify args and files unless you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m trying to figure out what that code does in the first place. I think it’s trying to say “if there’s a dynamic subdomain or host matching in the current rule, apply that same argument to the login rule.” But there’s surely a better way to go about that.
https://github.com/maxcountryman/flask-login/blob/62c04f482c3fb145c9f69054a799d4c55a9ef659/src/flask_login/utils.py#L95-L110
https://pypi.org/project/Flask-Login/0.6.2/