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

Deprecated and internal werkzeug calls, prevents use on python 3.12 #256

Open
applebee1558 opened this issue Oct 29, 2024 · 3 comments
Open

Comments

@applebee1558
Copy link

There are tons of calls to internal Werkzeug APIs and it prevents use with any newer versions of werkzeug.

@buhman
Copy link
Member

buhman commented Oct 31, 2024

bilbo@localhost ~/pb $ env/bin/python --version
Python 3.12.7
bilbo@localhost ~/pb $ env/bin/python -m pb
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/bilbo/pb/pb/__main__.py", line 29, in <module>
    from werkzeug.serving import run_simple
  File "/home/bilbo/pb/env/lib/python3.12/site-packages/werkzeug/__init__.py", line 151, in <module>
    __import__('werkzeug.exceptions')
  File "/home/bilbo/pb/env/lib/python3.12/site-packages/werkzeug/exceptions.py", line 71, in <module>
    from werkzeug.wrappers import Response
  File "/home/bilbo/pb/env/lib/python3.12/site-packages/werkzeug/wrappers.py", line 27, in <module>
    from werkzeug.http import HTTP_STATUS_CODES, \
  File "/home/bilbo/pb/env/lib/python3.12/site-packages/werkzeug/http.py", line 1148, in <module>
    from werkzeug.datastructures import Accept, HeaderSet, ETags, Authorization, \
  File "/home/bilbo/pb/env/lib/python3.12/site-packages/werkzeug/datastructures.py", line 16, in <module>
    from collections import Container, Iterable, MutableSet
ImportError: cannot import name 'Container' from 'collections' (/usr/lib/python3.12/collections/__init__.py)

It seems Werkzeug is importing from collections, but it should be importing from collections.abc.

@buhman
Copy link
Member

buhman commented Oct 31, 2024

The next issue, urllib3 is broken:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/bilbo/pb/env/lib/python3.12/site-packages/urllib3/__init__.py", line 8, in <module>
    from .connectionpool import (
  File "/home/bilbo/pb/env/lib/python3.12/site-packages/urllib3/connectionpool.py", line 11, in <module>
    from .exceptions import (
  File "/home/bilbo/pb/env/lib/python3.12/site-packages/urllib3/exceptions.py", line 2, in <module>
    from .packages.six.moves.http_client import (
ModuleNotFoundError: No module named 'urllib3.packages.six.moves'

@buhman
Copy link
Member

buhman commented Oct 31, 2024

@applebee1558 does a885f8a work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants