Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() #19979

Merged
merged 8 commits into from May 15, 2020

Conversation

cjerdonek
Copy link
Member

@cjerdonek cjerdonek commented May 7, 2020

This adds a msg argument to Future.cancel() and Task.cancel().

(The C implementation is currently working and tests are added, but I still need to do the pure Python implementation.)

https://bugs.python.org/issue31033

@cjerdonek cjerdonek force-pushed the issue-31033-cancel-msg branch 3 times, most recently from 67ba96f to de9f8b1 Compare May 7, 2020 20:38
@cjerdonek cjerdonek changed the title [WIP] bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() May 7, 2020
@cjerdonek cjerdonek force-pushed the issue-31033-cancel-msg branch 5 times, most recently from ff02c76 to 6a21d74 Compare May 8, 2020 12:43
Lib/asyncio/futures.py Outdated Show resolved Hide resolved
@cjerdonek
Copy link
Member Author

@1st1 I removed the exception helper like you requested (inlining the logic instead, like you suggested). Can you take another look?

@cjerdonek
Copy link
Member Author

Force-pushed to unstick CI..

Copy link
Member

@1st1 1st1 left a comment

Choose a reason for hiding this comment

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

lgtm

@cjerdonek cjerdonek merged commit 1ce5841 into python:master May 15, 2020
@cjerdonek cjerdonek deleted the issue-31033-cancel-msg branch May 15, 2020 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants