Skip to content

bpo-46829: Deprecate passing a message into Future.cancel() and Task.cancel() - #31840

Merged
gvanrossum merged 6 commits into
mainfrom
deprecate-cancel-msg
Mar 23, 2022
Merged

bpo-46829: Deprecate passing a message into Future.cancel() and Task.cancel()#31840
gvanrossum merged 6 commits into
mainfrom
deprecate-cancel-msg

Conversation

@asvetlov

@asvetlovasvetlov commented Mar 12, 2022

Copy link
Copy Markdown
Contributor

Comment threadLib/test/test_asyncio/test_taskgroups.py Outdated
Comment threadLib/test/test_asyncio/test_taskgroups.py Outdated
@gvanrossum

gvanrossum commented Mar 12, 2022

Copy link
Copy Markdown
Member

Please hold off on merging this until we've come to some kind of agreement on whether to deprecate .cancel(msg). See bpo-46829.

@gvanrossum

Copy link
Copy Markdown
Member

Also, if we do this we should add deprecation markup to the docs. Search for 'method:: cancel' in asyncio-future.rst and asyncio-task.rst. Also there's a note at the very bottom of asyncio-future.rst about the difference between asyncio.Future.cancel and concurrent.futures.Future.cancel that should be deprecated.

@asvetlov

Copy link
Copy Markdown
ContributorAuthor

Forgot about docs, thanks.
Sure, I'll wait for the final decision.
Just wanted to don't do it at the last moment before the feature freeze.

@asvetlov

asvetlov commented Mar 13, 2022

Copy link
Copy Markdown
ContributorAuthor

I've updated the doc.

@gvanrossumgvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't know how long to wait for @cjerdonek to respond or agree.

@asvetlov

Copy link
Copy Markdown
ContributorAuthor

@cjerdonek would you comment on this pull request, please?

@gvanrossum

Copy link
Copy Markdown
Member

I'm just going to merge this. @cjerdonek, if you have a convincing argument to keep this, we can always revert this PR.

@gvanrossum
gvanrossum merged commit 0360e9f into mainMar 23, 2022
@gvanrossum
gvanrossum deleted the deprecate-cancel-msg branch March 23, 2022 15:43
@gvanrossum

Copy link
Copy Markdown
Member

At the core dev sprint we discussed this and decided to revert this. I'm aiming to get the reversal into 3.11.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@asvetlov@gvanrossum@1st1@the-knights-who-say-ni@bedevere-bot