Upgrading websockets 13 to 14
Unknown13.1 → 14.2
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 14.0: >=3.8 → >=3.9.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
export AbortHandshake - removed:
export BasicAuthWebSocketServerProtocol - removed:
export InvalidStatusCode - removed:
export RedirectHandshake - removed:
export WebSocketClientProtocol - removed:
export WebSocketCommonProtocol - removed:
export WebSocketProtocolError - removed:
export WebSocketServer - removed:
export WebSocketServerProtocol - removed:
export basic_auth_protocol_factory - added:
export ClientConnection - added:
export Close - added:
export CloseCode - added:
export Frame - added:
export Opcode - added:
export Protocol - added:
export Request - added:
export Response - added:
export Server - added:
export ServerConnection - added:
export Side - added:
export State - added:
export basic_auth
- changed:
constructor ClientConnection(protocol: ClientProtocol, *, ping_interval: float | None=…, ping_timeout: float | None=…, close_timeout: float | None=…, max_queue: int | tuple[int, int | None]=…, write_limit: int | tuple[int, int | None]=…) -> None → constructor ClientConnection(protocol: ClientProtocol, *, ping_interval: float | None=…, ping_timeout: float | None=…, close_timeout: float | None=…, max_queue: int | None | tuple[int | None, int | None]=…, write_limit: int | tuple[int, int | None]=…) -> None
- removed:
method Connection.close_transport() -> None - changed:
async method Connection.send(message: Data | Iterable[Data] | AsyncIterable[Data]) -> None → async method Connection.send(message: Data | Iterable[Data] | AsyncIterable[Data], text: bool | None=…) -> None - changed:
constructor Connection(protocol: Protocol, *, ping_interval: float | None=…, ping_timeout: float | None=…, close_timeout: float | None=…, max_queue: int | tuple[int, int | None]=…, write_limit: int | tuple[int, int | None]=…) -> None → constructor Connection(protocol: Protocol, *, ping_interval: float | None=…, ping_timeout: float | None=…, close_timeout: float | None=…, max_queue: int | None | tuple[int | None, int | None]=…, write_limit: int | tuple[int, int | None]=…) -> None - added:
property Connection.close_code -> int | None - added:
property Connection.close_reason -> str | None
- changed:
constructor Assembler(high: int=…, low: int | None=…, pause: Callable[[], Any]=…, resume: Callable[[], Any]=…) -> None → constructor Assembler(high: int | None=…, low: int | None=…, pause: Callable[[], Any]=…, resume: Callable[[], Any]=…) -> None
- changed:
constructor ServerConnection(protocol: ServerProtocol, server: Server, *, ping_interval: float | None=…, ping_timeout: float | None=…, close_timeout: float | None=…, max_queue: int | tuple[int, int | None]=…, write_limit: int | tuple[int, int | None]=…) -> None → constructor ServerConnection(protocol: ServerProtocol, server: Server, *, ping_interval: float | None=…, ping_timeout: float | None=…, close_timeout: float | None=…, max_queue: int | None | tuple[int | None, int | None]=…, write_limit: int | tuple[int, int | None]=…) -> None - changed:
constructor serve(handler: Callable[[ServerConnection], Awaitable[None]], host: str | None=…, port: int | None=…, *, origins: Sequence[Origin | None] | None=…, extensions: Sequence[ServerExtensionFactory] | None=…, subprotocols: Sequence[Subprotocol] | None=…, select_subprotocol: Callable[[ServerConnection, Sequence[Subprotocol]], Subprotocol | None] | None=…, process_request: Callable[[ServerCon… → constructor serve(handler: Callable[[ServerConnection], Awaitable[None]], host: str | None=…, port: int | None=…, *, origins: Sequence[Origin | re.Pattern[str] | None] | None=…, extensions: Sequence[ServerExtensionFactory] | None=…, subprotocols: Sequence[Subprotocol] | None=…, select_subprotocol: Callable[[ServerConnection, Sequence[Subprotocol]], Subprotocol | None] | None=…, process_request: C…
- removed:
class ClientConnection(ClientProtocol) - removed:
constructor ClientConnection(*args: Any, **kwargs: Any) -> None - removed:
function backoff(initial_delay: float=…, min_delay: float=…, max_delay: float=…, factor: float=…) -> Generator[float, None, None] - removed:
variable BACKOFF_FACTOR - removed:
variable BACKOFF_INITIAL_DELAY - removed:
variable BACKOFF_MAX_DELAY - removed:
variable BACKOFF_MIN_DELAY - changed:
method ClientProtocol.parse() -> Generator[None, None, None] → method ClientProtocol.parse() -> Generator[None]
- removed:
export AbortHandshake - removed:
export InvalidMessage - removed:
export InvalidStatusCode - removed:
export RedirectHandshake - removed:
variable WebSocketProtocolError - added:
class InvalidMessage(InvalidHandshake) - added:
constructor PayloadTooBig(size_or_message: int | None | str, max_size: int | None=…, cur_size: int | None=…) -> None - added:
method PayloadTooBig.set_current_size(cur_size: int | None) -> None
- changed:
field Frame.data: bytes → field Frame.data: Union[bytes, bytearray, memoryview] - added:
class CloseCode(enum.IntEnum) - added:
field CloseCode.ABNORMAL_CLOSURE - added:
field CloseCode.BAD_GATEWAY - added:
field CloseCode.GOING_AWAY - added:
field CloseCode.INTERNAL_ERROR - added:
field CloseCode.INVALID_DATA - added:
field CloseCode.MANDATORY_EXTENSION - added:
field CloseCode.MESSAGE_TOO_BIG - added:
field CloseCode.NORMAL_CLOSURE - added:
field CloseCode.NO_STATUS_RCVD - added:
field CloseCode.POLICY_VIOLATION - added:
field CloseCode.PROTOCOL_ERROR - added:
field CloseCode.SERVICE_RESTART - added:
field CloseCode.TLS_HANDSHAKE - added:
field CloseCode.TRY_AGAIN_LATER - added:
field CloseCode.UNSUPPORTED_DATA
- changed:
field Response.body: bytes | None → field Response.body: bytes
- removed:
class InvalidMessage(InvalidHandshake)
- changed:
method Protocol.discard() -> Generator[None, None, None] → method Protocol.discard() -> Generator[None] - changed:
method Protocol.parse() -> Generator[None, None, None] → method Protocol.parse() -> Generator[None]
- removed:
class ServerConnection(ServerProtocol) - removed:
constructor ServerConnection(*args: Any, **kwargs: Any) -> None - changed:
constructor ServerProtocol(*, origins: Sequence[Origin | 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=…, logger: LoggerLike | None=…) -> None - changed:
method ServerProtocol.parse() -> Generator[None, None, None] → method ServerProtocol.parse() -> Generator[None]
- changed:
constructor ClientConnection(socket: socket.socket, protocol: ClientProtocol, *, close_timeout: float | None=…) -> None → constructor ClientConnection(socket: socket.socket, protocol: ClientProtocol, *, close_timeout: float | None=…, max_queue: int | None | tuple[int | None, int | None]=…) -> None
- changed:
constructor Connection(socket: socket.socket, protocol: Protocol, *, close_timeout: float | None=…) -> None → constructor Connection(socket: socket.socket, protocol: Protocol, *, close_timeout: float | None=…, max_queue: int | None | tuple[int | None, int | None]=…) -> None - changed:
method Connection.recv(timeout: float | None=…) -> Data → method Connection.recv(timeout: float | None=…, decode: bool | None=…) -> Data - changed:
method Connection.recv_streaming() -> Iterator[Data] → method Connection.recv_streaming(decode: bool | None=…) -> Iterator[Data] - changed:
method Connection.send(message: Data | Iterable[Data]) -> None → method Connection.send(message: Data | Iterable[Data], text: bool | None=…) -> None - added:
property Connection.close_code -> int | None - added:
property Connection.close_reason -> str | None - added:
property Connection.state -> State
- changed:
constructor Assembler() -> None → constructor Assembler(high: int | None=…, low: int | None=…, pause: Callable[[], Any]=…, resume: Callable[[], Any]=…) -> None - changed:
method Assembler.get(timeout: float | None=…) -> Data → method Assembler.get(timeout: float | None=…, decode: bool | None=…) -> Data - changed:
method Assembler.get_iter() -> Iterator[Data] → method Assembler.get_iter(decode: bool | None=…) -> Iterator[Data] - added:
method Assembler.get_next_frame(timeout: float | None=…) -> Frame - added:
method Assembler.maybe_pause() -> None - added:
method Assembler.maybe_resume() -> None - added:
method Assembler.reset_queue(frames: Iterable[Frame]) -> None
- changed:
constructor ServerConnection(socket: socket.socket, protocol: ServerProtocol, *, close_timeout: float | None=…) -> None → constructor ServerConnection(socket: socket.socket, protocol: ServerProtocol, *, close_timeout: float | None=…, max_queue: int | None | tuple[int | None, int | None]=…) -> None - changed:
function serve(handler: Callable[[ServerConnection], None], host: str | None=…, port: int | None=…, *, sock: socket.socket | None=…, ssl: ssl_module.SSLContext | None=…, origins: Sequence[Origin | None] | None=…, extensions: Sequence[ServerExtensionFactory] | None=…, subprotocols: Sequence[Subprotocol] | None=…, select_subprotocol: Callable[[ServerConnection, Sequence[Subprotocol]], Subprotocol |… → function serve(handler: Callable[[ServerConnection], None], host: str | None=…, port: int | None=…, *, sock: socket.socket | None=…, ssl: ssl_module.SSLContext | None=…, origins: Sequence[Origin | re.Pattern[str] | None] | None=…, extensions: Sequence[ServerExtensionFactory] | None=…, subprotocols: Sequence[Subprotocol] | None=…, select_subprotocol: Callable[[ServerConnection, Sequence[Subprotoco…