[Python-checkins] GH-100113: remove remaining `yield from` usage from `asyncio` tests (#100114)

kumaraditya303 webhook-mailer at python.org
Thu Dec 8 22:52:24 EST 2022


https://github.com/python/cpython/commit/0448deac70be94792616c0fb0c9cb524de9a09b8
commit: 0448deac70be94792616c0fb0c9cb524de9a09b8
branch: main
author: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>
committer: kumaraditya303 <59607654+kumaraditya303 at users.noreply.github.com>
date: 2022-12-09T09:22:18+05:30
summary:

GH-100113: remove remaining `yield from` usage from `asyncio` tests  (#100114)

files:
M Lib/test/test_asyncio/test_tasks.py

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 @@ def test_cancel_gather_1(self):
         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())



More information about the Python-checkins mailing list