diff options
Diffstat (limited to 'dev-python/httpx')
-rw-r--r-- | dev-python/httpx/Manifest | 3 | ||||
-rw-r--r-- | dev-python/httpx/files/httpx-0.27.0-opt-trio.patch | 17 | ||||
-rw-r--r-- | dev-python/httpx/httpx-0.27.0.ebuild | 17 |
3 files changed, 33 insertions, 4 deletions
diff --git a/dev-python/httpx/Manifest b/dev-python/httpx/Manifest index 3117db678f8c..439f41a6b466 100644 --- a/dev-python/httpx/Manifest +++ b/dev-python/httpx/Manifest @@ -1,3 +1,4 @@ +AUX httpx-0.27.0-opt-trio.patch 506 BLAKE2B da0ccdd398a706a16e21f93ffdc6c9c6d6d0622361f99bc956810e501eb8d82015beaf4274bb396eca0d8d22a833319ad6389271705662b0346839d9158a1d8f SHA512 629cb4e557f3a69af754f115cc8cd0e152d7e046b984aea4db808a1ac6b09302f9231e639c3edaeb169474d83ac2f5c8e69a28d7288e4c10635e4812880e19fa DIST httpx-0.27.0.gh.tar.gz 2168004 BLAKE2B 2bfe58ffa9bd75b602acf844967d399c2173499981e73296bfc0726ee738219031ac3ac04517dd027f769966b77bf225287490c55435a53aec44b9784a0c4b2e SHA512 9db19cced6554effdb5fb0b442cbe05dc66cbfbdb23e8fbc19f43e1acc81028bca9e0fba5d2dae617b19be9f64baa0f02e727e92fef3f3f1288aa19ae07f35c6 -EBUILD httpx-0.27.0.ebuild 2019 BLAKE2B cd24389a6c4b118229cd52ed37e745f3be248f39be71a5b9618a2d643d68a84a0126541c01afab98b3185873ba3a631896d908a5295c3d5aac4bb08704cec5ac SHA512 27c86a50493b1ac70183f6943a33738b69d264aa03cb1e5d445ddf64505b89e3548fbfd62f69dba331ecaedf56f41f11f2989025fa18888665d4073a66aaf6c2 +EBUILD httpx-0.27.0.ebuild 2257 BLAKE2B 4ea0cb786676a9ab9b30b5f45d7b1eb22575adf3083bd01ef8d0c647559f06d28809c01460c3079cb2fe7880d473e0e7204c9f9fb188cf08d786a8c01f7db095 SHA512 a8c1c64e34fac47fa1d173bc34d6279ee9c635c8cfec9229ecb0ef26b960494a53545e8b5f459fa188a99d5eb62563fabfeaa0ed7da319c533d340e6f7b08b8d MISC metadata.xml 518 BLAKE2B 063b5b95529cd5a31aac83998c0acbdfef208c34e931c96ae8ee767a326301a597a8297514b5c97bef2b3b706b8938d38c0e5f5d752307a9dd06984792c799a2 SHA512 3a29dffa0f951255a67468b28917590d4108ca12e14af03bfddef80f6d48e266fcccdd991e778ab9e267c0bc76ff0017e07905c1f2f45dc440a9af89f6cae6aa 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 108c55923dff..0a648891634c 100644 --- a/dev-python/httpx/httpx-0.27.0.ebuild +++ b/dev-python/httpx/httpx-0.27.0.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=hatchling -PYTHON_COMPAT=( pypy3 python3_{10..12} ) +PYTHON_COMPAT=( pypy3 python3_{10..13} ) inherit distutils-r1 optfeature @@ -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() { |