forked from pool/python-jupyter-client
Daniel Garcia
b5a214fd31
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-client?expand=0&rev=28
20 lines
799 B
Diff
20 lines
799 B
Diff
Index: jupyter_client-7.3.4/jupyter_client/utils.py
|
|
===================================================================
|
|
--- jupyter_client-7.3.4.orig/jupyter_client/utils.py
|
|
+++ jupyter_client-7.3.4/jupyter_client/utils.py
|
|
@@ -13,12 +13,8 @@ def run_sync(coro):
|
|
try:
|
|
loop = asyncio.get_running_loop()
|
|
except RuntimeError:
|
|
- # Workaround for bugs.python.org/issue39529.
|
|
- try:
|
|
- loop = asyncio.get_event_loop_policy().get_event_loop()
|
|
- except RuntimeError:
|
|
- loop = asyncio.new_event_loop()
|
|
- asyncio.set_event_loop(loop)
|
|
+ loop = asyncio.new_event_loop()
|
|
+ asyncio.set_event_loop(loop)
|
|
import nest_asyncio # type: ignore
|
|
|
|
nest_asyncio.apply(loop)
|