pb
pb copied to clipboard
Deprecated and internal werkzeug calls, prevents use on python 3.12
There are tons of calls to internal Werkzeug APIs and it prevents use with any newer versions of werkzeug.
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.
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'
@applebee1558 does a885f8a work for you?