Upgrading websockets 15 to 16
Unknown15.0.1 → 16.1.1
UnknownUpgrade verdict
DepDelta found no changes in this range's notes, so it can't call it safe.
In plain terms
- The notes in this range list no changes DepDelta could read.
- Read the commits and the notes before upgrading.
Must act No changes found in the notes
That doesn't make this range safe. Read the notes and the commits before upgrading.
Python requirement changed in 16.0: >=3.9 → >=3.10.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
method Connection.abort_pings() -> None - changed:
async method Connection.close(code: int=…, reason: str=…) -> None → async method Connection.close(code: CloseCode | int=…, reason: str=…) -> None - changed:
async method Connection.ping(data: Data | None=…) -> Awaitable[float] → async method Connection.ping(data: DataLike | None=…) -> Awaitable[float] - changed:
async method Connection.pong(data: Data=…) -> None → async method Connection.pong(data: DataLike=…) -> None - changed:
async method Connection.send(message: Data | Iterable[Data] | AsyncIterable[Data], text: bool | None=…) -> None → async method Connection.send(message: DataLike | Iterable[DataLike] | AsyncIterable[DataLike], text: bool | None=…) -> None - added:
method Connection.terminate_pending_pings() -> None
- removed:
property Server.sockets -> Iterable[socket.socket] - changed:
method Server.close(close_connections: bool=…) -> None → method Server.close(close_connections: bool=…, code: CloseCode | int=…, reason: str=…) -> None - added:
property Server.sockets -> tuple[socket.socket, ...]
- changed:
constructor ClientProtocol(uri: WebSocketURI, *, origin: Origin | None=…, extensions: Sequence[ClientExtensionFactory] | None=…, subprotocols: Sequence[Subprotocol] | None=…, state: State=…, max_size: int | None=…, logger: LoggerLike | None=…) -> None → constructor ClientProtocol(uri: WebSocketURI, *, origin: Origin | None=…, extensions: Sequence[ClientExtensionFactory] | None=…, subprotocols: Sequence[Subprotocol] | None=…, state: State=…, max_size: int | None | tuple[int | None, int | None]=…, logger: LoggerLike | None=…) -> None
- added:
method Headers.set_insecure(key: str, value: str) -> None
- changed:
constructor PayloadTooBig(size_or_message: int | None | str, max_size: int | None=…, cur_size: int | None=…) -> None → constructor PayloadTooBig(size_or_message: int | None | str, max_size: int | None=…, current_size: int | None=…) -> None - changed:
method PayloadTooBig.set_current_size(cur_size: int | None) -> None → method PayloadTooBig.set_current_size(current_size: int | None) -> None
- changed:
field Close.code: int → field Close.code: CloseCode | int - changed:
field Frame.data: Union[bytes, bytearray, memoryview] → field Frame.data: BytesLike - changed:
static method Close.parse(data: bytes) -> Close → static method Close.parse(data: BytesLike) -> Close - changed:
static method Frame.parse(read_exact: Callable[[int], Generator[None, None, bytes]], *, mask: bool, max_size: int | None=…, extensions: Sequence[extensions.Extension] | None=…) -> Generator[None, None, Frame] → static method Frame.parse(read_exact: Callable[[int], Generator[None, None, bytes | bytearray]], *, mask: bool, max_size: int | None=…, extensions: Sequence[extensions.Extension] | None=…) -> Generator[None, None, Frame] - added:
field Frame.DEFAULT_IS_TEXT
- changed:
field Response.body: bytes → field Response.body: bytes | bytearray - changed:
static method Request.parse(read_line: Callable[[int], Generator[None, None, bytes]]) -> Generator[None, None, Request] → static method Request.parse(read_line: Callable[[int], Generator[None, None, bytes | bytearray]]) -> Generator[None, None, Request] - changed:
static method Response.parse(read_line: Callable[[int], Generator[None, None, bytes]], read_exact: Callable[[int], Generator[None, None, bytes]], read_to_eof: Callable[[int], Generator[None, None, bytes]], include_body: bool=…) -> Generator[None, None, Response] → static method Response.parse(read_line: Callable[[int], Generator[None, None, bytes | bytearray]], read_exact: Callable[[int], Generator[None, None, bytes | bytearray]], read_to_eof: Callable[[int], Generator[None, None, bytes | bytearray]], proxy: bool=…) -> Generator[None, None, Response]
- changed:
field Frame.data: bytes → field Frame.data: BytesLike - changed:
function prepare_ctrl(data: Data) -> bytes → function prepare_ctrl(data: DataLike) -> bytes - changed:
function prepare_data(data: Data) -> tuple[int, bytes] → function prepare_data(data: DataLike) -> tuple[int, BytesLike]
- changed:
async method WebSocketCommonProtocol.ping(data: Data | None=…) -> Awaitable[float] → async method WebSocketCommonProtocol.ping(data: DataLike | None=…) -> Awaitable[float] - changed:
async method WebSocketCommonProtocol.pong(data: Data=…) -> None → async method WebSocketCommonProtocol.pong(data: DataLike=…) -> None - changed:
async method WebSocketCommonProtocol.send(message: Data | Iterable[Data] | AsyncIterable[Data]) -> None → async method WebSocketCommonProtocol.send(message: DataLike | Iterable[DataLike] | AsyncIterable[DataLike]) -> None - changed:
async method WebSocketCommonProtocol.write_close_frame(close: Close, data: bytes | None=…) -> None → async method WebSocketCommonProtocol.write_close_frame(close: Close, data: BytesLike | None=…) -> None - changed:
async method WebSocketCommonProtocol.write_frame(fin: bool, opcode: int, data: bytes, *, _state: int=…) -> None → async method WebSocketCommonProtocol.write_frame(fin: bool, opcode: int, data: BytesLike, *, _state: int=…) -> None - changed:
method WebSocketCommonProtocol.write_frame_sync(fin: bool, opcode: int, data: bytes) -> None → method WebSocketCommonProtocol.write_frame_sync(fin: bool, opcode: int, data: BytesLike) -> None
- changed:
constructor Protocol(side: Side, *, state: State=…, max_size: int | None=…, logger: LoggerLike | None=…) -> None → constructor Protocol(side: Side, *, state: State=…, max_size: tuple[int | None, int | None] | int | None=…, logger: LoggerLike | None=…) -> None - changed:
method Protocol.fail(code: int, reason: str=…) -> None → method Protocol.fail(code: CloseCode | int, reason: str=…) -> None - changed:
method Protocol.receive_data(data: bytes) -> None → method Protocol.receive_data(data: bytes | bytearray) -> None - changed:
method Protocol.send_binary(data: bytes, fin: bool=…) -> None → method Protocol.send_binary(data: BytesLike, fin: bool=…) -> None - changed:
method Protocol.send_close(code: int | None=…, reason: str=…) -> None → method Protocol.send_close(code: CloseCode | int | None=…, reason: str=…) -> None - changed:
method Protocol.send_continuation(data: bytes, fin: bool) -> None → method Protocol.send_continuation(data: BytesLike, fin: bool) -> None - changed:
method Protocol.send_ping(data: bytes) -> None → method Protocol.send_ping(data: BytesLike) -> None - changed:
method Protocol.send_pong(data: bytes) -> None → method Protocol.send_pong(data: BytesLike) -> None - changed:
method Protocol.send_text(data: bytes, fin: bool=…) -> None → method Protocol.send_text(data: BytesLike, fin: bool=…) -> None
- added:
class Proxy - added:
field Proxy.host: str - added:
field Proxy.password: str | None - added:
field Proxy.port: int - added:
field Proxy.scheme: str - added:
field Proxy.username: str | None - added:
function get_proxy(uri: WebSocketURI) -> str | None - added:
function parse_proxy(proxy: str) -> Proxy - added:
property Proxy.user_info -> tuple[str, str] | None
- changed:
constructor ServerProtocol(*, origins: Sequence[Origin | re.Pattern[str] | None] | None=…, extensions: Sequence[ServerExtensionFactory] | None=…, subprotocols: Sequence[Subprotocol] | None=…, select_subprotocol: Callable[[ServerProtocol, Sequence[Subprotocol]], Subprotocol | None] | None=…, state: State=…, max_size: int | None=…, logger: LoggerLike | None=…) -> None → constructor ServerProtocol(*, origins: Sequence[Origin | re.Pattern[str] | None] | None=…, extensions: Sequence[ServerExtensionFactory] | None=…, subprotocols: Sequence[Subprotocol] | None=…, select_subprotocol: Callable[[ServerProtocol, Sequence[Subprotocol]], Subprotocol | None] | None=…, state: State=…, max_size: int | None | tuple[int | None, int | None]=…, logger: LoggerLike | None=…) -> None
- changed:
function apply_mask(data: bytes, mask: bytes) -> bytes → function apply_mask(data: BytesLike, mask: bytes | bytearray) -> bytes
- changed:
method StreamReader.feed_data(data: bytes) -> None → method StreamReader.feed_data(data: bytes | bytearray) -> None - changed:
method StreamReader.read_exact(n: int) -> Generator[None, None, bytes] → method StreamReader.read_exact(n: int) -> Generator[None, None, bytearray] - changed:
method StreamReader.read_line(m: int) -> Generator[None, None, bytes] → method StreamReader.read_line(m: int) -> Generator[None, None, bytearray] - changed:
method StreamReader.read_to_eof(m: int) -> Generator[None, None, bytes] → method StreamReader.read_to_eof(m: int) -> Generator[None, None, bytearray]
- removed:
method Connection.acknowledge_pending_pings() -> None - changed:
method Connection.close(code: int=…, reason: str=…) -> None → method Connection.close(code: CloseCode | int=…, reason: str=…) -> None - changed:
method Connection.ping(data: Data | None=…, ack_on_close: bool=…) -> threading.Event → method Connection.ping(data: DataLike | None=…, ack_on_close: bool=…) -> threading.Event - changed:
method Connection.pong(data: Data=…) -> None → method Connection.pong(data: DataLike=…) -> None - changed:
method Connection.send(message: Data | Iterable[Data], text: bool | None=…) -> None → method Connection.send(message: DataLike | Iterable[DataLike], text: bool | None=…) -> None - added:
method Connection.terminate_pending_pings() -> None
- changed:
function apply_mask(data: bytes, mask: bytes) -> bytes → function apply_mask(data: BytesLike, mask: bytes | bytearray) -> bytes