Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release History
===============

1.4.0 (unreleased)
------------------

- Require ``event_hint`` when constructing ``RemoteProtocolError``.
This is an API-breaking change.

1.3.2 (2025-11-20)
------------------

Expand Down
9 changes: 6 additions & 3 deletions src/wsproto/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ class RemoteProtocolError(ProtocolError):

.. attribute:: event_hint

This is a suggested wsproto Event to send to the client based
on the error. It could be None if no hint is available.
This is the suggested wsproto Event to send to the client based
on the error.

.. versionchanged:: 1.4.0
Made ``event_hint`` a required argument.

"""

def __init__(self, message: str, event_hint: Event | None = None) -> None:
def __init__(self, message: str, event_hint: Event) -> None:
self.event_hint = event_hint
super().__init__(message)

Expand Down
Loading