Skip to content

bpo-42392: Mention loop removal in whatsnew for 3.10 #24256

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

Merged
merged 10 commits into from
Jan 21, 2021

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Jan 19, 2021

@vstinner noticed on python-dev that there is no what's new or porting entry for removal of asyncio loop parameter.

This patch adds a basic guide.

Co-Authored-By: Kyle Stanley [email protected]

https://bugs.python.org/issue42392

Automerge-Triggered-By: GH:aeros

@Fidget-Spinner
Copy link
Member Author

Personally, I feel that we should mention that dropping support for 3.6 altogether in user code is always an option - 3.6's expected last security release is in 2021-12, and 3.10's release date is 2021-10-04. So when 3.10's out, only 2 months are left until 3.6's expected EOL arrives anyways.

Copy link
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 the PR @Fidget-Spinner! This definitely is worth including to provide users with more information about the removal of the loop parameter throughout many asyncio functions. However, I'd like to suggest a few changes to make it more specific and give users some context about why it was removed.

Also, sorry in advance if I'm slow to respond, as I'm presently still on an open source break. I just considered this issue important enough to provide some feedback given the widespread impact on asyncio users.

@bedevere-bot
Copy link

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.

async def foo(loop):
await asyncio.sleep(loop=loop)

Can *usually* be replaced with this::
Copy link
Member

Choose a reason for hiding this comment

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

Are there actually cases where this example is not the solution and another example should be provided? The APIs that I'm familiar with that got changed would be solved by this in every case, but maybe there are some that require a different fix?

If not, I'd remove the *usually* so there's no confusion about what else might need to be done.

Copy link
Contributor

@aeros aeros Jan 20, 2021

Choose a reason for hiding this comment

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

It specifically doesn't apply if the user wants to utilize an event loop other than the currently running one. But, for 90% of use cases, the user will want to use the running event loop anyways (that's largely why the loop arg was removed in the first place). I expanded upon this in another comment.

@Fidget-Spinner
Copy link
Member Author

Fidget-Spinner commented Jan 20, 2021

Thanks for the PR @Fidget-Spinner! This definitely is worth including to provide users with more information about the removal of the loop parameter throughout many asyncio functions. However, I'd like to suggest a few changes to make it more specific and give users some context about why it was removed.

@aeros Thank you so much for the reviews! They were extremely illuminating and constructive :).

Also, sorry in advance if I'm slow to respond, as I'm presently still on an open source break.

No worries, please enjoy your break!

@Fidget-Spinner
Copy link
Member Author

For bedevere-bot: I have made the requested changes; please review again. Thank you!

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

@bedevere-bot bedevere-bot requested a review from 1st1 January 20, 2021 09:08
@bedevere-bot bedevere-bot requested a review from aeros January 20, 2021 09:08
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. @aeros: do you want to have a second look or merge the PR?

Copy link
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 making the suggested changes @Fidget-Spinner! I very much like the way the motivation section succinctly reads and think readers will benefit greatly from the additional information. :-)

I just have a couple very minor nits and then I can proceed with merging.

Co-Authored-By: Kyle Stanley <[email protected]>
@miss-islington miss-islington merged commit dcea78f into python:master Jan 21, 2021
@Fidget-Spinner Fidget-Spinner deleted the doc-loop branch January 21, 2021 15:04
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@vstinner [noticed on python-dev](https://mail.python.org/archives/list/[email protected]/thread/O3T7SK3BGMFWMLCQXDODZJSBL42AUWTR/) that there is no what's new or porting entry for removal of asyncio ``loop`` parameter. 

This patch adds a basic guide.

Co-Authored-By: Kyle Stanley <[email protected]>
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
None yet
Development

Successfully merging this pull request may close these issues.

8 participants