Skip to content

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

@illia-villia-v commented May 25, 2021

Copy link
Copy Markdown
Contributor

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

https://bugs.python.org/issue43216

@vstinnervstinner 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.

Comment threadDoc/whatsnew/3.11.rst Outdated
Comment threadLib/asyncio/coroutines.py
Comment threadDoc/whatsnew/3.11.rst Outdated
@illia-v
illia-v requested a review from vstinnerMay 26, 2021 16:59
Comment threadDoc/library/asyncio-task.rst
@illia-v
illia-v requested a review from vstinnerMay 26, 2021 20:27
Comment threadDoc/whatsnew/3.11.rst
@illia-v
illia-v requested a review from vstinnerMay 26, 2021 20:49

@vstinnervstinner 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.

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.

@github-actions

Copy link
Copy Markdown

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

@github-actionsgithub-actionsBot added the stale Stale PR or inactive for long period of time. label Jul 1, 2021
@graingert

Copy link
Copy Markdown
Contributor

This isn't stale

@graingert

Copy link
Copy Markdown
Contributor

@1st1@asvetlov

@vstinnervstinner closed this Jul 1, 2021
@vstinnervstinner reopened this Jul 1, 2021
@vstinner

vstinner commented Jul 1, 2021

Copy link
Copy Markdown
Member

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

cc @pablogsal

@pablogsal

pablogsal commented Jul 1, 2021

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
corona10 requested a review from aerosJuly 1, 2021 02:20
@vstinner
vstinner merged commit a1092f6 into python:mainJul 1, 2021
@vstinner

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

graingert commented Jul 1, 2021

Copy link
Copy Markdown
Contributor

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

@illia-v

illia-v commented Jul 1, 2021

Copy link
Copy Markdown
ContributorAuthor

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
illia-v deleted the bpo-43216 branch July 1, 2021 13:43
@vstinner

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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

staleStale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@illia-v@graingert@vstinner@pablogsal@the-knights-who-say-ni@bedevere-bot