Skip to content
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

PEP 696 (Type Defaults for Type Parameters) tracker #11422

Open
4 of 8 tasks
srittau opened this issue Feb 14, 2024 · 4 comments
Open
4 of 8 tasks

PEP 696 (Type Defaults for Type Parameters) tracker #11422

srittau opened this issue Feb 14, 2024 · 4 comments
Labels
project: feature tracker Tracks whether a typing feature can be used in typeshed stubs

Comments

@srittau
Copy link
Collaborator

srittau commented Feb 14, 2024

This issue is supposed to track when we can start to use type variable (etc.) defaults introduced in Python 3.13 (PEP 696 in typeshed. Support is needed in released versions of:

Please reference this issue as needed from other issues/PRs to collect places that we might want to update.


Type defaults are now usable as long as our tests don't choke. Full support still pending.

@JelleZijlstra
Copy link
Member

I checked off mypy since mypy 1.9.0 adds basic support. It's possible some advanced use cases won't work yet, but we should be OK to go ahead in many cases.

@srittau
Copy link
Collaborator Author

srittau commented Mar 11, 2024

@rchen152 Could you give us a status for pytype or possibly a ticket to track?

I also marked pyre as optional for now. We don't have pyre tests and there doesn't seem to be a tracking ticket.

@rchen152
Copy link
Collaborator

I opened google/pytype#1597 for pytype. It looks like it should be relatively straightforward to make it so that pytype doesn't error on the new default argument, so that typeshed can use it; I'll try to get that done this week.

@rchen152
Copy link
Collaborator

I opened google/pytype#1597 for pytype. It looks like it should be relatively straightforward to make it so that pytype doesn't error on the new default argument, so that typeshed can use it; I'll try to get that done this week.

As of version 2024.3.19, pytype doesn't error on type parameter defaults in pyi files anymore, so typeshed should be able to start using them. (I'm still working on plumbing them through the rest of pytype.) Let me know if you run into any trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project: feature tracker Tracks whether a typing feature can be used in typeshed stubs
Projects
None yet
Development

No branches or pull requests

3 participants