From 32d6f6383807ae7213dd11a3555e59ef00c94534b2ab5bc3feae82fa17a9cfcd Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Thu, 25 Apr 2024 08:20:46 +0000 Subject: [PATCH] - Add upstream patch fix-wamp-tests.patch to make it work with modern python-pytest-asyncio package gh#crossbario/autobahn-python#1631 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-autobahn?expand=0&rev=71 --- fix-wamp-tests.patch | 33 +++++++++++++++++++++++++++++++++ python-autobahn.changes | 6 ++++++ python-autobahn.spec | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 fix-wamp-tests.patch diff --git a/fix-wamp-tests.patch b/fix-wamp-tests.patch new file mode 100644 index 0000000..46ef98c --- /dev/null +++ b/fix-wamp-tests.patch @@ -0,0 +1,33 @@ +diff --git a/autobahn/wamp/test/test_wamp_component_aio.py b/autobahn/wamp/test/test_wamp_component_aio.py +index 168933ea5..2de9bf358 100644 +--- a/autobahn/wamp/test/test_wamp_component_aio.py ++++ b/autobahn/wamp/test/test_wamp_component_aio.py +@@ -35,7 +35,7 @@ + + @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+") + @pytest.mark.asyncio(forbid_global_loop=True) +- def test_asyncio_component(event_loop): ++ async def test_asyncio_component(event_loop): + orig_loop = txaio.config.loop + txaio.config.loop = event_loop + +@@ -72,11 +72,11 @@ def done(f): + txaio.config.loop = orig_loop + assert comp._done_f is None + f.add_done_callback(done) +- return finished ++ await finished + + @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+") + @pytest.mark.asyncio(forbid_global_loop=True) +- def test_asyncio_component_404(event_loop): ++ async def test_asyncio_component_404(event_loop): + """ + If something connects but then gets aborted, it should still try + to re-connect (in real cases this could be e.g. wrong path, +@@ -151,4 +151,4 @@ def done(f): + finished.set_result(None) + txaio.config.loop = orig_loop + f.add_done_callback(done) +- return finished ++ await finished diff --git a/python-autobahn.changes b/python-autobahn.changes index f05eef2..97d23ff 100644 --- a/python-autobahn.changes +++ b/python-autobahn.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 25 08:18:43 UTC 2024 - Daniel Garcia + +- Add upstream patch fix-wamp-tests.patch to make it work with modern + python-pytest-asyncio package gh#crossbario/autobahn-python#1631 + ------------------------------------------------------------------- Thu Feb 22 03:58:14 UTC 2024 - Steve Kowalik diff --git a/python-autobahn.spec b/python-autobahn.spec index 68c9aaf..d780c63 100644 --- a/python-autobahn.spec +++ b/python-autobahn.spec @@ -31,6 +31,8 @@ URL: https://github.com/crossbario/autobahn-python Source: https://files.pythonhosted.org/packages/source/a/autobahn/autobahn-%{version}.tar.gz Patch0: respect-cflags.patch Patch1: intrin-arch.patch +# PATCH-FIX-UPSTREAM fix-wamp-tests.patch gh#crossbario/autobahn-python#1634 +Patch2: fix-wamp-tests.patch BuildRequires: %{python_module PyNaCl >= 1.4.0} BuildRequires: %{python_module Twisted >= 20.3.0} BuildRequires: %{python_module argon2-cffi >= 20.1.0}