* [gentoo-commits] repo/gentoo:master commit in: dev-python/quart-trio/, dev-python/quart-trio/files/
@ 2024-06-14 15:55 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2024-06-14 15:55 UTC (permalink / raw
To: gentoo-commits
commit: 694cf260c304be0a7c27171b566e75bc73a737a5
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 15:51:40 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 15:54:55 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=694cf260
dev-python/quart-trio: Backport a test fix for new trio
Closes: https://bugs.gentoo.org/927347
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
.../files/quart-trio-0.11.1-trio-0.25.patch | 73 ++++++++++++++++++++++
dev-python/quart-trio/quart-trio-0.11.1.ebuild | 5 ++
2 files changed, 78 insertions(+)
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..f09365444ebe 100644
--- a/dev-python/quart-trio/quart-trio-0.11.1.ebuild
+++ b/dev-python/quart-trio/quart-trio-0.11.1.ebuild
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/quart-trio/, dev-python/quart-trio/files/
@ 2025-01-25 11:05 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2025-01-25 11:05 UTC (permalink / raw
To: gentoo-commits
commit: c595c8838f7bd7b88c7c93f44a43873ccd448ed8
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 10:49:29 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 11:05:28 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c595c883
dev-python/quart-trio: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/quart-trio/Manifest | 1 -
.../files/quart-trio-0.11.1-trio-0.25.patch | 73 ----------------------
dev-python/quart-trio/quart-trio-0.11.1.ebuild | 48 --------------
3 files changed, 122 deletions(-)
diff --git a/dev-python/quart-trio/Manifest b/dev-python/quart-trio/Manifest
index d8741725361f..63ec01085e57 100644
--- a/dev-python/quart-trio/Manifest
+++ b/dev-python/quart-trio/Manifest
@@ -1,2 +1 @@
-DIST quart-trio-0.11.1.gh.tar.gz 18568 BLAKE2B faabf4204a82dcc70e41d1d1ec7171c89386f2e40979c20501890d9bc27eb2af693bc791a9015a9c4c676a5e25ec69dc4975a0cd09987cd14f699a04442d54da SHA512 8ea20c36c772eff3e2b0a83a4c325cd223c19b3d7e1e51e7378897bd11479db2c8015d2e8c4713721070fc413f42b19f844a3966a0d06d299439cf514b0b3291
DIST quart_trio-0.12.0.tar.gz 14979 BLAKE2B 7a7ffaba59e6984001941c1c54cfab189434366ab1b56d6509567c79560d916e2a5f0c81e8f23e17462de17d012d77eda3803cc8828a5378b3b92c1bab00e475 SHA512 70b1f2406185b020f999cb335c2c13599faf9c36c69f8adc437fbb846158f659e8d6527199083f9674e75c99bcd10dbf228dbd62ca7c5614b471c462b22227ee
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
deleted file mode 100644
index f95a253d06e9..000000000000
--- a/dev-python/quart-trio/files/quart-trio-0.11.1-trio-0.25.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-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
deleted file mode 100644
index ec8cf463b5d3..000000000000
--- a/dev-python/quart-trio/quart-trio-0.11.1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=poetry
-PYTHON_COMPAT=( pypy3 python3_{10..13} )
-
-inherit distutils-r1
-
-DESCRIPTION="A Quart extension to provide trio support"
-HOMEPAGE="
- https://github.com/pgjones/quart-trio/
- https://pypi.org/project/quart-trio/
-"
-# no tests in sdist, as of 0.11.1
-SRC_URI="
- https://github.com/pgjones/quart-trio/archive/${PV}.tar.gz
- -> ${P}.gh.tar.gz
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-
-RDEPEND="
- >=dev-python/exceptiongroup-1.0.0[${PYTHON_USEDEP}]
- >=dev-python/hypercorn-0.12.0[${PYTHON_USEDEP}]
- >=dev-python/quart-0.19[${PYTHON_USEDEP}]
- >=dev-python/trio-0.19.0[${PYTHON_USEDEP}]
-"
-BDEPEND="
- test? (
- dev-python/pytest-trio[${PYTHON_USEDEP}]
- )
-"
-
-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
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-25 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-25 11:05 [gentoo-commits] repo/gentoo:master commit in: dev-python/quart-trio/, dev-python/quart-trio/files/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2024-06-14 15:55 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox