From 6c84bfcad2d05e619190e2b5c5d99230d7eefe42 Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Mon, 17 Feb 2025 06:53:57 +0000 Subject: Adding metadata --- dev-python/httpx/files/httpx-0.28.1-httptools-test.patch | 13 +++++++++++++ dev-python/httpx/httpx-0.28.1.ebuild | 7 +++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 dev-python/httpx/files/httpx-0.28.1-httptools-test.patch (limited to 'dev-python/httpx') diff --git a/dev-python/httpx/files/httpx-0.28.1-httptools-test.patch b/dev-python/httpx/files/httpx-0.28.1-httptools-test.patch new file mode 100644 index 000000000000..2170c3674647 --- /dev/null +++ b/dev-python/httpx/files/httpx-0.28.1-httptools-test.patch @@ -0,0 +1,13 @@ +diff --git a/tests/conftest.py b/tests/conftest.py +index 970c353..1ea3aa9 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -304,7 +304,7 @@ def serve_in_thread(server: Server): + + @pytest.fixture(scope="session") + def server() -> typing.Iterator[TestServer]: +- config = Config(app=app, lifespan="off", loop="asyncio") ++ config = Config(app=app, lifespan="off", loop="asyncio", http="h11") + server = TestServer(config=config) + yield from serve_in_thread(server) + diff --git a/dev-python/httpx/httpx-0.28.1.ebuild b/dev-python/httpx/httpx-0.28.1.ebuild index b246271f74c9..b7b30c90caeb 100644 --- a/dev-python/httpx/httpx-0.28.1.ebuild +++ b/dev-python/httpx/httpx-0.28.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2024 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -52,7 +52,6 @@ BDEPEND=" $(python_gen_cond_dep ' dev-python/trio[${PYTHON_USEDEP}] ' 3.{10..13}) - !!dev-python/httptools[${PYTHON_USEDEP}] ) " @@ -61,6 +60,10 @@ distutils_enable_tests pytest src_prepare() { local PATCHES=( "${FILESDIR}/${PN}-0.27.0-opt-trio.patch" + # fix test failures when httptools are installed + # https://github.com/encode/httpx/discussions/3429 + # https://gitlab.archlinux.org/archlinux/packaging/packages/python-httpx/-/blob/main/uvicorn-test-server-use-h11.diff + "${FILESDIR}/${PN}-0.28.1-httptools-test.patch" ) if ! use cli; then -- cgit v1.3