forked from pool/python-aioitertools
- Add aioitertools-remove-loop.patch for python310 compatibility gh#omnilib/aioitertools#84 OBS-URL: https://build.opensuse.org/request/show/944549 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aioitertools?expand=0&rev=7
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
diff --git a/aioitertools/asyncio.py b/aioitertools/asyncio.py
|
|
index 663c818..4bc800b 100644
|
|
--- a/aioitertools/asyncio.py
|
|
+++ b/aioitertools/asyncio.py
|
|
@@ -59,7 +59,6 @@ async def as_completed(
|
|
Tuple[Set[Awaitable[T]], Set[Awaitable[T]]],
|
|
await asyncio.wait(
|
|
pending,
|
|
- loop=loop,
|
|
timeout=remaining,
|
|
return_when=asyncio.FIRST_COMPLETED,
|
|
),
|
|
@@ -124,7 +123,7 @@ async def gather(
|
|
if pending:
|
|
try:
|
|
done, pending = await asyncio.wait(
|
|
- pending, loop=loop, return_when=asyncio.FIRST_COMPLETED
|
|
+ pending, return_when=asyncio.FIRST_COMPLETED
|
|
)
|
|
for x in done:
|
|
if return_exceptions and x.exception():
|
|
@@ -136,7 +135,7 @@ async def gather(
|
|
for x in pending:
|
|
x.cancel()
|
|
# we insure that all tasks are cancelled before we raise
|
|
- await asyncio.gather(*pending, loop=loop, return_exceptions=True)
|
|
+ await asyncio.gather(*pending, return_exceptions=True)
|
|
raise
|
|
|
|
if not pending and next_arg == len(args):
|
|
@@ -162,7 +161,6 @@ async def gather_iter(
|
|
"""
|
|
return await gather(
|
|
*[maybe_await(i) async for i in aiter(itr)],
|
|
- loop=loop,
|
|
return_exceptions=return_exceptions,
|
|
limit=limit,
|
|
)
|