Repository navigation
Modernize runtime contracts, structure, and lint coverage - #7
Merged
Merged
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.
Overview
This pull request modernizes the project on top of the current
masterbranch while preserving the established command-line workflow, public protocol names, legacy cipher availability, and supported transport behavior.The work focuses on making the runtime contracts explicit, improving maintainability, and adding targeted correctness checks without changing the project’s intended operating model.
What changed
Correctness and lifecycle safety
asyncio.CancelledErrorpropagation while narrowing exception handling at connection, protocol, TLS, WebSocket, and optional-backend boundaries where appropriate.Protocol and transport structure
Cipher and compatibility behavior
Documentation and tooling
Compatibility considerations
The established CLI entry points, supported protocol identifiers, public compatibility aliases, legacy cipher registry entries, and optional adapter behavior are retained. The changes are intended to be behavior-preserving for normal callers; the internal implementation is now more explicit about awaitable lifecycle methods and resource ownership.
Validation
The branch was validated with the optional runtime dependencies installed:
pytest: 82 passed, 7 subtests passedcompileallpassedPerformance check
The modernization was not treated as a performance rewrite. The pyperf comparison against the baseline showed a geometric mean of approximately 1.00x, with no statistically meaningful broad regression or improvement. Loopback connection setup and relay measurements remained within normal run-to-run variation, so dedicated optimization can be evaluated separately with workload-specific profiling.
Review focus
Please pay particular attention to: