-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks() #20874
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
Conversation
@aeros apparently we can go ahead with this according to the discussion on bpo. Let me know if this needs some changes. |
Yep! I should have some time to take a look tomorrow. Thanks for the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following DeprecationWarning should also be removed:
cpython/Lib/test/test_asyncio/test_tasks.py
Lines 3002 to 3003 in 0968bb6
with self.assertWarns(DeprecationWarning): | |
self.assertEqual(asyncio.Task.all_tasks(loop), {task}) |
Also, the "What's New" 3.9 document should be updated, specifically the removals should be mentioned in the dedicated section, with a link to the asyncio.current_task()
and asyncio.all_tasks()
functions that can be used instead.
Other than that, it mostly looks good. I'll double check later to make sure the PR covers everything.
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 don't mean to scare you, especially given my late response on the issue, but this is blocking the release of 3.9.0b4. Please prioritize this :-) |
Sorry, I will address the review in the next couple of hours |
It should be good now, I fixed the C module that I had completely missed for some reason, updated the tests and added a note in What's New. Let me know if it needs anything else. |
I have made the requested changes; please review again |
Thanks for making the requested changes! @aeros: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for also taking care of removing the deprecated C-API part as well, I just recalled that we also needed to remove that earlier today. With the latest round of changes, it looks good to me.
I'll proceed with merging now since this is a release blocker for 3.9b4, but would greatly appreciate a post-commit review from @1st1 or @asvetlov to make sure we didn't miss anything.
Thanks @remilapeyre for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
…Task.all_tasks() (pythonGH-20874) (cherry picked from commit 004e64e) Co-authored-by: Rémi Lapeyre <[email protected]>
GH-21272 is a backport of this pull request to the 3.9 branch. |
…Task.all_tasks() (GH-20874) (cherry picked from commit 004e64e) Co-authored-by: Rémi Lapeyre <[email protected]>
https://bugs.python.org/issue40967
Automerge-Triggered-By: @aeros