[packages/python3-pytest-aiohttp] - new
qboosh
qboosh at pld-linux.org
Sat Jan 17 11:17:52 CET 2026
commit 243e0e7071238649813ca0d2ada6504a8096916f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jan 17 11:17:48 2026 +0100
- new
pytest_aiohttp-tests.patch | 9 ++++++
python3-pytest-aiohttp.spec | 77 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+)
---
diff --git a/python3-pytest-aiohttp.spec b/python3-pytest-aiohttp.spec
new file mode 100644
index 0000000..6824046
--- /dev/null
+++ b/python3-pytest-aiohttp.spec
@@ -0,0 +1,77 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
+Summary: Pytest plugin for aiohttp support
+Summary(pl.UTF-8): Wtyczka pytesta do obsługi aiohttp
+Name: python3-pytest-aiohttp
+Version: 1.1.0
+Release: 1
+License: Apache v2.0
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/pytest-aiohttp/
+Source0: https://files.pythonhosted.org/packages/source/p/pytest-aiohttp/pytest_aiohttp-%{version}.tar.gz
+# Source0-md5: 890d8b15de35e7febed2fae98525480a
+Patch0: pytest_aiohttp-tests.patch
+URL: https://pypi.org/project/pytest-aiohttp/
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools >= 1:51.0
+BuildRequires: python3-setuptools_scm >= 6.2
+BuildRequires: python3-wheel >= 0.36
+%if %{with tests}
+BuildRequires: python3-aiohttp >= 3.11
+BuildRequires: python3-pytest >= 6.1.0
+BuildRequires: python3-pytest-asyncio >= 0.17.2
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python3-modules >= 1:3.2
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The library provides useful fixtures for creation test aiohttp server
+and client.
+
+%description -l pl.UTF-8
+Biblioteka udostępnia wyposażenie przydatne do tworzenia testowych
+serwerów i klientów aiohttp.
+
+%package apidocs
+Summary: API documentation for Python pytest-aiohttp module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona pytest-aiohttp
+Group: Documentation
+
+%description apidocs
+API documentation for Python pytest-aiohttp module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona pytest-aiohttp.
+
+%prep
+%setup -q -n pytest_aiohttp-%{version}
+%patch -P0 -p1
+
+%build
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS=pytest_asyncio.plugin,pytest_aiohttp.plugin \
+PYTHONPATH=$(pwd) \
+%{__python3} -m pytest tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES.rst README.rst
+%{py3_sitescriptdir}/pytest_aiohttp
+%{py3_sitescriptdir}/pytest_aiohttp-%{version}-py*.egg-info
diff --git a/pytest_aiohttp-tests.patch b/pytest_aiohttp-tests.patch
new file mode 100644
index 0000000..507188e
--- /dev/null
+++ b/pytest_aiohttp-tests.patch
@@ -0,0 +1,9 @@
+INTERNALERROR> pytest.PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
+INTERNALERROR> The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"
+
+See also https://github.com/aio-libs/pytest-aiohttp/pull/115
+--- pytest_aiohttp-1.1.0/pytest.ini.orig 1970-01-01 01:00:00.000000000 +0100
++++ pytest_aiohttp-1.1.0/pytest.ini 1970-01-01 01:00:00.000000000 +0100
+@@ -0,0 +1,2 @@
++[pytest]
++asyncio_default_fixture_loop_scope = function
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-pytest-aiohttp.git/commitdiff/243e0e7071238649813ca0d2ada6504a8096916f
More information about the pld-cvs-commit
mailing list