15
0

Accepting request 944565 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/944565
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-aioitertools?expand=0&rev=4
This commit is contained in:
2022-01-07 11:46:16 +00:00
committed by Git OBS Bridge
3 changed files with 55 additions and 6 deletions

View File

@@ -0,0 +1,38 @@
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,
)

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 6 22:21:54 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Add aioitertools-remove-loop.patch for python310 compatibility
gh#omnilib/aioitertools#84
-------------------------------------------------------------------
Tue Aug 17 10:11:54 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-aioitertools
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,22 +16,26 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-aioitertools
Version: 0.8.0
Release: 0
Summary: itertools and builtins for AsyncIO and mixed iterables
Summary: Itertools and builtins for AsyncIO and mixed iterables
License: MIT
Group: Development/Languages/Python
URL: https://aioitertools.omnilib.dev
Source: https://files.pythonhosted.org/packages/source/a/aioitertools/aioitertools-%{version}.tar.gz
# PATCH-FIX-UPSTREAM aioitertools-remove-loop.patch -- gh#omnilib/aioitertools#84
Patch0: aioitertools-remove-loop.patch
BuildRequires: %{python_module asyncio}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module typing_extensions if %python-base < 3.8}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: (python3-typing_extensions >= 3.7 if python3-base < 3.8)
%if 0%{?python_version_nodots} < 38
Requires: python-typing_extensions >= 3.7
%endif
BuildArch: noarch
%python_subpackages
@@ -49,11 +53,12 @@ Implementation of itertools, builtins, and more for AsyncIO and mixed-type itera
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pyunittest discover -v
%pyunittest -v
%files %{python_files}
%doc README.md CHANGELOG.md
%license LICENSE
%{python_sitelib}/*
%{python_sitelib}/aioitertools
%{python_sitelib}/aioitertools-%{version}*-info
%changelog