diff options
Diffstat (limited to 'dev-python/quart-trio')
-rw-r--r-- | dev-python/quart-trio/Manifest | 3 | ||||
-rw-r--r-- | dev-python/quart-trio/files/quart-trio-0.11.1-trio-0.25.patch | 73 | ||||
-rw-r--r-- | dev-python/quart-trio/quart-trio-0.11.1.ebuild | 7 |
3 files changed, 81 insertions, 2 deletions
diff --git a/dev-python/quart-trio/Manifest b/dev-python/quart-trio/Manifest index 38133550cbd0..695d8558bcf4 100644 --- a/dev-python/quart-trio/Manifest +++ b/dev-python/quart-trio/Manifest @@ -1,3 +1,4 @@ +AUX quart-trio-0.11.1-trio-0.25.patch 2490 BLAKE2B f4430630bcd8151343367804bb179863b89826c98a4893b06672c0930b6153c748b1850acc259a547fbb52d41d8b6a94eb6af80327a83e8234aec366669d93e2 SHA512 04bdeb63b4de4b3fff472bdd0eb8dbdb87a0a73f48ceaaec85d0e0747b56bd0c520b0c75ab09fa43c1dc0cb296e180b8dd3496ac43e115b5cc8f562e5dcde006 DIST quart-trio-0.11.1.gh.tar.gz 18568 BLAKE2B faabf4204a82dcc70e41d1d1ec7171c89386f2e40979c20501890d9bc27eb2af693bc791a9015a9c4c676a5e25ec69dc4975a0cd09987cd14f699a04442d54da SHA512 8ea20c36c772eff3e2b0a83a4c325cd223c19b3d7e1e51e7378897bd11479db2c8015d2e8c4713721070fc413f42b19f844a3966a0d06d299439cf514b0b3291 -EBUILD quart-trio-0.11.1.ebuild 955 BLAKE2B 8a3ee3adab77c99247a8a5e9b3a92bd24f09983b8fb8252834be59067f6bca1f5802ba22616807d29be6c0f849db969d57195672eb0baad2812a9bf3d42b823e SHA512 97a28a9d7454a59c43316fa52a6b043ebea81f777d8240f26525ef8bd91fe7fb3719263cac4489e538ea617a2315b2eeb51c56781f0430edf596d0ff7ad87723 +EBUILD quart-trio-0.11.1.ebuild 1093 BLAKE2B c487b2632474ccdad06fd3d542b9afa14fd37cbf86461f68cd4db112f783b83b450535369327c6cd8fe6814cf8a5770c47c175ae3163c81b1cb1402a139a16f0 SHA512 a8988fd5ddd63f9dd2d2ed3674aa12f60a530949e01807632463defb40abcd36ddb3de7368568cede89a85bf2a23a8431ef3eeeeb140c9538536a801274ff931 MISC metadata.xml 427 BLAKE2B fade855b0fc05b078dec5432d1e5cff22bdc4fc23bb97aecca815b7c031b67881f291afae0d5abf42fc115f405cf528683d992447d372a154015c40b1eb8f36c SHA512 2738f87b35ee3ca112096727054730fe90af48a3f77afff7aed8198a43bf505e984ec0f2d810fcd183507be58a8586c6f3dd4dcd26f40c6ba11008d7745aa714 diff --git a/dev-python/quart-trio/files/quart-trio-0.11.1-trio-0.25.patch b/dev-python/quart-trio/files/quart-trio-0.11.1-trio-0.25.patch new file mode 100644 index 000000000000..f95a253d06e9 --- /dev/null +++ b/dev-python/quart-trio/files/quart-trio-0.11.1-trio-0.25.patch @@ -0,0 +1,73 @@ +From 805686abfd9963be26d59d9da9b11faddd583d11 Mon Sep 17 00:00:00 2001 +From: pgjones <philip.graham.jones@googlemail.com> +Date: Sun, 19 May 2024 15:03:24 +0100 +Subject: [PATCH] Fix test failures + +Catch and extract from ExceptionGroups +--- + tests/test_app.py | 14 +++++++++----- + tests/test_basic.py | 10 ++++++++-- + 2 files changed, 17 insertions(+), 7 deletions(-) + +diff --git a/tests/test_app.py b/tests/test_app.py +index b6bffb5..1585107 100644 +--- a/tests/test_app.py ++++ b/tests/test_app.py +@@ -51,8 +51,10 @@ async def handler(_: Exception) -> ResponseReturnValue: + try: + async with test_client.websocket("/ws/") as test_websocket: + await test_websocket.receive() +- except WebsocketResponseError as error: +- assert error.response.status_code == 201 ++ except BaseExceptionGroup as error: ++ for exception in error.exceptions: ++ if isinstance(exception, WebsocketResponseError): ++ assert exception.response.status_code == 201 + + + @pytest.mark.trio +@@ -68,8 +70,10 @@ async def test_websocket_exception_group_unhandled(error_app: QuartTrio) -> None + try: + async with test_client.websocket("/ws/") as test_websocket: + await test_websocket.receive() +- except WebsocketResponseError as error: +- assert error.response.status_code == 500 ++ except BaseExceptionGroup as error: ++ for exception in error.exceptions: ++ if isinstance(exception, WebsocketResponseError): ++ assert exception.response.status_code == 500 + + + @pytest.mark.trio +diff --git a/tests/test_basic.py b/tests/test_basic.py +index 5cc4c4a..a483678 100644 +--- a/tests/test_basic.py ++++ b/tests/test_basic.py +@@ -1,3 +1,4 @@ ++import sys + from pathlib import Path + + import pytest +@@ -6,6 +7,9 @@ + + from quart_trio import QuartTrio + ++if sys.version_info < (3, 11): ++ from exceptiongroup import BaseExceptionGroup ++ + + @pytest.fixture + def app() -> Quart: +@@ -53,8 +57,10 @@ async def test_websocket_abort(app: Quart) -> None: + try: + async with test_client.websocket("/ws/abort/") as test_websocket: + await test_websocket.receive() +- except WebsocketResponseError as error: +- assert error.response.status_code == 401 ++ except BaseExceptionGroup as error: ++ for exception in error.exceptions: ++ if isinstance(exception, WebsocketResponseError): ++ assert exception.response.status_code == 401 + + + @pytest.mark.trio diff --git a/dev-python/quart-trio/quart-trio-0.11.1.ebuild b/dev-python/quart-trio/quart-trio-0.11.1.ebuild index b6faca070e17..b6d0cb0fe9db 100644 --- a/dev-python/quart-trio/quart-trio-0.11.1.ebuild +++ b/dev-python/quart-trio/quart-trio-0.11.1.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=poetry -PYTHON_COMPAT=( pypy3 python3_{10..12} ) +PYTHON_COMPAT=( pypy3 python3_{10..13} ) inherit distutils-r1 @@ -37,6 +37,11 @@ BDEPEND=" distutils_enable_tests pytest +PATCHES=( + # https://github.com/pgjones/quart-trio/commit/805686abfd9963be26d59d9da9b11faddd583d11 + "${FILESDIR}/${P}-trio-0.25.patch" +) + python_test() { local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 epytest -o addopts= -p trio |