You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate yield from and @coroutine in asyncio #81102
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-05-24.14:17:40.056>created_at=<Date2019-05-15.08:32:31.751>labels= ['3.8', 'expert-asyncio']
title='Deprecate yield from and @coroutine in asyncio'updated_at=<Date2021-04-26.21:17:39.992>user='https://github.com/asvetlov'
Was this supposed to deprecate using types.coroutine as a decorator as well? Because that's not clearly documented, which means people can still use it to make generator-based coroutines without async def.
Activity
miss-islington commentedon May 16, 2019
New changeset 68b34a7 by Miss Islington (bot) (Andrew Svetlov) in branch 'master':
bpo-36921: Deprecate @coroutine for sake of async def (GH-13346)
68b34a7
MojoVampire commentedon Jun 23, 2020
Was this supposed to deprecate using types.coroutine as a decorator as well? Because that's not clearly documented, which means people can still use it to make generator-based coroutines without async def.
njsmith commentedon Apr 26, 2021
@types.coroutine is still useful as a tool for writing "foundation" coroutines that directly interact with the coroutine runner, e.g.:
https://github.com/python-trio/trio/blob/94562c54d241859eb05ed85c88fd6073d6752ff6/trio/_core/_traps.py#L12-L21
https://github.com/dabeaz/curio/blob/27ccf4d130dd8c048e28bd15a22015bce3f55d53/curio/traps.py#L28-L36
So I think it's only @asyncio.coroutine that should be deprecated.