Skip to content

Commit

Permalink
Update src/trio/_core/_run.py
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Grainger <[email protected]>
  • Loading branch information
A5rocks and graingert authored Nov 23, 2024
1 parent da0657d commit 2e388e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/trio/_core/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2953,9 +2953,10 @@ async def checkpoint_if_cancelled() -> None:
_KqueueStatistics as IOStatistics,
)
else: # pragma: no cover
if "eventlet" in sys.modules or "gevent" in sys.modules:
_patchers = sorted({"eventlet", "gevent"}.intersection(sys.modules.keys()))
if _patchers:
raise NotImplementedError(
"unsupported platform or primitives trio depends on are monkey-patched out",
"unsupported platform or primitives trio depends on are monkey-patched out by {_patchers}",
)
else:
raise NotImplementedError("unsupported platform")
Expand Down

0 comments on commit 2e388e5

Please sign in to comment.