./www/py-websockets, Implementation of the WebSocket Protocol (RFC 6455)

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 12.0, Package name: py311-websockets-12.0, Maintainer: pkgsrc-users

websockets is a library for developing WebSocket servers and clients in
Python. It implements RFC 6455 with a focus on correctness and simplicity.
It passes the Autobahn Testsuite.

Built on top of Python's asynchronous I/O support introduced in PEP 3156,
it provides an API based on coroutines, making it easy to write highly
concurrent applications.


Required to run:
[devel/py-setuptools] [lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

Filesize: 102.533 KB

Version history: (Expand)


CVS history: (Expand)


   2023-10-27 11:06:02 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-websockets: updated to 12.0

12.0

Backwards-incompatible changes

websockets 12.0 requires Python ≥ 3.8.

websockets 11.0 is the last version supporting Python 3.7.

Improvements

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`.
   2023-05-17 00:48:21 by Thomas Klausner | Files touched by this commit (3) | Package updated
Log message:
py-websockets: update to 11.0.3.

11.0.3

May 7, 2023

Bug fixes

    Fixed the threading implementation of servers on Windows.

11.0.2

April 18, 2023

Bug fixes

    Fixed a deadlock in the threading implementation when closing a connection \ 
without reading all messages.

11.0.1

April 6, 2023

Bug fixes

    Restored the C extension in the source distribution.

11.0

April 2, 2023

Backwards-incompatible changes

The Sans-I/O implementation was moved.

Aliases provide compatibility for all previously public APIs according to the \ 
backwards-compatibility policy.

    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.

Sans-I/O protocol constructors now use keyword-only arguments.

If you instantiate ServerProtocol or ClientProtocol directly, make sure you are \ 
using keyword arguments.

Closing a connection without an empty close frame is OK.

Receiving an empty close frame now results in ConnectionClosedOK instead of \ 
ConnectionClosedError.

As a consequence, calling WebSocket.close() without arguments in a browser \ 
isn’t reported as an error anymore.

serve() times out on the opening handshake after 10 seconds by default.

You can adjust the timeout with the open_timeout parameter. Set it to None to \ 
disable the timeout entirely.
New features

websockets 10.0 introduces a implementation on top of threading.

It may be more convenient if you don’t need to manage many connections and \ 
you’re more comfortable with threading than asyncio.

It is particularly suited to client applications that establish only one \ 
connection. It may be used for servers handling few connections.

See connect() and serve() for details.

    Added open_timeout to serve().

    Made it possible to close a server without closing existing connections.

    Added select_subprotocol to customize negotiation of subprotocols in the \ 
Sans-I/O layer.

Improvements

    Added platform-independent wheels.

    Improved error handling in broadcast().

    Set server_hostname automatically on TLS connections when providing a sock \ 
argument to connect().
   2022-11-06 19:45:53 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-websockets: updated to 10.4

10.4

New features

Validated compatibility with Python 3.11.
Added the latency property to protocols.
Changed ping to return the latency of the connection.
Supported overriding or removing the User-Agent header in clients and the Server \ 
header in servers.
Added deployment guides for more Platform as a Service providers.

Improvements

Improved FAQ.
   2022-04-19 14:04:38 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-websockets: updated to 10.3

10.3

Backwards-incompatible changes

The exception attribute of Request and Response is deprecated.
Use the handshake_exc attribute of ServerConnection and ClientConnection instead.
See Integrate the Sans-I/O layer for details.

Improvements

Reduced noise in logs when ssl or zlib raise exceptions.
   2022-02-21 09:23:53 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-websockets: updated to 10.2

10.2

Improvements
Made compression negotiation more lax for compatibility with Firefox.
Improved FAQ and quick start guide.

Bug fixes
Fixed backwards-incompatibility in 10.1 for connection handlers created with \ 
functools.partial().
Avoided leaking open sockets when connect() is canceled.
   2022-01-04 21:55:40 by Thomas Klausner | Files touched by this commit (1595)
Log message:
*: bump PKGREVISION for egg.mk users

They now have a tool dependency on py-setuptools instead of a DEPENDS
   2021-12-30 14:05:42 by Adam Ciarcinski | Files touched by this commit (125)
Log message:
Forget about Python 3.6
   2021-11-23 22:02:13 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-websockets: updated to 10.1

10.1

New features

Added a tutorial.

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.

Improvements

Added wheels for Python 3.10, PyPy 3.7, and for more platforms.
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.
Bug fixes

Avoided half-closing TCP connections that are already closed.

10.0

Backwards-incompatible changes

websockets 10.0 requires Python ≥ 3.7.

websockets 9.1 is the last version supporting Python 3.6.

The loop parameter is deprecated from all APIs.

This reflects a decision made in Python 3.8. See the release notes of Python \ 
3.10 for details.

The loop parameter is also removed from :class:`~server.WebSocketServer`. This \ 
should be transparent.

:func:`~client.connect` times out after 10 seconds by default.

You can adjust the timeout with the open_timeout parameter. Set it to \ 
:obj:`None` to disable the timeout entirely.

The legacy_recv option is deprecated.

See the release notes of websockets 3.0 for details.

The signature of :exc:`~exceptions.ConnectionClosed` changed.

If you raise :exc:`~exceptions.ConnectionClosed` or a subclass, rather than \ 
catch them when websockets raises them, you must change your code.

A msg parameter was added to :exc:`~exceptions.InvalidURI`.

If you raise :exc:`~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.

If you're integrating websockets in a library, rather than just using it, look \ 
at the :doc:`Sans-I/O integration guide <../howto/sansio>`.

Added compatibility with Python 3.10.
Added :func:`~websockets.broadcast` to send a message to many clients.
Added support for reconnecting automatically by using :func:`~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.
Improvements

Improved logging. See the :doc:`logging guide <../topics/logging>`.
Optimized default compression settings to reduce memory usage.
Optimized processing of client-to-server messages when the C extension isn't \ 
available.
Supported relative redirects in :func:`~client.connect`.
Handled TCP connection drops during the opening handshake.
Made it easier to customize authentication with \ 
:meth:`~auth.BasicAuthWebSocketServerProtocol.check_credentials`.
Provided additional information in :exc:`~exceptions.ConnectionClosed` exceptions.
Clarified several exceptions or log messages.
Restructured documentation.
Improved API documentation.
Extended FAQ.
Bug fixes

Avoided a crash when receiving a ping while the connection is closing.