Repository navigation
Clarify WebSocket server startup and shutdown - #205
Closed
ChinesePrince07 wants to merge 1 commit into
Closed
ChinesePrince07 wants to merge 1 commit into
ChinesePrince07 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #161.
Clarifies the startup contract for
serve_websocketandWebSocketServer.run.nursery.start()returns the server once it is listening. The child task keeps serving, and cancelling the nursery stops it. The server tutorial shows how to start on an OS-assigned port, send an echo, and shut down.Ran the exact example and independently checked that
WebSocketServer.runsignals readiness and releases the listener after cancellation. All 64 tests, Pylint, and mypy passed locally with the pinned dependencies on CPython 3.8 through 3.14. The oldest-dependencies job also passed locally on 3.8.GitHub Actions passed both PyPy jobs and the Python 3.14 job with the latest dependencies. The pinned matrix stopped after
setup-pythoncould not provision Python 3.8 and 3.9 on Ubuntu 26.04.Both API entries and the example render in Sphinx, which reports the same configuration warning as clean upstream.
Codex drafted the documentation and ran the checks.