python-attrs / cattrs

Composable custom class converters for attrs, dataclasses and friends.
https://catt.rs
MIT License
791 stars 110 forks source link

cattrs 23.2.0 ModuleNotFoundError on import #449

Closed mtreinish closed 9 months ago

mtreinish commented 9 months ago

Description

On a fresh install of cattrs 23.2.0 and importing it I receive a module not found error saying: ModuleNotFoundError: No module named 'typing_extensions

What I Did

python -m venv test_new_cattrs
test_new_cattrs/bin/pip install -U cattrs
test_new_cattrs/bin/python -c 'import cattrs'

which returns:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/test_new_cattrs/lib/python3.11/site-packages/cattrs/__init__.py", line 1, in <module>
    from .converters import BaseConverter, Converter, GenConverter, UnstructureStrategy
  File "/tmp/test_new_cattrs/lib/python3.11/site-packages/cattrs/converters.py", line 58, in <module>
    from .dispatch import HookFactory, MultiStrategyDispatch, StructureHook, UnstructureHook
  File "/tmp/test_new_cattrs/lib/python3.11/site-packages/cattrs/dispatch.py", line 5, in <module>
    from typing_extensions import TypeAlias
ModuleNotFoundError: No module named 'typing_extensions'
mtreinish commented 9 months ago

I see this is a duplicate of #446 and the fix is already merged (#447) and will be released in a bugfix release

Tinche commented 9 months ago

Yeah, releasing in a few hours if nothing else pops up.