diff --git a/python-311.patch b/python-311.patch new file mode 100644 index 0000000..0ad4f76 --- /dev/null +++ b/python-311.patch @@ -0,0 +1,54 @@ +diff --git a/tests/asyncio/test_asyncio_server.py b/tests/asyncio/test_asyncio_server.py +index 47b3e6e..a55e1e0 100644 +--- a/tests/asyncio/test_asyncio_server.py ++++ b/tests/asyncio/test_asyncio_server.py +@@ -278,9 +278,9 @@ def test_connect_custom_ping_times(self, import_module): + assert packets[0].data['pingTimeout'] == 123000 + assert packets[0].data['pingInterval'] == 456000 + +- @mock.patch('engineio.asyncio_socket.AsyncSocket') + @mock.patch('importlib.import_module') +- def test_connect_bad_poll(self, import_module, AsyncSocket): ++ @mock.patch('engineio.asyncio_server.asyncio_socket.AsyncSocket') ++ def test_connect_bad_poll(self, AsyncSocket, import_module): + a = self.get_async_mock() + import_module.side_effect = [a] + AsyncSocket.return_value = self._get_mock_socket() +@@ -290,9 +290,9 @@ def test_connect_bad_poll(self, import_module, AsyncSocket): + assert a._async['make_response'].call_count == 1 + assert a._async['make_response'].call_args[0][0] == '400 BAD REQUEST' + +- @mock.patch('engineio.asyncio_socket.AsyncSocket') + @mock.patch('importlib.import_module') +- def test_connect_transport_websocket(self, import_module, AsyncSocket): ++ @mock.patch('engineio.asyncio_server.asyncio_socket.AsyncSocket') ++ def test_connect_transport_websocket(self, AsyncSocket, import_module): + a = self.get_async_mock( + { + 'REQUEST_METHOD': 'GET', +@@ -312,9 +312,9 @@ def test_connect_transport_websocket(self, import_module, AsyncSocket): + == packet.OPEN + ) + +- @mock.patch('engineio.asyncio_socket.AsyncSocket') + @mock.patch('importlib.import_module') +- def test_http_upgrade_case_insensitive(self, import_module, AsyncSocket): ++ @mock.patch('engineio.asyncio_server.asyncio_socket.AsyncSocket') ++ def test_http_upgrade_case_insensitive(self, AsyncSocket, import_module): + a = self.get_async_mock( + { + 'REQUEST_METHOD': 'GET', +@@ -334,11 +334,10 @@ def test_http_upgrade_case_insensitive(self, import_module, AsyncSocket): + == packet.OPEN + ) + +- @mock.patch('engineio.asyncio_socket.AsyncSocket') + @mock.patch('importlib.import_module') ++ @mock.patch('engineio.asyncio_server.asyncio_socket.AsyncSocket') + def test_connect_transport_websocket_closed( +- self, import_module, AsyncSocket +- ): ++ self, AsyncSocket, import_module): + a = self.get_async_mock( + { + 'REQUEST_METHOD': 'GET', diff --git a/python-python-engineio.changes b/python-python-engineio.changes index 36c7d1a..48fdb6f 100644 --- a/python-python-engineio.changes +++ b/python-python-engineio.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 21 10:05:49 UTC 2023 - Daniel Garcia + +- Add python-311.patch to support python 3.11, + gh#miguelgrinberg/python-engineio@ac3911356fbe + ------------------------------------------------------------------- Thu Oct 6 22:22:07 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-python-engineio.spec b/python-python-engineio.spec index d58accc..4608593 100644 --- a/python-python-engineio.spec +++ b/python-python-engineio.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-engineio # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-python-engineio Version: 4.3.4 @@ -25,6 +24,8 @@ Summary: EngineIO server License: MIT URL: http://github.com/miguelgrinberg/python-engineio/ Source: https://github.com/miguelgrinberg/python-engineio/archive/v%{version}.tar.gz#/python-engineio-%{version}.tar.gz +# PATCH-FIX-UPSTREAM python-311.patch gh#miguelgrinberg/python-engineio@ac3911356fbe +Patch0: python-311.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -47,7 +48,7 @@ BuildRequires: %{python_module websocket-client >= 0.54.0} Python implementation of the Engine.IO realtime server. %prep -%setup -q -n python-engineio-%{version} +%autosetup -p1 -n python-engineio-%{version} %build %python_build