gentoo/dev-python/httpx/files/httpx-0.27.0-opt-trio.patch
Michał Górny a817b977fe
dev-python/httpx: Enable py3.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-05-15 19:53:55 +02:00

18 lines
506 B
Diff

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)