asyncio.Task: .cancelling() and .uncancel() now return int, not bool (#7405)

This commit is contained in:
Guido van Rossum
2022-02-28 17:35:42 -08:00
committed by GitHub
parent 4b7d2a76cb
commit 47cccff9cb

View File

@@ -315,8 +315,8 @@ class Task(Future[_T], Generic[_T]):
else:
def cancel(self) -> bool: ...
if sys.version_info >= (3, 11):
def cancelling(self) -> bool: ...
def uncancel(self) -> bool: ...
def cancelling(self) -> int: ...
def uncancel(self) -> int: ...
if sys.version_info < (3, 9):
@classmethod
def current_task(cls, loop: AbstractEventLoop | None = ...) -> Task[Any] | None: ...