Repository navigation
refactor(application)!: the HTTP base follows the versioned-family rules (#2628) - #2651
Merged
Merged
Conversation
…les (#2628) - `HTTP.__new__` and `HTTP.make`: building from fields takes `version` and raises `ProtocolError` without it. `HTTP._dispatch_fields` and its `_make_fields` helper go, so no field picks a member and HTTPv1 is no default. Octet dispatch through `HTTP._dispatch_version` is kept. - `HTTP.from_data` dispatches by data-model class and refuses a dict, rather than picking by its `receipt` or `sid` key. - `HTTP.__init__`: from fields, `version` must be the member's own, and HTTPv1 refuses `preface`, which `HTTP.pack` would write ahead of an HTTP/1 message. `HTTP._member_of_version` refuses a bool or a float. - Docs: Dispatching Bases lists HTTP; the HTTP page records the change. - Tests: `test_http_base_dispatch_2628_unit.py` pins each refusal; the #2544, #2298, HTTP/2 round-trip and #1447 tests pass `version` or rebuild a dict through its member. Breaking against v1.5.1: there `HTTP(...)` from fields built HTTP/1.* and `HTTP.from_data` took a dict, and each raises here.
Owner
Author
|
GOOD TO GO at |
5 tasks done
JarryShaw
added a commit
that referenced
this pull request
Nov 2, 2026
…hecksums and PyShark's lost tshark status into 1.6.0 (#2449) - Breaking, in the HTTP entry: building HTTP from fields takes version= and from_data refuses a dict, where 1.5.x built HTTP/1.1 and took one; HTTPv1 refuses preface, which 1.5.x wrote ahead of the message (#2651). The versioned-base entry and the conventions entry point at it. - Folded into the checksum entry: IGMP and GRE verify and compute their checksums, verify_message, GRE's checksum_present, and a cut-short GRE frame reading INVALID (#2654). The contextvars entry drops in_fragment, private to the checksum module and in no release. - Fixed: the PyShark engine absorbs the TSharkCrashException asyncio's lost tshark exit status raises, on every Python (#2642). - No entry for the test-only #2592. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
1 of 5 tasks
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
refactor— changes neither behaviour nor performanceDescription of your pull request and other information
HTTP's base now follows the versioned-family rules that #2574 set and #2639 applied to IP, ICMP, IGMP, L2TP and LinuxSLL.
version=alone picks the member, there is no default, and no field picks one.HTTP(...)andHTTP.makeraise withoutversion.HTTP._dispatch_fieldsis deleted.HTTP.from_datadispatches by data-model class and refuses adict.HTTP.__init__, as ICMP's: a member takesversiononly as its own, and_member_of_versionrefuses a bool or a float.main.Breaking against v1.5.1. The issue said none of this shipped, which is true only of the field picking. In v1.5.1,
HTTP.makedefaulted to HTTP/1.1 andfrom_datatook a dict, and both now raise.Beyond the issue:
HTTPv1(preface=True, ...)raises. Onmainit writes the HTTP/2 preface in front of an HTTP/1 message, and the result does not parse back.A Sonnet cross-review confirmed each claim, including the v1.5.1 behaviour, on an export. Its prose and lint nits are fixed.
Closes #2628