File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -404,16 +404,16 @@ class ProtocolError(WebSocketException):
404
404
"""
405
405
406
406
407
- WebSocketProtocolError = ProtocolError # for backwards compatibility
408
-
409
-
410
407
# When type checking, import non-deprecated aliases eagerly. Else, import on demand.
411
408
if typing .TYPE_CHECKING :
412
409
from .legacy .exceptions import InvalidMessage
410
+
411
+ WebSocketProtocolError = ProtocolError
413
412
else :
414
413
lazy_import (
415
414
globals (),
416
415
aliases = {
417
416
"InvalidMessage" : ".legacy.exceptions" ,
417
+ "WebSocketProtocolError" : ".legacy.exceptions" ,
418
418
},
419
419
)
Original file line number Diff line number Diff line change 1
- from ..exceptions import InvalidHandshake
1
+ from ..exceptions import (
2
+ InvalidHandshake ,
3
+ ProtocolError as WebSocketProtocolError , # noqa: F401
4
+ )
2
5
3
6
4
7
class InvalidMessage (InvalidHandshake ):
You can’t perform that action at this time.
0 commit comments