From 687faaee9b256901264397dadd8505c2cc9b95f9680ead14e3c4f311c209db68 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 10 Dec 2024 06:11:32 +0000 Subject: [PATCH] - Update to 24.6.2: * unit test fixes (#1634) * bump minimum twisted to 24.3.0 (#1635) * a couple of packaging fixes (#1632) * update license file to include contributors (#1628) * Random ID should beginning with 1 (#1637) - Drop patch fix-wamp-tests.patch, included upstream. - Add patch support-new-pytest-asyncio.patch: * Support even more pytest-asyncio. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-autobahn?expand=0&rev=73 --- autobahn-23.6.2.tar.gz | 3 -- autobahn-24.4.2.tar.gz | 3 ++ fix-wamp-tests.patch | 33 -------------- python-autobahn.changes | 13 ++++++ python-autobahn.spec | 17 ++++--- support-new-pytest-asyncio.patch | 78 ++++++++++++++++++++++++++++++++ 6 files changed, 105 insertions(+), 42 deletions(-) delete mode 100644 autobahn-23.6.2.tar.gz create mode 100644 autobahn-24.4.2.tar.gz delete mode 100644 fix-wamp-tests.patch create mode 100644 support-new-pytest-asyncio.patch diff --git a/autobahn-23.6.2.tar.gz b/autobahn-23.6.2.tar.gz deleted file mode 100644 index baf6e6c..0000000 --- a/autobahn-23.6.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec9421c52a2103364d1ef0468036e6019ee84f71721e86b36fe19ad6966c1181 -size 480814 diff --git a/autobahn-24.4.2.tar.gz b/autobahn-24.4.2.tar.gz new file mode 100644 index 0000000..1b6c5f9 --- /dev/null +++ b/autobahn-24.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2d71ef1b0cf780b6d11f8b205fd2c7749765e65795f2ea7d823796642ee92c9 +size 482700 diff --git a/fix-wamp-tests.patch b/fix-wamp-tests.patch deleted file mode 100644 index 46ef98c..0000000 --- a/fix-wamp-tests.patch +++ /dev/null @@ -1,33 +0,0 @@ -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 97d23ff..9c75f00 100644 --- a/python-autobahn.changes +++ b/python-autobahn.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Dec 10 06:10:04 UTC 2024 - Steve Kowalik + +- Update to 24.6.2: + * unit test fixes (#1634) + * bump minimum twisted to 24.3.0 (#1635) + * a couple of packaging fixes (#1632) + * update license file to include contributors (#1628) + * Random ID should beginning with 1 (#1637) +- Drop patch fix-wamp-tests.patch, included upstream. +- Add patch support-new-pytest-asyncio.patch: + * Support even more pytest-asyncio. + ------------------------------------------------------------------- Thu Apr 25 08:18:43 UTC 2024 - Daniel Garcia diff --git a/python-autobahn.spec b/python-autobahn.spec index d780c63..182e67c 100644 --- a/python-autobahn.spec +++ b/python-autobahn.spec @@ -23,7 +23,7 @@ %endif Name: python-autobahn -Version: 23.6.2 +Version: 24.4.2 Release: 0 Summary: WebSocket and WAMP in Python for Twisted and asyncio License: MIT @@ -31,15 +31,16 @@ 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 +# PATCH-FIX-UPSTREAM gh#crossbario/autobahn-python#1647 +Patch2: support-new-pytest-asyncio.patch BuildRequires: %{python_module PyNaCl >= 1.4.0} -BuildRequires: %{python_module Twisted >= 20.3.0} +BuildRequires: %{python_module Twisted >= 24.3.0} BuildRequires: %{python_module argon2-cffi >= 20.1.0} BuildRequires: %{python_module attrs >= 20.3.0} BuildRequires: %{python_module cbor2 >= 5.2.0} BuildRequires: %{python_module cffi >= 1.14.5} -BuildRequires: %{python_module devel} +BuildRequires: %{python_module cryptography >= 3.4.6} +BuildRequires: %{python_module devel >= 3.9} BuildRequires: %{python_module flatbuffers >= 22.12.6} BuildRequires: %{python_module hyperlink >= 21.0.0} BuildRequires: %{python_module msgpack >= 1.0.2} @@ -51,6 +52,7 @@ BuildRequires: %{python_module pytest >= 2.8.6} BuildRequires: %{python_module pytest-aiohttp} BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytrie >= 0.4.0} +BuildRequires: %{python_module qrcode >= 7.3.1} BuildRequires: %{python_module service_identity >= 18.1.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module txaio >= 21.2.1} @@ -61,11 +63,12 @@ BuildRequires: %{python_module zope.interface >= 5.2.0} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-PyNaCl >= 1.4.0 -Requires: python-Twisted >= 20.3.0 +Requires: python-Twisted >= 24.3.0 Requires: python-argon2-cffi >= 20.1.0 Requires: python-attrs >= 20.3.0 Requires: python-cbor2 >= 5.2.0 Requires: python-cffi >= 1.14.5 +Requires: python-cryptography >= 3.4.6 Requires: python-flatbuffers >= 22.12.6 Requires: python-hyperlink >= 21.0.0 Requires: python-msgpack >= 1.0.2 @@ -73,7 +76,9 @@ Requires: python-passlib >= 1.7.4 Requires: python-py-ubjson >= 0.16.1 Requires: python-pyOpenSSL >= 20.0.1 Requires: python-pytrie >= 0.4.0 +Requires: python-qrcode >= 7.3.1 Requires: python-service_identity >= 18.1.0 +Requires: python-setuptools Requires: python-txaio >= 21.2.1 Requires: python-ujson >= 4.0.2 Requires: python-wsaccel >= 0.6.3 diff --git a/support-new-pytest-asyncio.patch b/support-new-pytest-asyncio.patch new file mode 100644 index 0000000..45da488 --- /dev/null +++ b/support-new-pytest-asyncio.patch @@ -0,0 +1,78 @@ +From b8d88d02fe9458a084cf6c4a4ce4672b3cd7c4aa Mon Sep 17 00:00:00 2001 +From: David Hotham +Date: Sat, 3 Aug 2024 22:01:10 +0100 +Subject: [PATCH] fix some deprecations in tests + +--- + autobahn/asyncio/test/test_aio_websocket.py | 7 +++---- + autobahn/wamp/test/test_wamp_component_aio.py | 12 ++++++------ + 2 files changed, 9 insertions(+), 10 deletions(-) + +diff --git a/autobahn/asyncio/test/test_aio_websocket.py b/autobahn/asyncio/test/test_aio_websocket.py +index f80cc2499..afcbfcf9e 100644 +--- a/autobahn/asyncio/test/test_aio_websocket.py ++++ b/autobahn/asyncio/test/test_aio_websocket.py +@@ -21,7 +21,6 @@ async def test_echo_async(): + assert 'Hello!' == await echo_async('Hello!', 0) + + +-# @pytest.mark.asyncio(forbid_global_loop=True) + @pytest.mark.skipif(not os.environ.get('USE_ASYNCIO', False), reason='test runs on asyncio only') + def test_websocket_custom_loop(event_loop): + factory = WebSocketServerFactory(loop=event_loop) +@@ -31,8 +30,7 @@ def test_websocket_custom_loop(event_loop): + + + @pytest.mark.skipif(not os.environ.get('USE_ASYNCIO', False), reason='test runs on asyncio only') +-@pytest.mark.asyncio +-async def test_async_on_connect_server(event_loop): ++def test_async_on_connect_server(event_loop): + + num = 42 + done = txaio.create_future() +@@ -65,7 +63,8 @@ async def on_connect(req): + b'\r\n', # last string doesn't get a \r\n from join() + ]) + server.processHandshake() +- await done ++ ++ event_loop.run_until_complete(done) + + assert len(values) == 1 + assert values[0] == num * num +diff --git a/autobahn/wamp/test/test_wamp_component_aio.py b/autobahn/wamp/test/test_wamp_component_aio.py +index 2de9bf358..2393fd7c6 100644 +--- a/autobahn/wamp/test/test_wamp_component_aio.py ++++ b/autobahn/wamp/test/test_wamp_component_aio.py +@@ -34,8 +34,7 @@ + from autobahn.asyncio.component import Component + + @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+") +- @pytest.mark.asyncio(forbid_global_loop=True) +- async def test_asyncio_component(event_loop): ++ def test_asyncio_component(event_loop): + orig_loop = txaio.config.loop + txaio.config.loop = event_loop + +@@ -72,11 +71,11 @@ def done(f): + txaio.config.loop = orig_loop + assert comp._done_f is None + f.add_done_callback(done) +- await finished ++ ++ event_loop.run_until_complete(finished) + + @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+") +- @pytest.mark.asyncio(forbid_global_loop=True) +- async def test_asyncio_component_404(event_loop): ++ 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 +150,5 @@ def done(f): + finished.set_result(None) + txaio.config.loop = orig_loop + f.add_done_callback(done) +- await finished ++ ++ event_loop.run_until_complete(finished)