Is there an existing issue for this?
Describe the bug
The DeprecationWarning is thrown here:
|
try: # websockets < 11.0 |
|
from websockets.connection import State |
|
from websockets.server import ServerConnection as ServerProtocol |
|
except ImportError: # websockets >= 11.0 |
|
from websockets.protocol import State # type: ignore |
|
from websockets.server import ServerProtocol # type: ignore |
With websockets 12 the try block would run successfully with the warning while the catch block does not have chance to be run.
Code snippet
No response
Expected Behavior
The catch block is being run instead.
How do you run Sanic?
Sanic CLI
Operating System
MacOS
Sanic Version
Sanic 23.6.0; Routing 23.6.0
Additional context
No response
Is there an existing issue for this?
Describe the bug
The DeprecationWarning is thrown here:
sanic/sanic/server/protocols/websocket_protocol.py
Lines 4 to 9 in 82bf46b
With websockets 12 the try block would run successfully with the warning while the catch block does not have chance to be run.
Code snippet
No response
Expected Behavior
The catch block is being run instead.
How do you run Sanic?
Sanic CLI
Operating System
MacOS
Sanic Version
Sanic 23.6.0; Routing 23.6.0
Additional context
No response