]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248) (#148300)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 9 Apr 2026 14:52:59 +0000 (16:52 +0200)
committerGitHub <noreply@github.com>
Thu, 9 Apr 2026 14:52:59 +0000 (20:22 +0530)
gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248)
(cherry picked from commit 2acb8d9257c4f5049777d9d462092373b0b3feca)

Co-authored-by: Manoj K M <136242596+manoj-k-m@users.noreply.github.com>
Doc/library/asyncio-future.rst

index 1a08afc02222d713fea765d78d80b96d5161a84c..5c32bd3eaad8283cf4e9c7df7762123abbd43d9d 100644 (file)
@@ -195,6 +195,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.