From c97e7703c5b139d13bd7002f5b6c3d591f3f25c73f3153221b5ce81ed2e50796 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 7 Jan 2022 00:21:20 +0000 Subject: [PATCH] Accepting request 944549 from home:bnavigator:branches:devel:languages:python - 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 --- aioitertools-remove-loop.patch | 38 ++++++++++++++++++++++++++++++++++ python-aioitertools.changes | 6 ++++++ python-aioitertools.spec | 17 +++++++++------ 3 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 aioitertools-remove-loop.patch diff --git a/aioitertools-remove-loop.patch b/aioitertools-remove-loop.patch new file mode 100644 index 0000000..b3c9f62 --- /dev/null +++ b/aioitertools-remove-loop.patch @@ -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, + ) diff --git a/python-aioitertools.changes b/python-aioitertools.changes index cf658b0..7b17393 100644 --- a/python-aioitertools.changes +++ b/python-aioitertools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 6 22:21:54 UTC 2022 - Ben Greiner + +- Add aioitertools-remove-loop.patch for python310 compatibility + gh#omnilib/aioitertools#84 + ------------------------------------------------------------------- Tue Aug 17 10:11:54 UTC 2021 - John Paul Adrian Glaubitz diff --git a/python-aioitertools.spec b/python-aioitertools.spec index 64e60e2..9fbc168 100644 --- a/python-aioitertools.spec +++ b/python-aioitertools.spec @@ -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