We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ed96e5 commit aa6549aCopy full SHA for aa6549a
newsfragments/99.bugfix.rst
@@ -0,0 +1,2 @@
1
+:func:`asyncio.get_running_loop()` will now return the trio-asyncio event loop
2
+(if running), instead of failing with :exc:`RuntimeError`.
trio_asyncio/_loop.py
@@ -251,6 +251,8 @@ def _new_run_get_or_throw():
251
252
_aio_event._get_running_loop = _new_run_get
253
_aio_event.get_running_loop = _new_run_get_or_throw
254
+ asyncio._get_running_loop = _new_run_get
255
+ asyncio.get_running_loop = _new_run_get_or_throw
256
257
#####
258
0 commit comments