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
The following code displays some incorrect behavior, but different parts do not work in certain ranges of 3.8-3.11.3
3.8 & 3.9 substitution of Concatenate
3.10 does not correctly collect type parameters
< 3.11.3 wrong substitution behavior; type parameter not removed
fromtypingimportGeneric, TypeVarfromtyping_extensionsimportParamSpec, ConcatenateP=ParamSpec('P')
T=TypeVar("T")
classCLS(Generic[P]): ...
Y=CLS[T] # or with a ParamSpec# 3.10Y[str] # raises TypeError is not a generic class# 3.8 & 3.9G9=CLS[Concatenate[T, P]]
H9=G9[int, [T]] # should be ok; but TypeErrorH9[str] # should also work# 3.11.0G8=CLS[Concatenate[T, ...]]
H1=G8[int]
H1[str] # for python 3.11.0-3 this still has a parameter and does not raise a TypeError
This is a variant of #126 but with generics which require different fixes. There are multiple flavors of this issue depending on the version parameters are not recognized or not substituted correctly.
For a more comprehensive list check the skipped tests of #491here
It's possible that some substitutions with Concatenate worked prior to #479 and caused a regression here, but I am not yet certain.
The following code displays some incorrect behavior, but different parts do not work in certain ranges of 3.8-3.11.3
Concatenate
This is a variant of #126 but with generics which require different fixes. There are multiple flavors of this issue depending on the version parameters are not recognized or not substituted correctly.
For a more comprehensive list check the skipped tests of #491 here
It's possible that some substitutions with
Concatenate
worked prior to #479 and caused a regression here, but I am not yet certain.Fixes come with
The text was updated successfully, but these errors were encountered: