Remove legacy code for generator based coroutines in asyncio
· Issue #102748 · python/cpython (original) (raw)
Generator based coroutines were long deprecated and removed and asyncio
doesn't not supports it. There is some left over code for supporting it which can be removed now.
The first thing is this behavior of asyncio.iscoroutine
which makes no sense now. I propose to remove this first.
import asyncio
def gen(): yield 1
assert not asyncio.iscoroutine(gen()) # fails