Skip to content

bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks()#20874

Merged
miss-islington merged 4 commits into
python:masterfrom
remilapeyre:bpo-40967
Jul 2, 2020
Merged

bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks()#20874
miss-islington merged 4 commits into
python:masterfrom
remilapeyre:bpo-40967

Conversation

@remilapeyre
Copy link
Copy Markdown

@remilapeyre remilapeyre commented Jun 14, 2020

https://bugs.python.org/issue40967

Automerge-Triggered-By: @aeros

@remilapeyre
Copy link
Copy Markdown
Author

@aeros apparently we can go ahead with this according to the discussion on bpo. Let me know if this needs some changes.

@aeros
Copy link
Copy Markdown
Contributor

aeros commented Jun 30, 2020

Yep! I should have some time to take a look tomorrow. Thanks for the PR.

Copy link
Copy Markdown
Contributor

@aeros aeros left a 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:

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.

@bedevere-bot
Copy link
Copy Markdown

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.

@ambv
Copy link
Copy Markdown
Contributor

ambv commented Jun 30, 2020

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 :-)

@remilapeyre
Copy link
Copy Markdown
Author

Sorry, I will address the review in the next couple of hours

@remilapeyre
Copy link
Copy Markdown
Author

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.

@remilapeyre
Copy link
Copy Markdown
Author

I have made the requested changes; please review again

@bedevere-bot
Copy link
Copy Markdown

Thanks for making the requested changes!

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

@bedevere-bot bedevere-bot requested a review from aeros June 30, 2020 20:57
Copy link
Copy Markdown
Contributor

@aeros aeros left a 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.

@aeros aeros changed the title bpo-40967: Removed asyncio.Task.current_task() and asyncio.Task.all_tasks() bpo-40967: Remove deprecated asyncio.Task.current_task() and asyncio.Task.all_tasks() Jul 2, 2020
@miss-islington miss-islington merged commit 004e64e into python:master Jul 2, 2020
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @remilapeyre for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 2, 2020
…Task.all_tasks() (pythonGH-20874)

(cherry picked from commit 004e64e)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
@bedevere-bot
Copy link
Copy Markdown

GH-21272 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit that referenced this pull request Jul 2, 2020
…Task.all_tasks() (GH-20874)

(cherry picked from commit 004e64e)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
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.

6 participants