Skip to content

Add asyncio.tools stubs for 3.14 #14305

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

brianschubert
Copy link
Contributor

Refs #14303

Upstream issue: python/cpython#91048

This comment has been minimized.

from typing import NamedTuple, SupportsIndex, type_check_only

@type_check_only
class _AwaitedInfo(NamedTuple): # AwaitedInfo_Type from _remote_debugging
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think that comments are appropriate here since exactly the same namedtuples are also defined in tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think they serve a purpose, but I'm happy to remove them if that's preferred. They document that these are actually struct sequence types from _remote_debugging, which typeshed doesn't have stubs for (yet). If typeshed later adds stubs for _remote_debugging, we'd likely want to replace these, so I think it's helpful to have some note reminding us of what these types represent. (Typing the real struct sequence types is a bit trickier, which is why I just used a local approximation here)

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants