asyncio currently uses iterable coroutine directly to wrap awaitables with __await__ methods. This leads to unnecessary special casing and is confusing as asyncio does not supports using yield from now so it should not be used internally too. This will avoid checking for generators everywhere in public APIs (TBD for different issue).
kumaraditya303 commentedDec 8, 2022
•
edited
asynciocurrently uses iterable coroutine directly to wrap awaitables with__await__methods. This leads to unnecessary special casing and is confusing asasynciodoes not supports usingyield fromnow so it should not be used internally too. This will avoid checking for generators everywhere in public APIs (TBD for different issue).Linked PRs
_wrap_awaitableas a coroutine inasynciointernally #100128The text was updated successfully, but these errors were encountered: