diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 99ac2d4..fe46003 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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) ------------------ diff --git a/src/wsproto/utilities.py b/src/wsproto/utilities.py index d02117a..414084c 100644 --- a/src/wsproto/utilities.py +++ b/src/wsproto/utilities.py @@ -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)