Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248)
(cherry picked from commit 2acb8d9)

Co-authored-by: Manoj K M <136242596+manoj-k-m@users.noreply.github.com>
  • Loading branch information
Manoj K M authored and miss-islington committed Apr 9, 2026
commit a78fc89d9de1751bc2bcabf4a831a72f62d3a152
4 changes: 4 additions & 0 deletions Doc/library/asyncio-future.rst
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ Future Object
Otherwise, change the Future's state to *cancelled*,
schedule the callbacks, and return ``True``.

The optional string argument *msg* is passed as the argument to the
:exc:`CancelledError` exception raised when a cancelled Future
is awaited.

.. versionchanged:: 3.9
Added the *msg* parameter.

Expand Down
Loading