From b5a214fd31289c7d1db54ed80a17be94305519500d4067214eaf65db5f89735e Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Mon, 12 Dec 2022 12:45:54 +0000 Subject: [PATCH] - Add py3109-compat.patch to make it work with python 3.10.9. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-client?expand=0&rev=28 --- py3109-compat.patch | 19 +++++++++++++++++++ python-jupyter-client.changes | 5 +++++ python-jupyter-client.spec | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 py3109-compat.patch diff --git a/py3109-compat.patch b/py3109-compat.patch new file mode 100644 index 0000000..3ccfc10 --- /dev/null +++ b/py3109-compat.patch @@ -0,0 +1,19 @@ +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) diff --git a/python-jupyter-client.changes b/python-jupyter-client.changes index 7055a51..eb41c72 100644 --- a/python-jupyter-client.changes +++ b/python-jupyter-client.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 12 12:34:49 UTC 2022 - Daniel Garcia + +- Add py3109-compat.patch to make it work with python 3.10.9. + ------------------------------------------------------------------- Tue Jun 28 18:51:36 UTC 2022 - Ben Greiner diff --git a/python-jupyter-client.spec b/python-jupyter-client.spec index 8ceffc7..bfd662b 100644 --- a/python-jupyter-client.spec +++ b/python-jupyter-client.spec @@ -34,6 +34,8 @@ License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/jupyter/jupyter_client Source: https://files.pythonhosted.org/packages/source/j/jupyter_client/jupyter_client-%{version}.tar.gz +# PATCH-FIX-OPENSUSE py3109-compat.patch +Patch0: py3109-compat.patch BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} BuildRequires: fdupes