Sync from SUSE:SLFO:Main python-websockets revision 7c7004a7e3680a8ffca363f21f6999dd

This commit is contained in:
Adrian Schröter 2024-09-25 17:18:46 +02:00
parent 413c6740e4
commit 09307c359b
4 changed files with 87 additions and 14 deletions

BIN
10.4.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
12.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,9 +1,77 @@
-------------------------------------------------------------------
Thu Nov 16 13:31:53 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
Wed Jan 24 16:29:29 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Disable broken tests with openssl 3.2 and python < 3.11 bsc#1217782
-------------------------------------------------------------------
Wed Dec 6 09:18:32 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 12.0:
* websockets 12.0 requires Python ≥ 3.8.
* Made convenience imports from ``websockets`` compatible with
static code analysis tools such as auto-completion in an IDE
or type checking with mypy_.
* Accepted a plain :class:`int` where an
:class:`~http.HTTPStatus` is expected.
* Added :class:`~frames.CloseCode`.
- drop py312-shutdown.patch (upstream)
-------------------------------------------------------------------
Wed Sep 20 14:58:11 UTC 2023 - Markéta Machová <mmachova@suse.com>
- Add py312-shutdown.patch to fix server shutdown on Python 3.12
-------------------------------------------------------------------
Wed May 24 11:10:45 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
- Run tests with pytest
- Disable flaky test gh#python-websockets/websockets#1322
-------------------------------------------------------------------
Sun May 14 18:45:02 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 11.0.3:
* Fixed the :mod:`threading` implementation of servers on
Windows.
-------------------------------------------------------------------
Wed May 10 06:57:26 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 11.0.2:
* Fixed a deadlock in the :mod:`threading` implementation when
closing a connection without reading all messages.
* Restored the C extension in the source distribution.
* Backwards-incompatible changes
* The Sans-I/O implementation was moved.
* The ``connection`` module was renamed to ``protocol``.
* The ``connection.Connection``, ``server.ServerConnection``,
and ``client.ClientConnection`` classes were renamed to
``protocol.Protocol``, ``server.ServerProtocol``, and
``client.ClientProtocol``.
* If you instantiate :class:`~server.ServerProtocol` or
:class:`~client.ClientProtocol` directly, make sure you are
using keyword arguments.
* Closing a connection without an empty close frame is OK.
* .. admonition:: websockets 10.0 introduces a implementation
on top of :mod:`threading`.
* It may be more convenient if you don't need to manage many
connections and you're more comfortable with :mod:`threading`
than :mod:`asyncio`.
* It is particularly suited to client applications that
establish only one connection. It may be used for servers
handling few connections.
* See :func:`~sync.client.connect` and
:func:`~sync.server.serve` for details.
* Added ``open_timeout`` to :func:`~server.serve`.
* Made it possible to close a server without closing existing
connections.
* Added :attr:`~server.ServerProtocol.select_subprotocol` to
customize negotiation of subprotocols in the Sans-I/O layer.
* Added platform-independent wheels.
* Improved error handling in :func:`~websockets.broadcast`.
* Set ``server_hostname`` automatically on TLS connections when
providing a ``sock`` argument to :func:`~sync.client.connect`.
-------------------------------------------------------------------
Fri Apr 21 12:38:50 UTC 2023 - Dirk Müller <dmueller@suse.com>
@ -17,7 +85,7 @@ Thu Apr 13 22:45:55 UTC 2023 - Matej Cepl <mcepl@suse.com>
-------------------------------------------------------------------
Wed Nov 9 19:45:34 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to 10.4
- Update to 10.4
New features
* Validated compatibility with Python 3.11.
* Added the latency property to protocols.
@ -35,6 +103,11 @@ Sat Sep 24 16:17:47 UTC 2022 - Dirk Müller <dmueller@suse.com>
* Fixed backwards-incompatibility in 10.1 for connection handlers created with
* Avoided leaking open sockets when :func:`~client.connect` is canceled.
-------------------------------------------------------------------
Thu Jul 21 11:39:54 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Include in SLE-15 (bsc#1199282, jsc#PM-3243, jsc#SLE-24629)
-------------------------------------------------------------------
Fri Feb 4 22:08:32 UTC 2022 - Dirk Müller <dmueller@suse.com>
@ -46,9 +119,9 @@ Fri Feb 4 22:08:32 UTC 2022 - Dirk Müller <dmueller@suse.com>
If you implemented the connection handler of a server as::
async def handler(request, path):
...
You should replace it by::
async def handler(request):
path = request.path # if handler() uses the path argument
...

View File

@ -1,7 +1,7 @@
#
# spec file for package python-websockets
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,19 +16,16 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define skip_python36 1
%{?sle15_python_module_pythons}
Name: python-websockets
Version: 10.4
Version: 12.0
Release: 0
Summary: An implementation of the WebSocket Protocol (RFC 6455)
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/aaugustin/websockets
Source: https://github.com/aaugustin/websockets/archive/%{version}.tar.gz
BuildRequires: %{python_module devel >= 3.7}
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@ -59,7 +56,10 @@ export CFLAGS="%{optflags}"
# Test execution speed depends on BS load and architecture, relax
export WEBSOCKETS_TESTS_TIMEOUT_FACTOR=10
# Disable flaky tests gh#python-websockets/websockets#1322
%pytest_arch -v -k "not test_close_waits_for_close_frame" tests
donttest="test_close_waits_for_close_frame"
# Disable broken tests with openssl 3.2 and python < 3.11
donttest+=" or test_reject_invalid_server_certificate"
%pytest_arch -v -k "not ($donttest)" tests
%files %{python_files}
%license LICENSE