Incompatible with typing-extensions 4.6
Closed this issue · 3 comments
lephuongbg commented
Got this error when upgrading typing-extensions to 4.6. pydash works fine with typing-extensions 4.5.
utils/__init__.py:20: in <module>
from pydash import last
.venv/lib/python3.10/site-packages/pydash/__init__.py:170: in <module>
from .objects import (
.venv/lib/python3.10/site-packages/pydash/objects.py:17: in <module>
from .utilities import PathToken, to_path, to_path_tokens
.venv/lib/python3.10/site-packages/pydash/utilities.py:577: in <module>
class MemoizedFunc(Protocol[P, T, T2]):
../lang/lib/python3.10/typing.py:312: in inner
return func(*args, **kwds)
.venv/lib/python3.10/site-packages/typing_extensions.py:672: in __class_getitem__
raise TypeError(
E TypeError: Parameters to Protocol[...] must all be type variables. Parameter 1 is ~P
Tenzer commented
I did some bisecting of the changes between typing-extensions 4.5.0 and 4.6.0 and found the changes in python/typing_extensions#137 to be the culprit.
I have posted on that PR for any pointers on how to fix this incompatibility, as I can't immediately work it out.
Tenzer commented
typing-extensions 4.6.1 has been released now which fixes this.
jenstroeger commented
With the typing-extensions package’s fix, shouldn’t pydash also change its own requirements to avoid importing the culprit version — this requirement
install_requires =
typing-extensions>=3.10
seems rather loose to me.