mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/quart-trio: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user