Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusSintonen committed Jun 10, 2024
1 parent 0292921 commit 9064a6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions httpcore/_synchronization.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def current_async_backend() -> AsyncBackend:
if environment not in ("asyncio", "trio"): # pragma: nocover
raise RuntimeError("Running under an unsupported async environment.")

if environment == "asyncio" and anyio is None: # pragma: nocover
raise RuntimeError(
"Running with asyncio requires installation of 'httpcore[asyncio]'."
)

if environment == "trio" and trio is None: # pragma: nocover
raise RuntimeError(
"Running with trio requires installation of 'httpcore[trio]'."
Expand Down

0 comments on commit 9064a6c

Please sign in to comment.