Skip to content

[3.11] gh-88965: typing: fix type substitution of a list of types after initial ParamSpec substitution (GH-102808) - #102957

Merged
miss-islington merged 1 commit into
python:3.11from
miss-islington:backport-adb0621-3.11
Mar 23, 2023
Merged

[3.11] gh-88965: typing: fix type substitution of a list of types after initial ParamSpec substitution (GH-102808)#102957
miss-islington merged 1 commit into
python:3.11from
miss-islington:backport-adb0621-3.11

Conversation

@miss-islington

@miss-islingtonmiss-islington commented Mar 23, 2023

Copy link
Copy Markdown
Contributor

Previously, this used to fail:

fromtypingimport*T=TypeVar("T")
P=ParamSpec("P")
classX(Generic[P]):
f: Callable[P, int]
Y=X[[int, T]]
Z=Y[str]

(cherry picked from commit adb0621)

Co-authored-by: Nikita Sobolev mail@sobolevn.me
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com

…r initial `ParamSpec` substitution (pythonGH-102808)
Previously, this used to fail:
```py
from typing import *
T = TypeVar("T")
P = ParamSpec("P")
class X(Generic[P]):
f: Callable[P, int]
Y = X[[int, T]]
Z = Y[str]
```
(cherry picked from commit adb0621)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygoodAlexWaygood self-assigned this Mar 23, 2023
@miss-islington
miss-islington merged commit 1645a40 into python:3.11Mar 23, 2023
@miss-islington
miss-islington deleted the backport-adb0621-3.11 branch March 23, 2023 16:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stdlibStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@miss-islington@AlexWaygood@bedevere-bot@sobolevn