[issue36921] Deprecate yield from and @coroutine in asyncio

Nathaniel Smith report at bugs.python.org
Mon Apr 26 17:17:40 EDT 2021


Nathaniel Smith <njs at pobox.com> added the comment:

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

----------
nosy: +njs

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36921>
_______________________________________


More information about the Python-bugs-list mailing list