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: ...