← 返回首页
bpo-43216: Remove @asyncio.coroutine by illia-v · Pull Request #26369 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

bpo-43216: Remove @asyncio.coroutine#26369

Merged
vstinner merged 7 commits into
python:mainfrom
illia-v:bpo-43216
Jul 1, 2021
Merged

bpo-43216: Remove @asyncio.coroutine#26369
vstinner merged 7 commits into
python:mainfrom
illia-v:bpo-43216

Conversation

illia-v commented May 25, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

@asyncio.coroutine was scheduled for removal in Python 3.10 originally.

https://bugs.python.org/issue43216

vstinner 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Comment thread Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Comment thread Lib/asyncio/coroutines.py Show resolved Hide resolved
Comment thread Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
illia-v requested a review from vstinner May 26, 2021 16:59
Comment thread Doc/library/asyncio-task.rst Show resolved Hide resolved
illia-v requested a review from vstinner May 26, 2021 20:27
Comment thread Doc/whatsnew/3.11.rst Show resolved Hide resolved
illia-v requested a review from vstinner May 26, 2021 20:49

vstinner 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

LGTM. But I would prefer that @1st1 or @asvetlov merged it.

I only quickly looked at test changes. I'm fine with removing legacy @asyncio.coroutine, async def is now standard and preferred.

rhettinger removed their request for review May 31, 2021 19:43

github-actions Bot commented Jul 1, 2021

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

github-actions Bot added the stale Stale PR or inactive for long period of time. label Jul 1, 2021

Copy link
Copy Markdown
Contributor

This isn't stale

Copy link
Copy Markdown
Contributor

@1st1 @asvetlov

13 hidden items Load more…
vstinner closed this Jul 1, 2021
vstinner reopened this Jul 1, 2021

vstinner commented Jul 1, 2021
edited
Loading

Copy link
Copy Markdown
Member

multiprocessing tests hang on Address sanitizer. I cannot merge the PR because of it :-(

cc @pablogsal

pablogsal commented Jul 1, 2021
edited
Loading

Copy link
Copy Markdown
Member

multiprocessing tests hang on Address sanitizer. I cannot merge the PR because of it :-(

That's weird. Maybe run them again? We can look into increasing timeout for that run or excluding those

corona10 requested a review from aeros July 1, 2021 02:20
vstinner merged commit a1092f6 into python:main Jul 1, 2021

vstinner commented Jul 1, 2021

Copy link
Copy Markdown
Member

Merged, thanks.

I decided to no longer wait for @1st1 or @asvetlov since they seem to be busy. The change looks reasonable.

If this change breaks too many asyncio project, we can consider to revert it, help projects to migrate, and reschedule the removal once enough projects migrated. I hope that in 2021, most projects are now written with "async def" and "await". The @coroutine syntax is a legacy of Python 3.4-3.5 era. I know that one of reasons why Instagram migrated from Python 2.7 to 3.6 is to get async def syntax!

graingert commented Jul 1, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

@vstinner did this miss the deadline for py3.10 backport?

illia-v commented Jul 1, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

Thanks @vstinner & @graingert!

@vstinner did this miss the deadline for py3.10 backport?

This removal was discussed shortly before the 3.10 feature freeze. Victor suggested to wait for Python 3.11 to remove the decorator.

illia-v deleted the bpo-43216 branch July 1, 2021 13:43

vstinner commented Jul 1, 2021

Copy link
Copy Markdown
Member

This removal was discussed shortly before the 3.10 feature freeze. Victor suggested to wait for Python 3.11 to remove the decorator.

Exactly ;-)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Footer

© 2026 GitHub, Inc.