summaryrefslogtreecommitdiff
path: root/dev-python
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2025-02-16 18:18:05 +0100
committerMichał Górny <mgorny@gentoo.org>2025-02-16 19:43:55 +0100
commitb6acd6fc03bb5d6b388de87c9ab35d180087d629 (patch)
tree4d130afee2c6bdf8564724c0d10ff310832fa393 /dev-python
parenta1e7d1e7a213a08d6acc94d6b10628259ba49517 (diff)
downloadgentoo-b6acd6fc03bb5d6b388de87c9ab35d180087d629.tar.gz
gentoo-b6acd6fc03bb5d6b388de87c9ab35d180087d629.tar.bz2
gentoo-b6acd6fc03bb5d6b388de87c9ab35d180087d629.zip
dev-python/httpx: Add a patch for testing w/ httptools installed
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/httpx/files/httpx-0.28.1-httptools-test.patch13
-rw-r--r--dev-python/httpx/httpx-0.28.1.ebuild5
2 files changed, 17 insertions, 1 deletions
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 0ff19a8720d7..e81f5045d086 100644
--- a/dev-python/httpx/httpx-0.28.1.ebuild
+++ b/dev-python/httpx/httpx-0.28.1.ebuild
@@ -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