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
{{ message }}
Repository navigation
PEP 695 (Type Parameter Syntax) tracker - Generics #10869
This issue is supposed to track when we can start to use the improved generics syntax introduced in Python 3.12 (PEP 695) in typeshed. Support is needed in released versions of:
mypy
pytype (optional)
pyright
PyCharm (optional)
As this is a syntax change, it's unlikely that we can add support before mypy drops support for running under Python 3.11 and below.
As this is a syntax change, it's unlikely that we can add support before mypy drops support for running under Python 3.11 and below.
It's possible (though not at all certain) that mypy will stop using the stdlib ast module for parsing before dropping 3.11 support. This would allow mypy to parse more recent Python syntax when running on an older Python version.
Activity
Akuli commentedon Oct 12, 2023
I think we can never fully switch to the new syntax, because sometimes we need to choose a variance that type checkers disagree with, as in #8781.
AlexWaygood commentedon Oct 12, 2023
That will be quite rare, though; we can aspire to use the new syntax nearly all of the time
srittau commentedon Oct 12, 2023
We also occasionally have public type vars, but I agree with Alex that we should at least aspire to use the new syntax. (In five years or so.)
srittau commentedon Jul 16, 2025
Struck pyre (for now) and marked pytype as optional.
JukkaL commentedon Jul 17, 2025
It's possible (though not at all certain) that mypy will stop using the stdlib
astmodule for parsing before dropping 3.11 support. This would allow mypy to parse more recent Python syntax when running on an older Python version.