8000 Add `__all__` for `asyncio.unix_events` & `asyncio.taskgroups`, and simplify `asyncio.__init__` by AlexWaygood · Pull Request #7343 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

Add __all__ for asyncio.unix_events & asyncio.taskgroups, and simplify asyncio.__init__ #7343

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

Merged
merged 4 commits into from
Feb 28, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add unix_events.__all__
  • Loading branch information
AlexWaygood committed Feb 21, 2022
commit 2f696963e140b6b4e7a05d7e7c2fc5f356b6eec6
26 changes: 26 additions & 0 deletions stdlib/asyncio/unix_events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,32 @@ class AbstractChildWatcher:
def is_active(self) -> bool: ...

if sys.platform != "win32":
if sys.version_info >= (3, 9):
__all__ = (
"SelectorEventLoop",
"AbstractChildWatcher",
"SafeChildWatcher",
"FastChildWatcher",
"PidfdChildWatcher",
"MultiLoopChildWatcher",
"ThreadedChildWatcher",
"DefaultEventLoopPolicy",
)
elif sys.version_info >= (3, 8):
__all__ = (
"SelectorEventLoop",
"AbstractChildWatcher",
"SafeChildWatcher",
"FastChildWatcher",
"MultiLoopChildWatcher",
"ThreadedChildWatcher",
"DefaultEventLoopPolicy",
)
elif sys.version_info >= (3, 7):
__all__ = ("SelectorEventLoop", "AbstractChildWatcher", "SafeChildWatcher", "FastChildWatcher", "DefaultEventLoopPolicy")
else:
__all__ = ["SelectorEventLoop", "AbstractChildWatcher", "SafeChildWatcher", "FastChildWatcher", "DefaultEventLoopPolicy"]

class BaseChildWatcher(AbstractChildWatcher):
def __init__(self) -> None: ...

Expand Down
0