From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Fri, 9 Dec 2022 03:52:18 +0000 (+0530) Subject: GH-100113: remove remaining `yield from` usage from `asyncio` tests (#100114) X-Git-Tag: v3.12.0a4~254 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0448deac70be94792616c0fb0c9cb524de9a09b8;p=thirdparty%2FPython%2Fcpython.git GH-100113: remove remaining `yield from` usage from `asyncio` tests (#100114) --- diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py index bb1ffdf2df74..5168b8250ef0 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -2092,8 +2092,8 @@ class BaseTaskTests: async def create(): # The indirection fut->child_coro is needed since otherwise the # gathering task is done at the same time as the child future - def child_coro(): - return (yield from fut) + async def child_coro(): + return await fut gather_future = asyncio.gather(child_coro()) return asyncio.ensure_future(gather_future) gather_task = loop.run_until_complete(create())