diff --git a/11.0.3.tar.gz b/11.0.3.tar.gz deleted file mode 100644 index dc8c7e2..0000000 --- a/11.0.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e412f6480c9bf8d5a58cb746a4d20df391a19017b6d2c39b136d84b0be8309c9 -size 347652 diff --git a/12.0.tar.gz b/12.0.tar.gz new file mode 100644 index 0000000..6108dd6 --- /dev/null +++ b/12.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49978ae3f2aedf1c40ce9031c547fb766deaf7e86c3ec9677f0f5991bdc160ec +size 352120 diff --git a/py312-shutdown.patch b/py312-shutdown.patch deleted file mode 100644 index 6eb25e5..0000000 --- a/py312-shutdown.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 03d62c97fcafffa5cdbe4bb55b2a8d17a62eca33 Mon Sep 17 00:00:00 2001 -From: Aymeric Augustin -Date: Thu, 18 May 2023 16:52:39 +0200 -Subject: [PATCH] Fix server shutdown on Python 3.12. - -Ref https://github.com/python/cpython/issues/79033. - -Fix #1356. ---- - src/websockets/legacy/server.py | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) - -Index: websockets-11.0.3/src/websockets/legacy/server.py -=================================================================== ---- websockets-11.0.3.orig/src/websockets/legacy/server.py -+++ websockets-11.0.3/src/websockets/legacy/server.py -@@ -765,18 +765,13 @@ class WebSocketServer: - # Stop accepting new connections. - self.server.close() - -- # Wait until self.server.close() completes. -- await self.server.wait_closed() -- - # Wait until all accepted connections reach connection_made() and call - # register(). See https://bugs.python.org/issue34852 for details. - await asyncio.sleep(0, **loop_if_py_lt_38(self.get_loop())) - - if close_connections: -- # Close OPEN connections with status code 1001. Since the server was -- # closed, handshake() closes OPENING connections with an HTTP 503 -- # error. Wait until all connections are closed. -- -+ # Close OPEN connections with close code 1001. After server.close(), -+ # handshake() closes OPENING connections with an HTTP 503 error. - close_tasks = [ - asyncio.create_task(websocket.close(1001)) - for websocket in self.websockets -@@ -789,8 +784,10 @@ class WebSocketServer: - **loop_if_py_lt_38(self.get_loop()), - ) - -- # Wait until all connection handlers are complete. -+ # Wait until all TCP connections are closed. -+ await self.server.wait_closed() - -+ # Wait until all connection handlers terminate. - # asyncio.wait doesn't accept an empty first argument. - if self.websockets: - await asyncio.wait( diff --git a/python-websockets.changes b/python-websockets.changes index ddea643..62f1b11 100644 --- a/python-websockets.changes +++ b/python-websockets.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Dec 6 09:18:32 UTC 2023 - Dirk Müller + +- 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á @@ -28,7 +41,7 @@ Wed May 10 06:57:26 UTC 2023 - Dirk Müller * The ``connection`` module was renamed to ``protocol``. * The ``connection.Connection``, ``server.ServerConnection``, and ``client.ClientConnection`` classes were renamed to - ``protocol.Protocol``, ``server.ServerProtocol``, and + ``protocol.Protocol``, ``server.ServerProtocol``, and ``client.ClientProtocol``. * If you instantiate :class:`~server.ServerProtocol` or :class:`~client.ClientProtocol` directly, make sure you are @@ -67,7 +80,7 @@ Thu Apr 13 22:45:55 UTC 2023 - Matej Cepl ------------------------------------------------------------------- Wed Nov 9 19:45:34 UTC 2022 - Yogalakshmi Arunachalam -- Update to 10.4 +- Update to 10.4 New features * Validated compatibility with Python 3.11. * Added the latency property to protocols. @@ -101,9 +114,9 @@ Fri Feb 4 22:08:32 UTC 2022 - Dirk Müller 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 ... diff --git a/python-websockets.spec b/python-websockets.spec index f634909..141ba0c 100644 --- a/python-websockets.spec +++ b/python-websockets.spec @@ -18,16 +18,14 @@ %{?sle15_python_module_pythons} Name: python-websockets -Version: 11.0.3 +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 -# PATCH-FIX-UPSTREAM https://github.com/python-websockets/websockets/commit/03d62c97fcafffa5cdbe4bb55b2a8d17a62eca33 Fix server shutdown on Python 3.12. -Patch: py312-shutdown.patch -BuildRequires: %{python_module devel >= 3.7} +BuildRequires: %{python_module devel >= 3.8} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes