Add get_context methods to asyncio in 3.12 (#10534)

This commit is contained in:
Nikita Sobolev
2023-08-06 14:02:48 +03:00
committed by GitHub
parent 5e2fe131fa
commit 86218a52b7
3 changed files with 4 additions and 4 deletions

View File

@@ -76,6 +76,8 @@ class Handle:
def cancel(self) -> None: ...
def _run(self) -> None: ...
def cancelled(self) -> bool: ...
if sys.version_info >= (3, 12):
def get_context(self) -> Context: ...
class TimerHandle(Handle):
def __init__(

View File

@@ -314,6 +314,8 @@ class Task(Future[_T_co], Generic[_T_co]): # type: ignore[type-var] # pyright:
def get_coro(self) -> _TaskCompatibleCoro[_T_co]: ...
def get_name(self) -> str: ...
def set_name(self, __value: object) -> None: ...
if sys.version_info >= (3, 12):
def get_context(self) -> Context: ...
def get_stack(self, *, limit: int | None = None) -> list[FrameType]: ...
def print_stack(self, *, limit: int | None = None, file: TextIO | None = None) -> None: ...

View File

@@ -2,17 +2,13 @@
argparse.BooleanOptionalAction.__init__
asyncio.BaseEventLoop.create_connection
asyncio.BaseEventLoop.shutdown_default_executor
asyncio.Handle.get_context
asyncio.StreamWriter.start_tls
asyncio.Task.get_context
asyncio.base_events.BaseEventLoop.create_connection
asyncio.base_events.BaseEventLoop.shutdown_default_executor
asyncio.constants.THREAD_JOIN_TIMEOUT
asyncio.create_eager_task_factory
asyncio.eager_task_factory
asyncio.events.Handle.get_context
asyncio.streams.StreamWriter.start_tls
asyncio.tasks.Task.get_context
asyncio.tasks.__all__
asyncio.tasks.create_eager_task_factory
asyncio.tasks.eager_task_factory