We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0292921 commit 9064a6cCopy full SHA for 9064a6c
httpcore/_synchronization.py
@@ -45,6 +45,11 @@ def current_async_backend() -> AsyncBackend:
45
if environment not in ("asyncio", "trio"): # pragma: nocover
46
raise RuntimeError("Running under an unsupported async environment.")
47
48
+ if environment == "asyncio" and anyio is None: # pragma: nocover
49
+ raise RuntimeError(
50
+ "Running with asyncio requires installation of 'httpcore[asyncio]'."
51
+ )
52
+
53
if environment == "trio" and trio is None: # pragma: nocover
54
raise RuntimeError(
55
"Running with trio requires installation of 'httpcore[trio]'."
0 commit comments