Subject: CVS commit: pkgsrc/www/py-websockets
From: Adam Ciarcinski
Date: 2019-11-26 20:08:55
Message id:

Log Message:
py-websockets: updated to 8.1

Added compatibility with Python 3.8.

Restored the ability to pass a socket with the sock parameter of \ 
Removed an incorrect assertion when a connection drops.

Restored the ability to import WebSocketProtocolError from websockets.


Version 8.0 drops compatibility with Python 3.4 and 3.5.

Version 8.0 expects process_request to be a coroutine.

Previously, it could be a function or a coroutine.

If you're passing a process_request argument to :func:`~server.serve` or \ 
:class:`~server.WebSocketServerProtocol`, or if you're overriding \ 
:meth:`~protocol.WebSocketServerProtocol.process_request` in a subclass, define \ 
it with async def instead of def.

For backwards compatibility, functions are still mostly supported, but mixing \ 
functions and coroutines won't work in some inheritance scenarios.

Version 8.0 changes the behavior of the max_queue parameter.

If you were setting max_queue=0 to make the queue of incoming messages \ 
unbounded, change it to max_queue=None.

Version 8.0 deprecates the host , port , and secure attributes of \ 

Use :attr:`~protocol.WebSocketCommonProtocol.local_address` in servers and \ 
:attr:`~protocol.WebSocketCommonProtocol.remote_address` in clients instead of \ 
host and port.

Version 8.0 renames the WebSocketProtocolError exception to :exc:`ProtocolError` .

A WebSocketProtocolError alias provides backwards compatibility.

Version 8.0 adds the reason phrase to the return type of the low-level API \ 
:func:`~http.read_response` .

:meth:`~protocol.WebSocketCommonProtocol.send`, \ 
:meth:``, and \ 
:meth:`~protocol.WebSocketCommonProtocol.pong` support bytes-like types \ 
:class:`bytearray` and :class:`memoryview` in addition to :class:`bytes`.
Added :exc:`~exceptions.ConnectionClosedOK` and \ 
:exc:`~exceptions.ConnectionClosedError` subclasses of \ 
:exc:`~exceptions.ConnectionClosed` to tell apart normal connection termination \ 
from errors.
Added :func:`~auth.basic_auth_protocol_factory` to enforce HTTP Basic Auth on \ 
the server side.
:func:`~client.connect` handles redirects from the server during the handshake.
:func:`~client.connect` supports overriding host and port.
Added :func:`~client.unix_connect` for connecting to Unix sockets.
Improved support for sending fragmented messages by accepting asynchronous \ 
iterators in :meth:`~protocol.WebSocketCommonProtocol.send`.
Prevented spurious log messages about :exc:`~exceptions.ConnectionClosed` \ 
exceptions in keepalive ping task. If you were using ping_timeout=None as a \ 
workaround, you can remove it.
Changed :meth:`WebSocketServer.close() <server.WebSocketServer.close>` to \ 
perform a proper closing handshake instead of failing the connection.
Avoided a crash when a extra_headers callable returns None.
Improved error messages when HTTP parsing fails.
Enabled readline in the interactive client.
Added type hints (PEP 484).
Added a FAQ to the documentation.
Added documentation for extensions.
Documented how to optimize memory usage.
Improved API documentation.