Date: Thursday, October 6, 2022 @ 14:24:22 Author: diabonas Revision: 1322239
upgpkg: python-aiohttp 3.8.3-1: upstream release - Drop some workarounds related to the test suite that are no longer necessary. - Patch test_circular_imports.py to respect our custom PYTHONPATH. - Update the PYTHONPATH location according to the changes in setuptools 62.1.0. Modified: python-aiohttp/trunk/PKGBUILD Deleted: python-aiohttp/trunk/non-derpy-tests.patch -----------------------+ PKGBUILD | 28 ++++++------------ non-derpy-tests.patch | 71 ------------------------------------------------ 2 files changed, 9 insertions(+), 90 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-10-06 14:16:22 UTC (rev 1322238) +++ PKGBUILD 2022-10-06 14:24:22 UTC (rev 1322239) @@ -4,9 +4,9 @@ _pkgname=aiohttp pkgname=python-aiohttp -_gitcommit=cc6dc0c49f5d002485f9a3cdf9bc3127a3ac1388 -pkgver=3.8.1 -pkgrel=4 +_gitcommit=30b7a4e99677b4014dda2372504343bb05fc983e +pkgver=3.8.3 +pkgrel=1 pkgdesc='HTTP client/server for asyncio' url='https://aiohttp.readthedocs.io' arch=('x86_64') @@ -26,10 +26,8 @@ 'python-cchardet: for faster encoding detection' 'python-brotli: for Brotli transfer-encodings support') source=(${pkgname}::"git+https://github.com/aio-libs/aiohttp#commit=${_gitcommit}" - non-derpy-tests.patch git+https://github.com/nodejs/llhttp.git) sha512sums=('SKIP' - 'bb0a6b39f8200ef79d68cc5329c13814f60702a8fb929b1c0d64b5cff5602b6d0848fa2644b911bb637cfce0e235abf332f3769545dade4c52bfabd636369d55' 'SKIP') pkgver() { @@ -44,15 +42,10 @@ git submodule update --recursive sed 's|.install-cython ||' -i Makefile - # Make tests compatible with python-proxy.py 2.4.0 - git cherry-pick --no-commit 674948f588022584e5e5168dd329e31a6557f401 - - # If these tests are passing, who are we to judge - patch -Np1 -i ../non-derpy-tests.patch - - # This test fails with the error "coroutine 'BaseTestServer.close' was never - # awaited", which does not appear to be a packaging issue - sed -i '/test_aiohttp_request_coroutine/i @pytest.mark.xfail' tests/test_client_functional.py + # This test calls the Python interpreter, we need to make sure that the path + # for the C extensions is correct there as well + sed -i "s/import {import_path!s}/import sys; sys.path.insert(0, '{os.environ['PYTHONPATH']}'); &/" \ + tests/test_circular_imports.py } build() { @@ -63,11 +56,8 @@ check() { cd ${pkgname} - local _python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') - - # Without --pythonwarnings=default, the test suite does not even start due to - # an unrelated DeprecationWarning from python-packaging - PYTHONPATH="$PWD/build/lib.linux-$CARCH-${_python_version}" pytest --pythonwarnings=default + local _python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))') + PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-${_python_version}" pytest } package() { Deleted: non-derpy-tests.patch =================================================================== --- non-derpy-tests.patch 2022-10-06 14:16:22 UTC (rev 1322238) +++ non-derpy-tests.patch 2022-10-06 14:24:22 UTC (rev 1322239) @@ -1,71 +0,0 @@ -diff --git a/tests/test_client_request.py b/tests/test_client_request.py -index 037b7f47b..be35afd1c 100644 ---- a/tests/test_client_request.py -+++ b/tests/test_client_request.py -@@ -276,12 +276,6 @@ def test_host_header_ipv6_with_port(make_request) -> None: - assert req.headers["HOST"] == "[::2]:99" - - [email protected]( -- PY_310, -- reason="No idea why ClientRequest() is constructed out of loop but " -- "it calls `asyncio.get_event_loop()`", -- raises=DeprecationWarning, --) - def test_default_loop(loop) -> None: - asyncio.set_event_loop(loop) - req = ClientRequest("get", URL("http://python.org/")) -diff --git a/tests/test_proxy_functional.py b/tests/test_proxy_functional.py -index 32dc4f6dc..fe5023257 100644 ---- a/tests/test_proxy_functional.py -+++ b/tests/test_proxy_functional.py -@@ -125,7 +125,6 @@ def _pretend_asyncio_supports_tls_in_tls( - ) - - --@secure_proxy_xfail_under_py310_linux(raises=ClientProxyConnectionError) - @pytest.mark.parametrize( - "web_server_endpoint_type", - ( -@@ -168,7 +167,6 @@ async def test_secure_https_proxy_absolute_path( - await asyncio.sleep(0.1) - - --@secure_proxy_xfail_under_py310_linux(raises=AssertionError) - @pytest.mark.xfail( - not PY_37, - raises=RuntimeError, -diff --git a/tests/test_streams.py b/tests/test_streams.py -index 764b377ff..648e24e7e 100644 ---- a/tests/test_streams.py -+++ b/tests/test_streams.py -@@ -83,12 +83,6 @@ class TestStreamReader: - with pytest.raises(RuntimeError): - await stream._wait("test") - -- @pytest.mark.xfail( -- PY_310, -- reason="No idea why ClientRequest() is constructed out of loop but " -- "it calls `asyncio.get_event_loop()`", -- raises=DeprecationWarning, -- ) - def test_ctor_global_loop(self) -> None: - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop) -diff --git a/tests/test_web_app.py b/tests/test_web_app.py -index 8a1c2659a..c507a6311 100644 ---- a/tests/test_web_app.py -+++ b/tests/test_web_app.py -@@ -40,12 +40,6 @@ async def test_set_loop() -> None: - assert app.loop is loop - - [email protected]( -- PY_310, -- reason="No idea why _set_loop() is constructed out of loop " -- "but it calls `asyncio.get_event_loop()`", -- raises=DeprecationWarning, --) - def test_set_loop_default_loop() -> None: - loop = asyncio.new_event_loop() - asyncio.set_event_loop(loop)
