15
0

- Skip a test broken by idna 3.11.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-aiohttp?expand=0&rev=164
This commit is contained in:
2025-11-14 03:14:09 +00:00
committed by Git OBS Bridge
commit 9c1db06a21
12 changed files with 2140 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
aiohttp-3.12.15.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4fc61385e9c98d72fcdf47e6dd81833f47b2f77c114c29cd64a361be57a763a2
size 7823716

3
aiohttp-3.13.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7a3398198d60c14ec060868ae6c1ede55833b67af728733d76944293a5b6e071
size 1101225

3
aiohttp-3.13.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40176a52c186aefef6eb3cad2cdd30cd06e3afbe88fe8ab2af9c0b90f228daca
size 7837994

75
fix-vendoring.patch Normal file
View File

@@ -0,0 +1,75 @@
--- a/Makefile.orig 2025-10-16 13:56:38.297077787 +0200
+++ b/Makefile 2025-10-16 13:59:43.532929894 +0200
@@ -47,10 +47,8 @@
.SECONDARY: $(call to-hash,$(ALLS))
.update-pip:
- @python -m pip install --upgrade pip
.install-cython: .update-pip $(call to-hash,requirements/cython.txt)
- @python -m pip install -r requirements/cython.in -c requirements/cython.txt
@touch .install-cython
aiohttp/_find_header.c: $(call to-hash,aiohttp/hdrs.py ./tools/gen.py)
@@ -85,7 +83,6 @@
cythonize-nodeps: $(PYXS:.pyx=.c) aiohttp/_websocket/reader_c.c
.install-deps: .install-cython $(PYXS:.pyx=.c) aiohttp/_websocket/reader_c.c $(call to-hash,$(CYS) $(REQS))
- @python -m pip install -r requirements/dev.in -c requirements/dev.txt
@touch .install-deps
.PHONY: lint
@@ -100,7 +97,6 @@
mypy
.develop: .install-deps generate-llhttp $(call to-hash,$(PYS) $(CYS) $(CS))
- python -m pip install -e . -c requirements/runtime-deps.txt
@touch .develop
.PHONY: test
@@ -110,12 +106,12 @@
.PHONY: vtest
vtest: .develop
@pytest -s -v
- @python -X dev -m pytest -s -v -m dev_mode
+ python3 -X dev -m pytest -s -v -m dev_mode
.PHONY: vvtest
vvtest: .develop
@pytest -vv
- @python -X dev -m pytest -s -v -m dev_mode
+ python3 -X dev -m pytest -s -v -m dev_mode
define run_tests_in_docker
@@ -151,7 +147,7 @@
@rm -rf build
@rm -rf cover
@make -C docs clean
- @python setup.py clean
+ python3 setup.py clean
@rm -f aiohttp/*.so
@rm -f aiohttp/*.pyd
@rm -f aiohttp/*.html
@@ -182,7 +178,6 @@
.PHONY: install
install: .update-pip
- @python -m pip install -r requirements/dev.in -c requirements/dev.txt
.PHONY: install-dev
install-dev: .develop
@@ -190,4 +185,4 @@
.PHONY: sync-direct-runtime-deps
sync-direct-runtime-deps:
@echo Updating 'requirements/runtime-deps.in' from 'setup.cfg'... >&2
- @python requirements/sync-direct-runtime-deps.py
+ python3 requirements/sync-direct-runtime-deps.py
--- a/tools/gen.py.orig 2025-10-16 14:00:10.257485651 +0200
+++ a/tools/gen.py 2025-10-16 14:00:18.604659234 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
import io
import pathlib

1805
python-aiohttp.changes Normal file

File diff suppressed because it is too large Load Diff

177
python-aiohttp.spec Normal file
View File

@@ -0,0 +1,177 @@
#
# spec file for package python-aiohttp
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_with docs
%{?sle15_python_module_pythons}
Name: python-aiohttp
Version: 3.13.2
Release: 0
Summary: Asynchronous HTTP client/server framework
License: Apache-2.0
URL: https://github.com/aio-libs/aiohttp
Source: https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-%{version}.tar.gz
# llhttp vendor tar ball manually created based on git submodule via:
# - yarn
# - make generate
# - tar cfvz vendor-llhttp.tar.gz vendor/
Source2: vendor-llhttp.tar.gz
Patch0: test_no_warnings_fix.patch
# PATCH-FIX-OPENSUSE remove-zlib-ng-test-dep.patch
Patch2: remove-zlib-ng-test-dep.patch
# PATCH-FIX-OPENSUSE fix-vendoring.patch
Patch3: fix-vendoring.patch
Requires: python-aiohappyeyeballs >= 2.5.0
Requires: python-aiosignal >= 1.4
Requires: python-attrs >= 17.3.0
Requires: python-frozenlist >= 1.1.1
Requires: (python-charset-normalizer >= 2.0 with python-charset-normalizer < 4)
Requires: (python-multidict >= 4.5 with python-multidict < 7)
Requires: (python-yarl >= 1.17.0 with python-yarl < 2)
Recommends: python-Brotli
Recommends: python-aiodns
Recommends: python-cChardet
Suggests: %{name}-doc
# SECTION build requirements
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# /SECTION
# SECTION install requirements
BuildRequires: %{python_module aiohappyeyeballs >= 2.5.0}
BuildRequires: %{python_module aiosignal >= 1.4}
BuildRequires: %{python_module attrs >= 17.3.0}
BuildRequires: %{python_module charset-normalizer >= 2.0 with %python-charset-normalizer < 4}
BuildRequires: %{python_module frozenlist >= 1.1.1}
BuildRequires: %{python_module multidict >= 4.5 with %python-multidict < 7}
BuildRequires: %{python_module yarl >= 1.17.0 with %python-yarl < 2}
# /SECTION
# SECTION test requirements
BuildRequires: %{python_module Brotli}
BuildRequires: %{python_module blockbuster}
BuildRequires: %{python_module freezegun}
BuildRequires: %{python_module gunicorn}
BuildRequires: %{python_module pluggy}
BuildRequires: %{python_module propcache}
BuildRequires: %{python_module pytest >= 6.2.0}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module re-assert}
BuildRequires: %{python_module time-machine}
BuildRequires: %{python_module trustme}
# /SECTION
# SECTION docs
%if %{with docs}
BuildRequires: python3-MarkupSafe
BuildRequires: python3-Pygments >= 2.1
BuildRequires: python3-Sphinx
BuildRequires: python3-aiohttp-theme
BuildRequires: python3-sphinxcontrib-asyncio
BuildRequires: python3-sphinxcontrib-blockdiag
BuildRequires: python3-sphinxcontrib-newsfeed
BuildRequires: python3-sphinxcontrib-towncrier
%endif
# /SECTION
%python_subpackages
%description
Asynchronous HTTP client/server framework for Python.
- Supports both the client and server side of HTTP protocol.
- Supports both client and server WebSockets out-of-the-box.
- Web-server has middleware and pluggable routing.
%package -n %{name}-doc
Summary: Documentation files for %{name}
%description -n %{name}-doc
HTML documentation on the API and examples for %{name}.
%prep
%autosetup -p1 -n aiohttp-%{version}
# don't check coverage
sed -i '/--cov/d' setup.cfg
# vendored llhttp
tar xfv %{S:2}
# prepare cython files manually for now
make cythonize
%build
export CFLAGS="%{optflags}"
%pyproject_wheel
%if %{with docs}
pushd docs
%make_build html
rm _build/html/.buildinfo
popd
%endif
%install
%pyproject_install
%{python_expand %fdupes %{buildroot}%{$python_sitearch}
find %{buildroot}%{$python_sitearch} -name '*.[ch]' -delete
rm -r %{buildroot}%{$python_sitearch}/aiohttp/.hash
}
%check
donttest="test_aiohttp_request_coroutine or test_mark_formdata_as_processed or test_aiohttp_plugin_async or test_secure_https_proxy_absolute_path"
# # flaky
# donttest+=" or test_https_proxy_unsupported_tls_in_tls"
# donttest+=" or test_shutdown_handler_cancellation_suppressed"
# https://github.com/aio-libs/aiohttp/issues/11113
donttest+=" or test_tcp_connector_ssl_shutdown_timeout"
# most probably https://github.com/cbornet/blockbuster/issues/47
donttest+=" or (test_cookie_jar and (heap or expire)) or test_treat_as_secure_origin_init"
# broken with idna 3.11 https://github.com/aio-libs/aiohttp/pull/11638
donttest+=" or test_invalid_idna"
# requires python-on-whales
rm -v tests/autobahn/test_autobahn.py
# uses proxy.py which is not maintained anymore
rm -v tests/test_proxy_functional.py
# Requires python-pytest-codspeed
rm -v tests/test_benchmarks_*
# randomly fails on xdist splits
single_runs="(test_run_app or test_web_runner)"
# breaks without threading
single_runs+=" and not test_shutdown_handler_cancellation_suppressed"
test -d aiohttp && mv aiohttp aiohttp.bkp
%pytest_arch tests -n 4 -k "not ($donttest or skip_blockbuster)"
%files %{python_files}
%license LICENSE.txt
%doc CHANGES.rst CONTRIBUTORS.txt README.rst
%{python_sitearch}/aiohttp
%{python_sitearch}/aiohttp-%{version}.dist-info
%if %{with docs}
%if 0%{?suse_version} > 1500
%files -n %{name}-doc
%endif
%doc docs/_build/html
%endif
%changelog

View File

@@ -0,0 +1,21 @@
Index: aiohttp-3.12.13/tests/conftest.py
===================================================================
--- aiohttp-3.12.13.orig/tests/conftest.py
+++ aiohttp-3.12.13/tests/conftest.py
@@ -12,7 +12,6 @@ from typing import Any, AsyncIterator, G
from unittest import mock
from uuid import uuid4
-import isal.isal_zlib
import pytest
import zlib_ng.zlib_ng
from blockbuster import blockbuster_ctx
@@ -331,7 +330,7 @@ def unused_port_socket() -> Generator[so
s.close()
-@pytest.fixture(params=[zlib, zlib_ng.zlib_ng, isal.isal_zlib])
+@pytest.fixture(params=[zlib, zlib_ng.zlib_ng])
def parametrize_zlib_backend(
request: pytest.FixtureRequest,
) -> Generator[None, None, None]:

View File

@@ -0,0 +1,11 @@
--- a/tests/conftest.py.orig 2025-10-16 16:10:22.546232519 +0200
+++ a/tests/conftest.py 2025-10-16 16:10:30.949427637 +0200
@@ -336,7 +336,7 @@
s.close()
-@pytest.fixture(params=["zlib", "zlib_ng.zlib_ng", "isal.isal_zlib"])
+@pytest.fixture(params=["zlib"])
def parametrize_zlib_backend(
request: pytest.FixtureRequest,
) -> Generator[None, None, None]:

View File

@@ -0,0 +1,15 @@
diff -rup aiohttp-3.10.5.orig/tests/test_circular_imports.py aiohttp-3.10.5/tests/test_circular_imports.py
--- aiohttp-3.10.5.orig/tests/test_circular_imports.py 2024-08-19 15:18:15.000000000 -0400
+++ aiohttp-3.10.5/tests/test_circular_imports.py 2024-09-04 08:18:49.702469018 -0400
@@ -111,6 +111,11 @@ def test_no_warnings(import_path: str) -
# `gunicorn.util`.
"-W", "ignore:pkg_resources is deprecated as an API:"
"DeprecationWarning",
+ # UserWarning about importing aiohttp from a second sys.path
+ # location under the abuild home directory when running tests
+ # under the build service
+ "-W", "ignore:Module aiohttp was already imported from "
+ "/home/abuild/rpmbuild/BUILDROOT",
"-c", f"import {import_path!s}",
# fmt: on
)

BIN
vendor-llhttp.tar.gz LFS Normal file

Binary file not shown.