* 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)
``protocol.Protocol``, ``server.ServerProtocol``, and
- Update to 10.4
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockets?expand=0&rev=49
* 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.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockets?expand=0&rev=40
* Reduced noise in logs when :mod:`ssl` or :mod:`zlib` raise exceptions.
* Made compression negotiation more lax for compatibility with Firefox.
* Improved FAQ and quick start guide.
* Fixed backwards-incompatibility in 10.1 for connection handlers created with
* Avoided leaking open sockets when :func:`~client.connect` is canceled.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockets?expand=0&rev=34
* Made the second parameter of connection handlers optional. It will be
deprecated in the next major release. The request path is available in
the :attr:`~legacy.protocol.WebSocketCommonProtocol.path` attribute of
the first argument.
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
...
* Added ``python -m websockets --version``.
* Reverted optimization of default compression settings for clients, mainly to
avoid triggering bugs in poorly implemented servers like `AWS API Gateway`_.
* Mirrored the entire :class:`~asyncio.Server` API
in :class:`~server.WebSocketServer`.
* Improved performance for large messages on ARM processors.
* Documented how to auto-reload on code changes in development.
* Avoided half-closing TCP connections that are already closed.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockets?expand=0&rev=33
- Backwards-incompatible changes
- websockets 10.0 requires Python ≥ 3.7.
- The ``loop`` parameter is deprecated from all APIs.
The ``loop`` parameter is also removed
from `~server.WebSocketServer`. This should be transparent.
- `~client.connect` times out after 10 seconds by default.
You can adjust the timeout with the ``open_timeout`` parameter. Set it to
`None` to disable the timeout entirely.
- The ``legacy_recv`` option is deprecated.
- The signature of `~exceptions.ConnectionClosed` changed.
If you raise `~exceptions.ConnectionClosed` or a subclass, rather
than catch them when websockets raises them, you must change your code.
- A ``msg`` parameter was added to `~exceptions.InvalidURI`.
If you raise `~exceptions.InvalidURI`, rather than catch it when
websockets raises it, you must change your code.
- New features
- websockets 10.0 introduces a Sans-I/O API for easier
integration in third-party libraries.
- Added compatibility with Python 3.10.
- Added `~websockets.broadcast` to send a message to many
clients.
- Added support for reconnecting automatically by using
`~client.connect` as an asynchronous iterator.
- Added ``open_timeout`` to :func:`~client.connect`.
- Documented how to integrate with Django.
- Documented how to deploy websockets in production, with
several options.
- Documented how to authenticate connections.
- Documented how to broadcast messages to many connections.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockets?expand=0&rev=30
**Version 9.1 fixes a security issue introduced in version 8.0.**
* Restored compatibility of ``python -m websockets`` with Python < 3.9.
* Restored compatibility with mypy.
* Fixed issues with the packaging of the 9.0 release.
* :class:`~datastructures.Headers` and
:exc:`~datastructures.MultipleValuesError` were moved from
``websockets.http`` to :mod:`websockets.datastructures`. If you're using
them, you should adjust the import path.
* The ``client``, ``server``, ``protocol``, and ``auth`` modules were
moved from the ``websockets`` package to ``websockets.legacy``
sub-package, as part of an upcoming refactoring. Despite the name,
they're still fully supported. The refactoring should be a transparent
upgrade for most uses when it's available. The legacy implementation
will be preserved according to the `backwards-compatibility policy`_.
* The ``framing``, ``handshake``, ``headers``, ``http``, and ``uri``
modules in the ``websockets`` package are deprecated. These modules
provided low-level APIs for reuse by other WebSocket implementations,
but that never happened. Keeping these APIs public makes it more
difficult to improve websockets for no actual benefit.
* Added compatibility with Python 3.9.
* Added support for IRIs in addition to URIs.
* Added close codes 1012, 1013, and 1014.
* Raised an error when passing a :class:`dict` to
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockets?expand=0&rev=25