Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-python-engineio for
openSUSE:Factory checked in at 2025-04-22 17:29:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-engineio (Old)
and /work/SRC/openSUSE:Factory/.python-python-engineio.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-engineio"
Tue Apr 22 17:29:32 2025 rev:11 rq:1271277 version:4.12.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-python-engineio/python-python-engineio.changes
2025-03-24 13:32:51.961360449 +0100
+++
/work/SRC/openSUSE:Factory/.python-python-engineio.new.30101/python-python-engineio.changes
2025-04-22 17:30:15.576062925 +0200
@@ -1,0 +2,9 @@
+Wed Apr 16 10:52:22 UTC 2025 - John Paul Adrian Glaubitz
<[email protected]>
+
+- Update to 4.12.0
+ * Optimize packet parsing to avoid unnecessary calls to
+ JSON parser (#399)
+ * Pass `environ` as a second argument to callable option
+ `cors_allowed_origins` #398)
+
+-------------------------------------------------------------------
Old:
----
python-engineio-4.11.2.tar.gz
New:
----
python-engineio-4.12.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-engineio.spec ++++++
--- /var/tmp/diff_new_pack.Ll88Uz/_old 2025-04-22 17:30:16.016081408 +0200
+++ /var/tmp/diff_new_pack.Ll88Uz/_new 2025-04-22 17:30:16.020081576 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-python-engineio
-Version: 4.11.2
+Version: 4.12.0
Release: 0
Summary: EngineIO server
License: MIT
++++++ python-engineio-4.11.2.tar.gz -> python-engineio-4.12.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-engineio-4.11.2/.github/FUNDING.yml
new/python-engineio-4.12.0/.github/FUNDING.yml
--- old/python-engineio-4.11.2/.github/FUNDING.yml 2024-12-29
20:17:38.000000000 +0100
+++ new/python-engineio-4.12.0/.github/FUNDING.yml 1970-01-01
01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-github: miguelgrinberg
-patreon: miguelgrinberg
-open_collective: python-socketio
-custom: https://paypal.me/miguelgrinberg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-engineio-4.11.2/.github/ISSUE_TEMPLATE/bug_report.md
new/python-engineio-4.12.0/.github/ISSUE_TEMPLATE/bug_report.md
--- old/python-engineio-4.11.2/.github/ISSUE_TEMPLATE/bug_report.md
2024-12-29 20:17:38.000000000 +0100
+++ new/python-engineio-4.12.0/.github/ISSUE_TEMPLATE/bug_report.md
2025-04-12 17:26:51.000000000 +0200
@@ -23,7 +23,7 @@
A clear and concise description of what you expected to happen.
**Logs**
-Please provide relevant logs from the server and the client. On the Python
server and client, add the `logger=True` and `engineio_logger=True` arguments
to your `Server()` or `Client()` objects to get logs dumped on your terminal.
If you are using the JavaScript client, see
[here](https://socket.io/docs/logging-and-debugging/) for how to enable logs.
+Please provide relevant logs from the server and the client. On the Python
server and client, add the `logger=True` and `engineio_logger=True` arguments
to your `Server()` or `Client()` objects to get logs dumped on your terminal.
If you are using the JavaScript client, see
[here](https://socket.io/docs/v4/logging-and-debugging/) for how to enable logs.
**Additional context**
Add any other context about the problem here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-engineio-4.11.2/.github/ISSUE_TEMPLATE/feature_request.md
new/python-engineio-4.12.0/.github/ISSUE_TEMPLATE/feature_request.md
--- old/python-engineio-4.11.2/.github/ISSUE_TEMPLATE/feature_request.md
2024-12-29 20:17:38.000000000 +0100
+++ new/python-engineio-4.12.0/.github/ISSUE_TEMPLATE/feature_request.md
2025-04-12 17:26:51.000000000 +0200
@@ -17,7 +17,7 @@
A clear and concise description of any alternative solutions or features
you've considered.
**Logs**
-Please provide relevant logs from the server and the client. On the Python
server and client, add the `logger=True` and `engineio_logger=True` arguments
to your `Server()` or `Client()` objects to get logs dumped on your terminal.
If you are using the JavaScript client, see
[here](https://socket.io/docs/logging-and-debugging/) for how to enable logs.
+Please provide relevant logs from the server and the client. On the Python
server and client, add the `logger=True` and `engineio_logger=True` arguments
to your `Server()` or `Client()` objects to get logs dumped on your terminal.
If you are using the JavaScript client, see
[here](https://socket.io/docs/v4/logging-and-debugging/) for how to enable logs.
**Additional context**
Add any other context or screenshots about the feature request here.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-engineio-4.11.2/CHANGES.md
new/python-engineio-4.12.0/CHANGES.md
--- old/python-engineio-4.11.2/CHANGES.md 2024-12-29 20:17:38.000000000
+0100
+++ new/python-engineio-4.12.0/CHANGES.md 2025-04-12 17:26:51.000000000
+0200
@@ -1,5 +1,10 @@
# python-engineio change log
+**Release 4.12.0** - 2025-04-12
+
+- Optimize packet parsing to avoid unnecessary calls to JSON parser
[#399](https://github.com/miguelgrinberg/python-engineio/issues/399)
([commit](https://github.com/miguelgrinberg/python-engineio/commit/2dda203103d93bc751ab0967719f18318cffc8da))
+- Pass `environ` as a second argument to callable option
`cors_allowed_origins`
[#398](https://github.com/miguelgrinberg/python-engineio/issues/398)
([commit](https://github.com/miguelgrinberg/python-engineio/commit/5cb561101dfcaed06bc9d73486515da93ead1752))
(thanks **wft-swas**!)
+
**Release 4.11.2** - 2024-12-29
- Fix incorrect disconnection reason reported when browser page is closed
([commit](https://github.com/miguelgrinberg/python-engineio/commit/132fbd9b2728c342fb989d559fa8c24b324c3cf3))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-engineio-4.11.2/examples/client/asyncio/latency_client.py
new/python-engineio-4.12.0/examples/client/asyncio/latency_client.py
--- old/python-engineio-4.11.2/examples/client/asyncio/latency_client.py
2024-12-29 20:17:38.000000000 +0100
+++ new/python-engineio-4.12.0/examples/client/asyncio/latency_client.py
2025-04-12 17:26:51.000000000 +0200
@@ -21,7 +21,6 @@
@eio.on('message')
async def on_message(data):
- global start_timer
latency = time.time() - start_timer
print(f'latency is {latency * 1000:.2f} ms')
await eio.sleep(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-engineio-4.11.2/examples/client/threads/latency_client.py
new/python-engineio-4.12.0/examples/client/threads/latency_client.py
--- old/python-engineio-4.11.2/examples/client/threads/latency_client.py
2024-12-29 20:17:38.000000000 +0100
+++ new/python-engineio-4.12.0/examples/client/threads/latency_client.py
2025-04-12 17:26:51.000000000 +0200
@@ -19,7 +19,6 @@
@eio.on('message')
def on_message(data):
- global start_timer
latency = time.time() - start_timer
print(f'latency is {latency * 1000:.2f} ms')
eio.sleep(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-engineio-4.11.2/pyproject.toml
new/python-engineio-4.12.0/pyproject.toml
--- old/python-engineio-4.11.2/pyproject.toml 2024-12-29 20:17:38.000000000
+0100
+++ new/python-engineio-4.12.0/pyproject.toml 2025-04-12 17:26:51.000000000
+0200
@@ -1,6 +1,6 @@
[project]
name = "python-engineio"
-version = "4.11.2"
+version = "4.12.0"
authors = [{name = "Miguel Grinberg", email = "[email protected]"}]
description = "Engine.IO server and client for Python"
classifiers = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-engineio-4.11.2/src/engineio/base_server.py
new/python-engineio-4.12.0/src/engineio/base_server.py
--- old/python-engineio-4.11.2/src/engineio/base_server.py 2024-12-29
20:17:38.000000000 +0100
+++ new/python-engineio-4.12.0/src/engineio/base_server.py 2025-04-12
17:26:51.000000000 +0200
@@ -282,29 +282,33 @@
'response': message.encode('utf-8')}
def _cors_allowed_origins(self, environ):
- default_origins = []
- if 'wsgi.url_scheme' in environ and 'HTTP_HOST' in environ:
- default_origins.append('{scheme}://{host}'.format(
- scheme=environ['wsgi.url_scheme'], host=environ['HTTP_HOST']))
- if 'HTTP_X_FORWARDED_PROTO' in environ or \
- 'HTTP_X_FORWARDED_HOST' in environ:
- scheme = environ.get(
- 'HTTP_X_FORWARDED_PROTO',
- environ['wsgi.url_scheme']).split(',')[0].strip()
- default_origins.append('{scheme}://{host}'.format(
- scheme=scheme, host=environ.get(
- 'HTTP_X_FORWARDED_HOST', environ['HTTP_HOST']).split(
- ',')[0].strip()))
if self.cors_allowed_origins is None:
- allowed_origins = default_origins
+ allowed_origins = []
+ if 'wsgi.url_scheme' in environ and 'HTTP_HOST' in environ:
+ allowed_origins.append('{scheme}://{host}'.format(
+ scheme=environ['wsgi.url_scheme'],
+ host=environ['HTTP_HOST']))
+ if 'HTTP_X_FORWARDED_PROTO' in environ or \
+ 'HTTP_X_FORWARDED_HOST' in environ:
+ scheme = environ.get(
+ 'HTTP_X_FORWARDED_PROTO',
+ environ['wsgi.url_scheme']).split(',')[0].strip()
+ allowed_origins.append('{scheme}://{host}'.format(
+ scheme=scheme, host=environ.get(
+ 'HTTP_X_FORWARDED_HOST',
+ environ['HTTP_HOST']).split(
+ ',')[0].strip()))
elif self.cors_allowed_origins == '*':
allowed_origins = None
elif isinstance(self.cors_allowed_origins, str):
allowed_origins = [self.cors_allowed_origins]
elif callable(self.cors_allowed_origins):
origin = environ.get('HTTP_ORIGIN')
- allowed_origins = [origin] \
- if self.cors_allowed_origins(origin) else []
+ try:
+ is_allowed = self.cors_allowed_origins(origin, environ)
+ except TypeError:
+ is_allowed = self.cors_allowed_origins(origin)
+ allowed_origins = [origin] if is_allowed else []
else:
allowed_origins = self.cors_allowed_origins
return allowed_origins
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-engineio-4.11.2/src/engineio/packet.py
new/python-engineio-4.12.0/src/engineio/packet.py
--- old/python-engineio-4.11.2/src/engineio/packet.py 2024-12-29
20:17:38.000000000 +0100
+++ new/python-engineio-4.12.0/src/engineio/packet.py 2025-04-12
17:26:51.000000000 +0200
@@ -72,11 +72,11 @@
else:
self.packet_type = int(encoded_packet[0])
try:
- self.data = self.json.loads(encoded_packet[1:])
- if isinstance(self.data, int):
+ if encoded_packet[1].isnumeric():
# do not allow integer payloads, see
# github.com/miguelgrinberg/python-engineio/issues/75
# for background on this decision
raise ValueError
- except ValueError:
+ self.data = self.json.loads(encoded_packet[1:])
+ except (ValueError, IndexError):
self.data = encoded_packet[1:]