mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-02 06:00:24 +08:00
Update events and windows_events for asyncio in 3.14 (#14128)
This commit is contained in:
@@ -28,12 +28,14 @@ if sys.version_info < (3, 14):
|
||||
# Keep asyncio.__all__ updated with any changes to __all__ here
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ = (
|
||||
"AbstractEventLoopPolicy",
|
||||
"_AbstractEventLoopPolicy",
|
||||
"AbstractEventLoop",
|
||||
"AbstractServer",
|
||||
"Handle",
|
||||
"TimerHandle",
|
||||
"_get_event_loop_policy",
|
||||
"get_event_loop_policy",
|
||||
"_set_event_loop_policy",
|
||||
"set_event_loop_policy",
|
||||
"get_event_loop",
|
||||
"set_event_loop",
|
||||
@@ -600,7 +602,7 @@ class AbstractEventLoop:
|
||||
@abstractmethod
|
||||
async def shutdown_default_executor(self) -> None: ...
|
||||
|
||||
class AbstractEventLoopPolicy:
|
||||
class _AbstractEventLoopPolicy:
|
||||
@abstractmethod
|
||||
def get_event_loop(self) -> AbstractEventLoop: ...
|
||||
@abstractmethod
|
||||
@@ -622,13 +624,33 @@ class AbstractEventLoopPolicy:
|
||||
@abstractmethod
|
||||
def set_child_watcher(self, watcher: AbstractChildWatcher) -> None: ...
|
||||
|
||||
class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy, metaclass=ABCMeta):
|
||||
def get_event_loop(self) -> AbstractEventLoop: ...
|
||||
def set_event_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
||||
def new_event_loop(self) -> AbstractEventLoop: ...
|
||||
if sys.version_info < (3, 14):
|
||||
AbstractEventLoopPolicy = _AbstractEventLoopPolicy
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
class _BaseDefaultEventLoopPolicy(_AbstractEventLoopPolicy, metaclass=ABCMeta):
|
||||
def get_event_loop(self) -> AbstractEventLoop: ...
|
||||
def set_event_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
||||
def new_event_loop(self) -> AbstractEventLoop: ...
|
||||
|
||||
else:
|
||||
class BaseDefaultEventLoopPolicy(_AbstractEventLoopPolicy, metaclass=ABCMeta):
|
||||
def get_event_loop(self) -> AbstractEventLoop: ...
|
||||
def set_event_loop(self, loop: AbstractEventLoop | None) -> None: ...
|
||||
def new_event_loop(self) -> AbstractEventLoop: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def _get_event_loop_policy() -> _AbstractEventLoopPolicy: ...
|
||||
def _set_event_loop_policy(policy: _AbstractEventLoopPolicy | None) -> None: ...
|
||||
@deprecated("Deprecated as of Python 3.14; will be removed in Python 3.16")
|
||||
def get_event_loop_policy() -> _AbstractEventLoopPolicy: ...
|
||||
@deprecated("Deprecated as of Python 3.14; will be removed in Python 3.16")
|
||||
def set_event_loop_policy(policy: _AbstractEventLoopPolicy | None) -> None: ...
|
||||
|
||||
else:
|
||||
def get_event_loop_policy() -> _AbstractEventLoopPolicy: ...
|
||||
def set_event_loop_policy(policy: _AbstractEventLoopPolicy | None) -> None: ...
|
||||
|
||||
def get_event_loop_policy() -> AbstractEventLoopPolicy: ...
|
||||
def set_event_loop_policy(policy: AbstractEventLoopPolicy | None) -> None: ...
|
||||
def set_event_loop(loop: AbstractEventLoop | None) -> None: ...
|
||||
def new_event_loop() -> AbstractEventLoop: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user