We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9aec47 commit 4a15471Copy full SHA for 4a15471
sanic/server/websockets/impl.py
@@ -16,12 +16,12 @@
16
from websockets.frames import Frame, Opcode
17
18
19
-try: # websockets < 11.0
20
- from websockets.connection import Event, State # type: ignore
21
- from websockets.server import ServerConnection as ServerProtocol
22
-except ImportError: # websockets >= 11.0
+try: # websockets >= 11.0
23
from websockets.protocol import Event, State # type: ignore
24
from websockets.server import ServerProtocol # type: ignore
+except ImportError: # websockets < 11.0
+ from websockets.connection import Event, State # type: ignore
+ from websockets.server import ServerConnection as ServerProtocol
25
26
from websockets.typing import Data
27
0 commit comments