pytype icon indicating copy to clipboard operation
pytype copied to clipboard

Support PEP 646 - Variadic Generics

Open rchen152 opened this issue 2 years ago • 6 comments

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

rchen152 avatar Nov 03 '23 18:11 rchen152

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 (https://github.com/python/typeshed/pull/11015, https://github.com/python/typeshed/pull/11014).

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

AlexWaygood avatar Nov 29 '23 11:11 AlexWaygood

I can certainly give it a try.

rchen152 avatar Nov 29 '23 19:11 rchen152

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.

rchen152 avatar Dec 07 '23 20:12 rchen152

No worries at all -- thanks so much!

AlexWaygood avatar Dec 07 '23 20:12 AlexWaygood

Ok, version 2023.12.8 has the Unpack fix =)

rchen152 avatar Dec 08 '23 21:12 rchen152

Ok, version 2023.12.8 has the Unpack fix =)

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

AlexWaygood avatar Dec 08 '23 23:12 AlexWaygood