-
-
Notifications
You must be signed in to change notification settings - Fork 133
Closed
Description
- cattrs version: 23.1.1
- Python version: python3.7
- Operating System: linux
Description
cattrs dependency on typing_extensions doesn't indicate the minimum version needed:
Requires-Dist: typing_extensions; python_version < "3.8"
What I Did
$ python3.7 -mvenv test-venv
$ source test-venv/bin/activate
$ pip install cattrs==23.1.1 'typing_extensions<4'
$ python -c 'import cattrs'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/root/test-venv/lib/python3.7/site-packages/cattrs/__init__.py", line 1, in <module>
from .converters import BaseConverter, Converter, GenConverter, UnstructureStrategy
File "/root/test-venv/lib/python3.7/site-packages/cattrs/converters.py", line 26, in <module>
from ._compat import (
File "/root/test-venv/lib/python3.7/site-packages/cattrs/_compat.py", line 177, in <module>
from typing_extensions import Annotated, NotRequired, Required
ImportError: cannot import name 'NotRequired' from 'typing_extensions' (/root/test-venv/lib/python3.7/site-packages/typing_extensions.py)
cattr==22.2.0 works ok. allowing typing_extensions >=4 also works around the problem
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels