36abbdde35
8.1 Added compatibility with Python 3.8. 8.0.2 Restored the ability to pass a socket with the sock parameter of :func:`~server.serve`. Removed an incorrect assertion when a connection drops. 8.0.1 Restored the ability to import WebSocketProtocolError from websockets. 8.0 Warning Version 8.0 drops compatibility with Python 3.4 and 3.5. Note 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. Note 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. Note Version 8.0 deprecates the host , port , and secure attributes of :class:`~protocol.WebSocketCommonProtocol`. Use :attr:`~protocol.WebSocketCommonProtocol.local_address` in servers and :attr:`~protocol.WebSocketCommonProtocol.remote_address` in clients instead of host and port. Note Version 8.0 renames the WebSocketProtocolError exception to :exc:`ProtocolError` . A WebSocketProtocolError alias provides backwards compatibility. Note Version 8.0 adds the reason phrase to the return type of the low-level API :func:`~http.read_response` . Also: :meth:`~protocol.WebSocketCommonProtocol.send`, :meth:`~protocol.WebSocketCommonProtocol.ping`, 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. |
||
---|---|---|
.. | ||
DESCR | ||
distinfo | ||
Makefile | ||
PLIST |