-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Type substitution in generic aliases does not work if ParamSpec is followed by TypeVarTuple #99379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
3.11
only security fixes
3.12
only security fixes
pending
The issue will be closed if no feedback is provided
topic-typing
type-bug
An unexpected behavior, bug, or error
Comments
serhiy-storchaka
added a commit
to serhiy-storchaka/cpython
that referenced
this issue
Nov 12, 2022
…ution of ParamSpec and TypeVarTuple * Fix substitution of TypeVarTuple and ParamSpec together in user generics. * Fix substitution of ParamSpec followed by TypeVarTuple in generic aliases. * Check the number of arguments in substitution in user generics containing a TypeVarTuple and one or more TypeVar.
serhiy-storchaka
added a commit
that referenced
this issue
Nov 29, 2022
… and TypeVarTuple (GH-99412) * Fix substitution of TypeVarTuple and ParamSpec together in user generics. * Fix substitution of ParamSpec followed by TypeVarTuple in generic aliases. * Check the number of arguments in substitution in user generics containing a TypeVarTuple and one or more TypeVar.
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 29, 2022
…ution of ParamSpec and TypeVarTuple (pythonGH-99412) * Fix substitution of TypeVarTuple and ParamSpec together in user generics. * Fix substitution of ParamSpec followed by TypeVarTuple in generic aliases. * Check the number of arguments in substitution in user generics containing a TypeVarTuple and one or more TypeVar. (cherry picked from commit 8f2fb7d) Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Nov 29, 2022
…ution of ParamSpec and TypeVarTuple (pythonGH-99412) * Fix substitution of TypeVarTuple and ParamSpec together in user generics. * Fix substitution of ParamSpec followed by TypeVarTuple in generic aliases. * Check the number of arguments in substitution in user generics containing a TypeVarTuple and one or more TypeVar. (cherry picked from commit 8f2fb7d) Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington
added a commit
that referenced
this issue
Nov 29, 2022
… and TypeVarTuple (GH-99412) * Fix substitution of TypeVarTuple and ParamSpec together in user generics. * Fix substitution of ParamSpec followed by TypeVarTuple in generic aliases. * Check the number of arguments in substitution in user generics containing a TypeVarTuple and one or more TypeVar. (cherry picked from commit 8f2fb7d) Co-authored-by: Serhiy Storchaka <[email protected]>
These examples all work fine on |
Closing as "completed", since this was buggy in the past, but the bug was fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.11
only security fixes
3.12
only security fixes
pending
The issue will be closed if no feedback is provided
topic-typing
type-bug
An unexpected behavior, bug, or error
The following code:
gives an error:
The same for the C implementation (
types.GenericAlias
):And for user generics:
But it works if
ParamSpec
andTypeVarTuple
are in different order:It is a different bug than #99344 because it happens when you substitute in a generic alias instead of a user generic.
The text was updated successfully, but these errors were encountered: