Skip to content

Commit 8726734

Browse files
authored
add asyncio.__all__ (#13038)
1 parent abed9a8 commit 8726734

19 files changed

+1320
-0
lines changed

stdlib/asyncio/__init__.pyi

Lines changed: 1300 additions & 0 deletions
Large diffs are not rendered by default.

stdlib/asyncio/base_events.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
1313
from typing import IO, Any, Literal, TypeVar, overload
1414
from typing_extensions import TypeAlias, TypeVarTuple, Unpack
1515

16+
# Keep asyncio.__all__ updated with any changes to __all__ here
1617
if sys.version_info >= (3, 9):
1718
__all__ = ("BaseEventLoop", "Server")
1819
else:

stdlib/asyncio/coroutines.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ from collections.abc import Awaitable, Callable, Coroutine
33
from typing import Any, TypeVar, overload
44
from typing_extensions import ParamSpec, TypeGuard, TypeIs
55

6+
# Keep asyncio.__all__ updated with any changes to __all__ here
67
if sys.version_info >= (3, 11):
78
__all__ = ("iscoroutinefunction", "iscoroutine")
89
else:

stdlib/asyncio/events.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ from .tasks import Task
2222
from .transports import BaseTransport, DatagramTransport, ReadTransport, SubprocessTransport, Transport, WriteTransport
2323
from .unix_events import AbstractChildWatcher
2424

25+
# Keep asyncio.__all__ updated with any changes to __all__ here
2526
if sys.version_info >= (3, 14):
2627
__all__ = (
2728
"AbstractEventLoopPolicy",

stdlib/asyncio/exceptions.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import sys
22

3+
# Keep asyncio.__all__ updated with any changes to __all__ here
34
if sys.version_info >= (3, 11):
45
__all__ = (
56
"BrokenBarrierError",

stdlib/asyncio/futures.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ from typing_extensions import TypeIs
55

66
from .events import AbstractEventLoop
77

8+
# Keep asyncio.__all__ updated with any changes to __all__ here
89
__all__ = ("Future", "wrap_future", "isfuture")
910

1011
_T = TypeVar("_T")

stdlib/asyncio/locks.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ if sys.version_info >= (3, 10):
1515
else:
1616
_LoopBoundMixin = object
1717

18+
# Keep asyncio.__all__ updated with any changes to __all__ here
1819
if sys.version_info >= (3, 11):
1920
__all__ = ("Lock", "Event", "Condition", "Semaphore", "BoundedSemaphore", "Barrier")
2021
else:

stdlib/asyncio/protocols.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from _typeshed import ReadableBuffer
22
from asyncio import transports
33
from typing import Any
44

5+
# Keep asyncio.__all__ updated with any changes to __all__ here
56
__all__ = ("BaseProtocol", "Protocol", "DatagramProtocol", "SubprocessProtocol", "BufferedProtocol")
67

78
class BaseProtocol:

stdlib/asyncio/queues.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ else:
1313
class QueueEmpty(Exception): ...
1414
class QueueFull(Exception): ...
1515

16+
# Keep asyncio.__all__ updated with any changes to __all__ here
1617
if sys.version_info >= (3, 13):
1718
__all__ = ("Queue", "PriorityQueue", "LifoQueue", "QueueFull", "QueueEmpty", "QueueShutDown")
1819

stdlib/asyncio/runners.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ from typing_extensions import Self
77

88
from .events import AbstractEventLoop
99

10+
# Keep asyncio.__all__ updated with any changes to __all__ here
1011
if sys.version_info >= (3, 11):
1112
__all__ = ("Runner", "run")
1213
else:

stdlib/asyncio/streams.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ from typing_extensions import Self, TypeAlias
99
from . import events, protocols, transports
1010
from .base_events import Server
1111

12+
# Keep asyncio.__all__ updated with any changes to __all__ here
1213
if sys.platform == "win32":
1314
__all__ = ("StreamReader", "StreamWriter", "StreamReaderProtocol", "open_connection", "start_server")
1415
else:

stdlib/asyncio/subprocess.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ from asyncio import events, protocols, streams, transports
55
from collections.abc import Callable, Collection
66
from typing import IO, Any, Literal
77

8+
# Keep asyncio.__all__ updated with any changes to __all__ here
89
__all__ = ("create_subprocess_exec", "create_subprocess_shell")
910

1011
PIPE: int

stdlib/asyncio/taskgroups.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ from . import _CoroutineLike
88
from .events import AbstractEventLoop
99
from .tasks import Task
1010

11+
# Keep asyncio.__all__ updated with any changes to __all__ here
1112
if sys.version_info >= (3, 12):
1213
__all__ = ("TaskGroup",)
1314
else:

stdlib/asyncio/tasks.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ from .futures import Future
1818
if sys.version_info >= (3, 11):
1919
from contextvars import Context
2020

21+
# Keep asyncio.__all__ updated with any changes to __all__ here
2122
if sys.version_info >= (3, 12):
2223
__all__ = (
2324
"Task",

stdlib/asyncio/threads.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from collections.abc import Callable
22
from typing import TypeVar
33
from typing_extensions import ParamSpec
44

5+
# Keep asyncio.__all__ updated with any changes to __all__ here
56
__all__ = ("to_thread",)
67
_P = ParamSpec("_P")
78
_R = TypeVar("_R")

stdlib/asyncio/timeouts.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from types import TracebackType
22
from typing import final
33
from typing_extensions import Self
44

5+
# Keep asyncio.__all__ updated with any changes to __all__ here
56
__all__ = ("Timeout", "timeout", "timeout_at")
67

78
@final

stdlib/asyncio/transports.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ from collections.abc import Iterable, Mapping
44
from socket import _Address
55
from typing import Any
66

7+
# Keep asyncio.__all__ updated with any changes to __all__ here
78
__all__ = ("BaseTransport", "ReadTransport", "WriteTransport", "Transport", "DatagramTransport", "SubprocessTransport")
89

910
class BaseTransport:

stdlib/asyncio/unix_events.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ from .selector_events import BaseSelectorEventLoop
1313

1414
_Ts = TypeVarTuple("_Ts")
1515

16+
# Keep asyncio.__all__ updated with any changes to __all__ here
1617
if sys.platform != "win32":
1718
if sys.version_info >= (3, 14):
1819
__all__ = ("SelectorEventLoop", "DefaultEventLoopPolicy", "EventLoop")
1920
elif sys.version_info >= (3, 13):
21+
# Adds EventLoop
2022
__all__ = (
2123
"SelectorEventLoop",
2224
"AbstractChildWatcher",
@@ -29,6 +31,7 @@ if sys.platform != "win32":
2931
"EventLoop",
3032
)
3133
elif sys.version_info >= (3, 9):
34+
# adds PidfdChildWatcher
3235
__all__ = (
3336
"SelectorEventLoop",
3437
"AbstractChildWatcher",

stdlib/asyncio/windows_events.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ from typing import IO, Any, ClassVar, Final, NoReturn
66

77
from . import events, futures, proactor_events, selector_events, streams, windows_utils
88

9+
# Keep asyncio.__all__ updated with any changes to __all__ here
910
if sys.platform == "win32":
1011
if sys.version_info >= (3, 13):
1112
# 3.13 added `EventLoop`.

0 commit comments

Comments
 (0)