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

Support PEP 646 - Variadic Generics #1525

Open
rchen152 opened this issue Nov 3, 2023 · 6 comments
Open

Support PEP 646 - Variadic Generics #1525

rchen152 opened this issue Nov 3, 2023 · 6 comments
Labels
cat: generics Generic, TypeVar, containers enhancement

Comments

@rchen152
Copy link
Contributor

rchen152 commented Nov 3, 2023

https://peps.python.org/pep-0646/

@AlexWaygood
Copy link
Contributor

As a first step, would it maybe be possible to have pytype gracefully fallback to Any if it sees Unpack[] being used in a type annotation? Currently using Unpack[] anywhere seems to make pytype crash, which is blocking a couple of typeshed PRs (python/typeshed#11015, python/typeshed#11014).

No worries if this is difficult to do, though; there's no great rush here in getting those typeshed PRs merged!

@rchen152
Copy link
Contributor Author

I can certainly give it a try.

@rchen152 rchen152 self-assigned this Nov 29, 2023
rchen152 added a commit that referenced this issue Dec 7, 2023
For #1525.

PiperOrigin-RevId: 588874437
@rchen152
Copy link
Contributor Author

rchen152 commented Dec 7, 2023

Sorry, it took me a while to get to this. But I should be able to cut a release with a fix for the Unpack crash tomorrow or early next week.

@AlexWaygood
Copy link
Contributor

No worries at all -- thanks so much!

@rchen152
Copy link
Contributor Author

rchen152 commented Dec 8, 2023

Ok, version 2023.12.8 has the Unpack fix =)

@AlexWaygood
Copy link
Contributor

Ok, version 2023.12.8 has the Unpack fix =)

Thank you so much — both the typeshed changes have been merged now <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat: generics Generic, TypeVar, containers enhancement
Projects
None yet
Development

No branches or pull requests

2 participants