Skip to content

Conversation

evnchn
Copy link
Collaborator

@evnchn evnchn commented Oct 10, 2025

Motivation

https://websockets.readthedocs.io/en/stable/howto/upgrade.html, and we have 5 years to migrate.

The deadline is 2030 so we're 5 years early, but I guess that's better than being late (🤡).

Implementation

WebSocket protocol configuration:

  • Sets the ws parameter to 'wsproto' when configuring the Uvicorn server in nicegui/ui_run.py
    • We can choose anything but auto (defaults to the websockets legacy) and websockets
    • Personally believe that by using wsproto, which is more low-level, we may have performance increase.
    • But we may use websockets-sansio as well.

Test configuration cleanup:

  • Removes deprecated warning filters related to the websockets.legacy and uvicorn.protocols.websockets modules from the filterwarnings section in pyproject.toml, as these are no longer needed.

Progress

  • I chose a meaningful title that completes the sentence: "If applied, this PR will..."
  • The implementation is complete.
  • Pytests have been added (or are not necessary).
  • Documentation has been added (or is not necessary).

@falkoschindler falkoschindler added this to the 3.1 milestone Oct 10, 2025
@falkoschindler falkoschindler added feature Type/scope: New feature or enhancement review Status: PR is open and needs review labels Oct 10, 2025
@falkoschindler falkoschindler requested a review from rodja October 10, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Type/scope: New feature or enhancement review Status: PR is open and needs review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants