From 1b2c35bb3c38ebb9c5500fb099cd8130779d0b00 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 28 Feb 2022 17:17:21 -0800 Subject: [PATCH] asyncio.Task: .cancelling() and .uncancel() now return int, not bool --- stdlib/asyncio/tasks.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/asyncio/tasks.pyi b/stdlib/asyncio/tasks.pyi index 765fb67beefb..7232242c4781 100644 --- a/stdlib/asyncio/tasks.pyi +++ b/stdlib/asyncio/tasks.pyi @@ -316,8 +316,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: ...