https://github.com/python/cpython/commit/64b066ad298506f715647c9a2524c9fbbc764cc2 commit: 64b066ad298506f715647c9a2524c9fbbc764cc2 branch: main author: Felix Scherz <felixwsch...@gmail.com> committer: kumaraditya303 <kumaradi...@python.org> date: 2025-04-13T13:05:44+05:30 summary:
gh-132354: document return value for `asyncio.Task.cancel` (#132374) files: M Doc/library/asyncio-task.rst M Misc/ACKS diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst index b6ae443860843b..59acce1990ae04 100644 --- a/Doc/library/asyncio-task.rst +++ b/Doc/library/asyncio-task.rst @@ -1381,7 +1381,10 @@ Task Object Request the Task to be cancelled. - This arranges for a :exc:`CancelledError` exception to be thrown + If the Task is already *done* or *cancelled*, return ``False``, + otherwise, return ``True``. + + The method arranges for a :exc:`CancelledError` exception to be thrown into the wrapped coroutine on the next cycle of the event loop. The coroutine then has a chance to clean up or even deny the diff --git a/Misc/ACKS b/Misc/ACKS index c3e8530d5b36c2..25542d01de695c 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1663,6 +1663,7 @@ Andreas Schawo Neil Schemenauer David Scherer Wolfgang Scherer +Felix Scherz Hynek Schlawack Bob Schmertz Gregor Schmid _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com