aioutils icon indicating copy to clipboard operation
aioutils copied to clipboard

yield from appreciated in python 3.11

Open hajes opened this issue 1 year ago • 0 comments

aioutils.py", line 122, in <module> @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?

tried to change (https://stackoverflow.com/questions/47376408/why-cant-i-yield-from-inside-an-async-function) @asyncio.coroutine

to

async def stream_from_fd(fd, loop):
    """Recieve a streamer for a given file descriptor."""

ends up with

aioutils.py", line 137 yield from waiter ^^^^^^^^^^^^^^^^^ SyntaxError: 'yield from' inside async function

any suggestion, please? Unfortunately, I cannot downgrade python version in Clear Linux

hajes avatar Aug 12 '23 11:08 hajes