You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeAliasType currently has some bug/limitation when using it together with a ParamSpec in Python <3.10.
Root of the problem is the changed typing._type_check that was changed in Python 3.11 which makes typing_extensions.TypeAliasType.__getitem__ run into the TypeError in older Python versions:
arg: Ellipsis | list[type] # should be valid
- if not callable(arg):- raise TypeError(f"{msg} Got {arg!r:.100}.")+ if type(arg) is tuple:+ raise TypeError(f"{msg} Got {arg!r:.100}.")
The following cases work in Python 3.11+ and fail in <= Python3.10
TypeAliasType
currently has some bug/limitation when using it together with aParamSpec
in Python <3.10.Root of the problem is the changed
typing._type_check
that was changed in Python 3.11 which makestyping_extensions.TypeAliasType.__getitem__
run into the TypeError in older Python versions:The following cases work in Python 3.11+ and fail in <= Python3.10
The text was updated successfully, but these errors were encountered: