diff options
author | Yurii Karabas <1998uriyyo@gmail.com> | 2020-11-28 08:21:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-28 08:21:17 (GMT) |
commit | e4fe303b8cca525e97d44e80c7e53bdab9dd9187 (patch) | |
tree | 746867bfba9e64e9bbf94d98a910edb06c589890 /Lib/asyncio/base_events.py | |
parent | f9195318a863e237f41ed7665c767028cde1c9a3 (diff) | |
download | cpython-e4fe303b8cca525e97d44e80c7e53bdab9dd9187.zip cpython-e4fe303b8cca525e97d44e80c7e53bdab9dd9187.tar.gz cpython-e4fe303b8cca525e97d44e80c7e53bdab9dd9187.tar.bz2 |
bpo-42392: Remove loop parameter from asyncio.tasks and asyncio.subprocess (GH-23521)
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r-- | Lib/asyncio/base_events.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index d71d6f7..f789635 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -350,7 +350,7 @@ class Server(events.AbstractServer): self._start_serving() # Skip one loop iteration so that all 'loop.add_reader' # go through. - await tasks.sleep(0, loop=self._loop) + await tasks.sleep(0) async def serve_forever(self): if self._serving_forever_fut is not None: @@ -541,8 +541,7 @@ class BaseEventLoop(events.AbstractEventLoop): results = await tasks.gather( *[ag.aclose() for ag in closing_agens], - return_exceptions=True, - loop=self) + return_exceptions=True) for result, agen in zip(results, closing_agens): if isinstance(result, Exception): @@ -1457,7 +1456,7 @@ class BaseEventLoop(events.AbstractEventLoop): fs = [self._create_server_getaddrinfo(host, port, family=family, flags=flags) for host in hosts] - infos = await tasks.gather(*fs, loop=self) + infos = await tasks.gather(*fs) infos = set(itertools.chain.from_iterable(infos)) completed = False @@ -1515,7 +1514,7 @@ class BaseEventLoop(events.AbstractEventLoop): server._start_serving() # Skip one loop iteration so that all 'loop.add_reader' # go through. - await tasks.sleep(0, loop=self) + await tasks.sleep(0) if self._debug: logger.info("%r is serving", server) |