summaryrefslogtreecommitdiff
path: root/dev-python/httpx
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-05-16 06:03:41 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-05-16 06:03:41 +0000
commit2af89e5bf23ed490981de2dc5e80e23c64e0718b (patch)
tree121feca3885f55598d59f93717b53eea008808a8 /dev-python/httpx
parentfb68706e7161fae6137a53948cc5db6fe889ba7b (diff)
downloadbaldeagleos-repo-2af89e5bf23ed490981de2dc5e80e23c64e0718b.tar.gz
baldeagleos-repo-2af89e5bf23ed490981de2dc5e80e23c64e0718b.tar.xz
baldeagleos-repo-2af89e5bf23ed490981de2dc5e80e23c64e0718b.zip
Adding metadata
Diffstat (limited to 'dev-python/httpx')
-rw-r--r--dev-python/httpx/files/httpx-0.27.0-opt-trio.patch17
-rw-r--r--dev-python/httpx/httpx-0.27.0.ebuild15
2 files changed, 30 insertions, 2 deletions
diff --git a/dev-python/httpx/files/httpx-0.27.0-opt-trio.patch b/dev-python/httpx/files/httpx-0.27.0-opt-trio.patch
new file mode 100644
index 000000000000..6c2c9e67255f
--- /dev/null
+++ b/dev-python/httpx/files/httpx-0.27.0-opt-trio.patch
@@ -0,0 +1,17 @@
+diff --git a/tests/concurrency.py b/tests/concurrency.py
+index a8ed558..d5ce803 100644
+--- a/tests/concurrency.py
++++ b/tests/concurrency.py
+@@ -5,11 +5,11 @@ Async environment-agnostic concurrency utilities that are only used in tests.
+ import asyncio
+
+ import sniffio
+-import trio
+
+
+ async def sleep(seconds: float) -> None:
+ if sniffio.current_async_library() == "trio":
++ import trio
+ await trio.sleep(seconds) # pragma: no cover
+ else:
+ await asyncio.sleep(seconds)
diff --git a/dev-python/httpx/httpx-0.27.0.ebuild b/dev-python/httpx/httpx-0.27.0.ebuild
index c67b14c43ee3..da5b3874bb8c 100644
--- a/dev-python/httpx/httpx-0.27.0.ebuild
+++ b/dev-python/httpx/httpx-0.27.0.ebuild
@@ -44,16 +44,22 @@ BDEPEND="
dev-python/cryptography[${PYTHON_USEDEP}]
dev-python/h2[${PYTHON_USEDEP}]
dev-python/socksio[${PYTHON_USEDEP}]
- dev-python/trio[${PYTHON_USEDEP}]
dev-python/trustme[${PYTHON_USEDEP}]
dev-python/typing-extensions[${PYTHON_USEDEP}]
dev-python/uvicorn[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/trio[${PYTHON_USEDEP}]
+ ' 3.{10..12})
)
"
distutils_enable_tests pytest
src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}/${P}-opt-trio.patch"
+ )
+
if ! use cli; then
sed -i -e '/^httpx =/d' pyproject.toml || die
fi
@@ -63,6 +69,7 @@ src_prepare() {
}
python_test() {
+ local args=()
local EPYTEST_DESELECT=(
# Internet
tests/client/test_proxies.py::test_async_proxy_close
@@ -73,7 +80,11 @@ python_test() {
tests/test_main.py
)
- epytest
+ if ! has_version "dev-python/trio[${PYTHON_USEDEP}]"; then
+ args+=( -o filterwarnings= -k "not trio" )
+ fi
+
+ epytest "${args[@]}"
}
pkg_postinst() {