Skip to content

Commit 9064a6c

Browse files
clean up
1 parent 0292921 commit 9064a6c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

httpcore/_synchronization.py

+5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ def current_async_backend() -> AsyncBackend:
4545
if environment not in ("asyncio", "trio"): # pragma: nocover
4646
raise RuntimeError("Running under an unsupported async environment.")
4747

48+
if environment == "asyncio" and anyio is None: # pragma: nocover
49+
raise RuntimeError(
50+
"Running with asyncio requires installation of 'httpcore[asyncio]'."
51+
)
52+
4853
if environment == "trio" and trio is None: # pragma: nocover
4954
raise RuntimeError(
5055
"Running with trio requires installation of 'httpcore[trio]'."

0 commit comments

Comments
 (0)