[packages/python3-aiohappyeyeballs] - updated to 2.6.1, allow running tests with pytest_asyncio 1.0.0 (probably incomplete)

qboosh qboosh at pld-linux.org
Sat Jul 12 17:20:12 CEST 2025


commit 0a4ace649b8463fe8a2a357279b6c46d111a266d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jul 12 17:21:39 2025 +0200

    - updated to 2.6.1, allow running tests with pytest_asyncio 1.0.0 (probably incomplete)

 aiohappyeyeballs-pytest_asyncio.patch | 25 +++++++++++++++++++++++++
 python3-aiohappyeyeballs.spec         | 28 +++++++++++++++++++---------
 2 files changed, 44 insertions(+), 9 deletions(-)
---
diff --git a/python3-aiohappyeyeballs.spec b/python3-aiohappyeyeballs.spec
index 18d4c4f..ca91427 100644
--- a/python3-aiohappyeyeballs.spec
+++ b/python3-aiohappyeyeballs.spec
@@ -1,26 +1,32 @@
+#
 # Conditional build:
 %bcond_without	tests	# unit tests
 
 %define		module	aiohappyeyeballs
 Summary:	Happy Eyeballs for asyncio
+Summary(pl.UTF-8):	Algorytm Happy Eyeballs dla asyncio
 Name:		python3-%{module}
-Version:	2.4.6
-Release:	3
+Version:	2.6.1
+Release:	1
 License:	PSF
 Group:		Libraries/Python
-Source0:	https://pypi.debian.net/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5:	3a4c5671b62b3bfc3d2d09970e13a3f0
+#Source0Download: https://pypi.org/simple/aiohappyeyeballs/
+Source0:	https://files.pythonhosted.org/packages/source/a/aiohappyeyeballs/%{module}-%{version}.tar.gz
+# Source0-md5:	2fa845a1ce2f7730045fa763aa9987f8
+Patch0:		aiohappyeyeballs-pytest_asyncio.patch
 URL:		https://pypi.org/project/aiohappyeyeballs/
 BuildRequires:	python3-build
 BuildRequires:	python3-installer
-BuildRequires:	python3-modules >= 1:3.2
+BuildRequires:	python3-modules >= 1:3.9
 BuildRequires:	python3-poetry-core
 %if %{with tests}
-BuildRequires:	python3-pytest-asyncio
+BuildRequires:	python3-pytest >= 7
+BuildRequires:	python3-pytest-cov >= 3
+BuildRequires:	python3-pytest-asyncio >= 0.23.2
 %endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 2.044
-Requires:	python3-modules >= 1:3.2
+Requires:	python3-modules >= 1:3.9
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -28,17 +34,21 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 This library exists to allow connecting with Happy Eyeballs (RFC 8305)
 when you already have a list of addrinfo and not a DNS name.
 
+%description -l pl.UTF-8
+Ta biblioteka pozwala na łączenie z użyciem algorythmu Happy Eyeballs
+(RFC 8305), kiedy mamy już listę addrinfo, a nie nazwę DNS.
+
 %prep
 %setup -q -n %{module}-%{version}
+%patch -P0 -p1
 
 %build
 %py3_build_pyproject
 
 %if %{with tests}
 %{__python} -m zipfile -e build-3/*.whl build-3-test
-# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTEST_PLUGINS=pytest_cov,asyncio \
+PYTEST_PLUGINS=pytest_cov.plugin,pytest_asyncio.plugin \
 %{__python3} -m pytest -o pythonpath="$PWD/build-3-test" tests
 %endif
 
diff --git a/aiohappyeyeballs-pytest_asyncio.patch b/aiohappyeyeballs-pytest_asyncio.patch
new file mode 100644
index 0000000..91a5637
--- /dev/null
+++ b/aiohappyeyeballs-pytest_asyncio.patch
@@ -0,0 +1,25 @@
+event_loop fixture no longer exists in pytest_asyncio 1.0.0
+--- aiohappyeyeballs-2.6.1/tests/conftest.py.orig	1970-01-01 01:00:00.000000000 +0100
++++ aiohappyeyeballs-2.6.1/tests/conftest.py	2025-07-12 16:32:28.421774801 +0200
+@@ -41,12 +41,11 @@ def long_repr_strings() -> Generator[Non
+ 
+ 
+ @pytest.fixture(autouse=True)
+-def verify_no_lingering_tasks(
+-    event_loop: asyncio.AbstractEventLoop,
+-) -> Generator[None, None, None]:
++def verify_no_lingering_tasks() -> Generator[None, None, None]:
+     """Verify that all tasks are cleaned up."""
++    event_loop = asyncio.new_event_loop()
+     tasks_before = asyncio.all_tasks(event_loop)
+-    yield
++    yield event_loop
+ 
+     tasks = asyncio.all_tasks(event_loop) - tasks_before
+     for task in tasks:
+@@ -60,3 +60,5 @@ def verify_no_lingering_tasks(
+             with long_repr_strings():
+                 pytest.fail(f"Lingering timer after test {handle!r}")
+                 handle.cancel()
++
++    event_loop.close()
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-aiohappyeyeballs.git/commitdiff/0a4ace649b8463fe8a2a357279b6c46d111a266d



More information about the pld-cvs-commit mailing list