14
0

Accepting request 1196099 from devel:languages:python

- Update to version 4.8.0
  * Return consistent responses after Websocket connection ends
  * Migrate Python package metadata to pyproject.toml
  * Remove Python 3.7 from builds
  * Internal code restructure (no functional changes)
- Drop python-311.patch as it is included upstream

OBS-URL: https://build.opensuse.org/request/show/1196099
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-engineio?expand=0&rev=7
This commit is contained in:
2024-08-27 17:38:44 +00:00
committed by Git OBS Bridge
5 changed files with 24 additions and 65 deletions

View File

@@ -1,54 +0,0 @@
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',

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f6ff1c3b3463a453b8eafa7a81f1dd52bd1728bf524988f9ab99b71c31a8d8e
size 300665

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2a32585d8fecd0118264fe0c39788670456ca9aa466d7c026d995cfff68af164
size 88626

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Aug 14 00:46:24 UTC 2024 - Guang Yee <gyee@suse.com>
- Update to version 4.8.0
* Return consistent responses after Websocket connection ends
* Migrate Python package metadata to pyproject.toml
* Remove Python 3.7 from builds
* Internal code restructure (no functional changes)
- Drop python-311.patch as it is included upstream
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Dec 1 16:43:25 UTC 2023 - Antonio Larrosa <alarrosa@suse.com> Fri Dec 1 16:43:25 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-python-engineio # spec file for package python-python-engineio
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,16 @@
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-python-engineio Name: python-python-engineio
Version: 4.3.4 Version: 4.8.0
Release: 0 Release: 0
Summary: EngineIO server Summary: EngineIO server
License: MIT License: MIT
URL: http://github.com/miguelgrinberg/python-engineio/ URL: http://github.com/miguelgrinberg/python-engineio/
Source: https://github.com/miguelgrinberg/python-engineio/archive/v%{version}.tar.gz#/python-engineio-%{version}.tar.gz 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 BuildRequires: %{python_module pip}
Patch0: python-311.patch
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module simple-websocket >= 0.10.0}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Recommends: python-eventlet Recommends: python-eventlet
@@ -51,17 +52,19 @@ Python implementation of the Engine.IO realtime server.
%autosetup -p1 -n python-engineio-%{version} %autosetup -p1 -n python-engineio-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
%pytest -rs -k 'not test_logger' # FIXME: disable the static files tests because the tests/async/files is missing from
# the release tarball. Hence those tests will always fail.
%pytest -rs -k 'not test_logger and not test_static_file_routing and not test_static_files'
%files %{python_files} %files %{python_files}
%doc README.rst %doc README.md
%license LICENSE %license LICENSE
%{python_sitelib}/engineio %{python_sitelib}/engineio
%{python_sitelib}/python_engineio-%{version}*-info %{python_sitelib}/python_engineio-%{version}*-info