Repository navigation
Accept any sequence of header pairs, not just list - #209
Open
zheng-guannan577 wants to merge 5 commits into
Open
zheng-guannan577 wants to merge 5 commits into
zheng-guannan577 wants to merge 5 commits into
Conversation
Updated changelog to reflect API-breaking change in version 1.4.0.
Updated header handling to ensure headers are processed as a list of tuples. This change improves type safety and compatibility with the h11 library.
Added tests for handling extra headers in connection requests and improved parameter handling in handshake functions.
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.
Headers is now
Sequence[tuple[bytes, bytes]], so callers may passtuples (or any other sequence) instead of only lists, matching what
h11 accepts at runtime. This picks up the previously reviewed #204,
which the author closed on 2026-11-09 and explicitly offered for
anyone to take over.
The one point left open in the review of #204 was the mypy error
where the sequence is handed to h11, whose stubs only declare a
list. Instead of silencing it with a cast (as #204 did), the
sequence is now materialised with
list(headers)at that singleh11 boundary, so
mypy src/is clean with no casts for headers.Fixes #173