Skip to content

gh-148091: asyncio : clarify Future.cancel(msg) behaviour#148248

Merged
kumaraditya303 merged 10 commits intopython:mainfrom
manoj-k-m:add-msg-explanation
Apr 9, 2026
Merged

gh-148091: asyncio : clarify Future.cancel(msg) behaviour#148248
kumaraditya303 merged 10 commits intopython:mainfrom
manoj-k-m:add-msg-explanation

Conversation

@manoj-k-m
Copy link
Copy Markdown
Contributor

@manoj-k-m manoj-k-m commented Apr 8, 2026

The msg parameter of Future.cancel() is currently undocumented.

This change clarifies that the optional msg argument is passed as the argument to asyncio.CancelledError raised when
a cancelled Future is awaited, and that it can be of any object.

Fixes #148091

skip news

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 8, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@manoj-k-m manoj-k-m changed the title asyncio : clarify Future.cancel(msg) behaviour gh-148091: asyncio : clarify Future.cancel(msg) behaviour Apr 8, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 8, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

1 similar comment
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 8, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@manoj-k-m
Copy link
Copy Markdown
Contributor Author

@bedevere-bot skip news

Copy link
Copy Markdown
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the asyncio documentation, not the docstring. We don't generate the documentation from docstrings.

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 8, 2026

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 9, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 9, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

1 similar comment
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 9, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 9, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@manoj-k-m
Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 9, 2026

Thanks for making the requested changes!

@ZeroIntensity: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from ZeroIntensity April 9, 2026 00:15
@ZeroIntensity ZeroIntensity added docs Documentation in the Doc dir skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Apr 9, 2026
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Apr 9, 2026
@kumaraditya303 kumaraditya303 merged commit 2acb8d9 into python:main Apr 9, 2026
33 of 34 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Apr 9, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @manoj-k-m for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 9, 2026
…GH-148248)

(cherry picked from commit 2acb8d9257c4f5049777d9d462092373b0b3feca)

Co-authored-by: Manoj K M <136242596+manoj-k-m@users.noreply.github.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 9, 2026

GH-148299 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Apr 9, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 9, 2026

GH-148300 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 9, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 9, 2026
…GH-148248)

(cherry picked from commit 2acb8d9)

Co-authored-by: Manoj K M <136242596+manoj-k-m@users.noreply.github.com>
kumaraditya303 pushed a commit that referenced this pull request Apr 9, 2026
…8248) (#148300)

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>
kumaraditya303 pushed a commit that referenced this pull request Apr 9, 2026
…8248) (#148299)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Document how the msg parameter for asyncio.futures.Future.cancel is used

3 participants