From 2870219558eba983813aeab249e08371266ab524 Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Tue, 31 Mar 2020 02:37:38 +0200 Subject: [PATCH] Stop using `loop` kwarg in `asyncio.wait()` call (DeprecationWarning) (#327) --- uvloop/handles/process.pyx | 2 +- uvloop/loop.pyx | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/uvloop/handles/process.pyx b/uvloop/handles/process.pyx index 13360d5..f2e0f58 100644 --- a/uvloop/handles/process.pyx +++ b/uvloop/handles/process.pyx @@ -604,7 +604,7 @@ cdef class UVProcessTransport(UVProcess): if handle._init_futs: handle._stdio_ready = 0 - init_fut = aio_gather(*handle._init_futs, loop=loop) + init_fut = aio_gather(*handle._init_futs) init_fut.add_done_callback( ft_partial(handle.__stdio_inited, waiter)) else: diff --git a/uvloop/loop.pyx b/uvloop/loop.pyx index c865fed..a368c52 100644 --- a/uvloop/loop.pyx +++ b/uvloop/loop.pyx @@ -1682,7 +1682,7 @@ cdef class Loop: uv.SOCK_STREAM, 0, flags, 0) for host in hosts] - infos = await aio_gather(*fs, loop=self) + infos = await aio_gather(*fs) completed = False sock = None @@ -1908,7 +1908,7 @@ cdef class Loop: lai = &lai_static if len(fs): - await aio_wait(fs, loop=self) + await aio_wait(fs) if rai is NULL: ai_remote = f1.result() @@ -3095,8 +3095,7 @@ cdef class Loop: shutdown_coro = aio_gather( *[ag.aclose() for ag in closing_agens], - return_exceptions=True, - loop=self) + return_exceptions=True) results = await shutdown_coro for result, agen in zip(results, closing_agens):