typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

PEP 646 (Variadic Generics) tracker

Open srittau opened this issue 2 years ago • 3 comments

  • [ ] mypy (https://github.com/python/mypy/issues/12280)
  • [ ] pytype
  • [x] pyright
  • [ ] pyre
  • [ ] PyCharm (nice to have, but not required)

srittau avatar Sep 08 '22 11:09 srittau

I've ticked off pyright; I believe it's supported PEP 646 for a while now. I've also added a link to the nominal mypy issue, though there have been a fair few PRs over at mypy working on PEP 646 support and none of them seem to have referenced that issue ¯\_(ツ)_/¯.

AlexWaygood avatar Sep 09 '22 10:09 AlexWaygood

PEP 646 lists Pyre as providing a reference implementation of the PEP, so they probably also have pretty good support.

AlexWaygood avatar Sep 09 '22 10:09 AlexWaygood

PEP 646 support would be useful for (feel free to edit this):

  • asyncio.events.Handle
  • asyncio.events.TimerHandle
  • asyncio.events.AbstractEventLoop.call_at
  • asyncio.events.AbstractEventLoop.call_later
  • asyncio.events.AbstractEventLoop.call_soon
  • asyncio.base_events.BaseEventLoop.call_at
  • asyncio.base_events.BaseEventLoop.call_later
  • asyncio.base_events.BaseEventLoop.call_soon
  • (Maybe): functools.partial (#8703)
  • Various functions in the keyboard third-party stubs:
    • https://github.com/python/typeshed/blob/8a8db9c6d4e39b4c530b6b6ce03bb6869c394419/stubs/keyboard/keyboard/mouse.pyi#L47-L56
    • https://github.com/python/typeshed/blob/8a8db9c6d4e39b4c530b6b6ce03bb6869c394419/stubs/keyboard/keyboard/init.pyi#L37
    • https://github.com/python/typeshed/blob/8a8db9c6d4e39b4c530b6b6ce03bb6869c394419/stubs/keyboard/keyboard/init.pyi#L58-L65

Note that we won't be able to use PEP 646 as it currently stands for builtins.map, builtins.zip or asyncio.gather: https://github.com/python/cpython/pull/32103#discussion_r836917997

AlexWaygood avatar Sep 09 '22 11:09 AlexWaygood

This is now used in several places.

srittau avatar Dec 11 '23 06:12 srittau