mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
add asyncio.__all__ (#13038)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@ from socket import AddressFamily, SocketKind, _Address, _RetAddress, socket
|
||||
from typing import IO, Any, Literal, TypeVar, overload
|
||||
from typing_extensions import TypeAlias, TypeVarTuple, Unpack
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 9):
|
||||
__all__ = ("BaseEventLoop", "Server")
|
||||
else:
|
||||
|
||||
@@ -3,6 +3,7 @@ from collections.abc import Awaitable, Callable, Coroutine
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import ParamSpec, TypeGuard, TypeIs
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = ("iscoroutinefunction", "iscoroutine")
|
||||
else:
|
||||
|
||||
@@ -22,6 +22,7 @@ from .tasks import Task
|
||||
from .transports import BaseTransport, DatagramTransport, ReadTransport, SubprocessTransport, Transport, WriteTransport
|
||||
from .unix_events import AbstractChildWatcher
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ = (
|
||||
"AbstractEventLoopPolicy",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = (
|
||||
"BrokenBarrierError",
|
||||
|
||||
@@ -5,6 +5,7 @@ from typing_extensions import TypeIs
|
||||
|
||||
from .events import AbstractEventLoop
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
__all__ = ("Future", "wrap_future", "isfuture")
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -15,6 +15,7 @@ if sys.version_info >= (3, 10):
|
||||
else:
|
||||
_LoopBoundMixin = object
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = ("Lock", "Event", "Condition", "Semaphore", "BoundedSemaphore", "Barrier")
|
||||
else:
|
||||
|
||||
@@ -2,6 +2,7 @@ from _typeshed import ReadableBuffer
|
||||
from asyncio import transports
|
||||
from typing import Any
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
__all__ = ("BaseProtocol", "Protocol", "DatagramProtocol", "SubprocessProtocol", "BufferedProtocol")
|
||||
|
||||
class BaseProtocol:
|
||||
|
||||
@@ -13,6 +13,7 @@ else:
|
||||
class QueueEmpty(Exception): ...
|
||||
class QueueFull(Exception): ...
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 13):
|
||||
__all__ = ("Queue", "PriorityQueue", "LifoQueue", "QueueFull", "QueueEmpty", "QueueShutDown")
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ from typing_extensions import Self
|
||||
|
||||
from .events import AbstractEventLoop
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 11):
|
||||
__all__ = ("Runner", "run")
|
||||
else:
|
||||
|
||||
@@ -9,6 +9,7 @@ from typing_extensions import Self, TypeAlias
|
||||
from . import events, protocols, transports
|
||||
from .base_events import Server
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.platform == "win32":
|
||||
__all__ = ("StreamReader", "StreamWriter", "StreamReaderProtocol", "open_connection", "start_server")
|
||||
else:
|
||||
|
||||
@@ -5,6 +5,7 @@ from asyncio import events, protocols, streams, transports
|
||||
from collections.abc import Callable, Collection
|
||||
from typing import IO, Any, Literal
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
__all__ = ("create_subprocess_exec", "create_subprocess_shell")
|
||||
|
||||
PIPE: int
|
||||
|
||||
@@ -8,6 +8,7 @@ from . import _CoroutineLike
|
||||
from .events import AbstractEventLoop
|
||||
from .tasks import Task
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ = ("TaskGroup",)
|
||||
else:
|
||||
|
||||
@@ -18,6 +18,7 @@ from .futures import Future
|
||||
if sys.version_info >= (3, 11):
|
||||
from contextvars import Context
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ = (
|
||||
"Task",
|
||||
|
||||
@@ -2,6 +2,7 @@ from collections.abc import Callable
|
||||
from typing import TypeVar
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
__all__ = ("to_thread",)
|
||||
_P = ParamSpec("_P")
|
||||
_R = TypeVar("_R")
|
||||
|
||||
@@ -2,6 +2,7 @@ from types import TracebackType
|
||||
from typing import final
|
||||
from typing_extensions import Self
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
__all__ = ("Timeout", "timeout", "timeout_at")
|
||||
|
||||
@final
|
||||
|
||||
@@ -4,6 +4,7 @@ from collections.abc import Iterable, Mapping
|
||||
from socket import _Address
|
||||
from typing import Any
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
__all__ = ("BaseTransport", "ReadTransport", "WriteTransport", "Transport", "DatagramTransport", "SubprocessTransport")
|
||||
|
||||
class BaseTransport:
|
||||
|
||||
@@ -13,10 +13,12 @@ from .selector_events import BaseSelectorEventLoop
|
||||
|
||||
_Ts = TypeVarTuple("_Ts")
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.platform != "win32":
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ = ("SelectorEventLoop", "DefaultEventLoopPolicy", "EventLoop")
|
||||
elif sys.version_info >= (3, 13):
|
||||
# Adds EventLoop
|
||||
__all__ = (
|
||||
"SelectorEventLoop",
|
||||
"AbstractChildWatcher",
|
||||
@@ -29,6 +31,7 @@ if sys.platform != "win32":
|
||||
"EventLoop",
|
||||
)
|
||||
elif sys.version_info >= (3, 9):
|
||||
# adds PidfdChildWatcher
|
||||
__all__ = (
|
||||
"SelectorEventLoop",
|
||||
"AbstractChildWatcher",
|
||||
|
||||
@@ -6,6 +6,7 @@ from typing import IO, Any, ClassVar, Final, NoReturn
|
||||
|
||||
from . import events, futures, proactor_events, selector_events, streams, windows_utils
|
||||
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.platform == "win32":
|
||||
if sys.version_info >= (3, 13):
|
||||
# 3.13 added `EventLoop`.
|
||||
|
||||
Reference in New Issue
Block a user