.venv/lib/python3.11/site-packages/websockets/legacy/server.py:1185: DeprecationWarning: remove second argument of ws_handler warnings.warn("remove second argument of ws_handler", DeprecationWarning) #2476
-
|
Hello In websockets 13.0 (very recent version), there are breaking changes about I think uvicorn still defines the websocket handler with the previous signature: |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 16 replies
-
|
Second it. That deprecation warning is confusing to the users of our framework. I can do a PR if that's OK? |
Beta Was this translation helpful? Give feedback.
-
|
There is also: |
Beta Was this translation helpful? Give feedback.
-
|
But also... Just to clarify... The warning you see on the description of this discussion was left on purpose because I wanted to support old |
Beta Was this translation helpful? Give feedback.
-
|
any news on fixing the warning? |
Beta Was this translation helpful? Give feedback.
-
|
Dear all, Thank you in advance for your attention. Looking forward to your feedback. |
Beta Was this translation helpful? Give feedback.
-
|
Should this be raised as an issue instead of just a discussion? |
Beta Was this translation helpful? Give feedback.
-
|
The whole point was switching uvicorn to sansio implementation. Right now default protocol is "auto" which selects "websockets" giving deprecation warnings. Run uvicorn with Command line: Code: config = uvicorn.Config(
app, host=host, port=port, log_level=log_level, ws="websockets-sansio"
)
server = uvicorn.Server(config)Hope that helps. |
Beta Was this translation helpful? Give feedback.

Second it. That deprecation warning is confusing to the users of our framework.
I can do a PR if that's OK?