Repository navigation
refactor(protocols): order option readers, unreachable helpers and registry maps per the member-order convention (#2490) - #2765
Merged
Conversation
…gistry maps per the member-order convention (#2490) Move members and map entries only; every member's text is unchanged. - Rule c: each registry's readers, then its makers, open with the default and follow the registry's enum-value order (IPv4, HOPOPT, IPv6_Opts, HIP, MH, PCAPNG). - Subgroup d: utilities read(), make() and the registries do not reach move last, keeping their order (HTTPv1, IPv6, TCP, SCTP, MH, PCAPNG and others). - Registry maps in enum-value order, int keys ascending: Internet, Link, FRAD and UDP __proto__, IPv4/HOPOPT/IPv6_Opts/MH __option__, HIP __parameter__, ICMPv4 __type__, MH __message__, PCAPNG __block__ and __secrets__. - The member-order guard checks rule c, subgroup d and registry-map order, with KNOWN_EXCEPTIONS still empty; the page's guard paragraph says so.
Contributor
|
Coverage: 94.45% (unit tier, Python 3.15,
Per-file detail: the |
Owner
Author
|
GOOD TO GO at
|
JarryShaw
added a commit
that referenced
this pull request
Nov 4, 2026
- #2766 (Fixed): a cut list of plain values ends with the data, where 1.5.x read zero values past the cut (a cut Type 0 Routing header, measured on v1.5.1), into the ListField entry; IGMPv3's sources and the Query's num_sources, into the IGMP entry. - #2767: a cut header rebuilt on its own reads back its parsed values, a regression of the 1.6.0 rebuild path, into the cut-header Fixed entry; the round-trip test rule, into the conventions entry. - #2764: SSLv2, TLS and DTLS records rebuild from their to_dict(), into the TLS/DTLS Added entry, as those classes never shipped. - #2765: the further member reorders and guard rules, into the member-order entry, which records the earlier #2490 reorders. - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
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— restructures code without changing behaviourDescription of your pull request and other information
This applies the three parts of
protocol-member-order.rstthat no module followed yet. It is a mechanical reorder of 23 modules, with no behaviour change.read(),make()and the registries never reach go last. This touches 18 classes.PCAPNG.__option__and the PCAP-NGOption.__enum__are left alone: one is computed, andOption.register's warning depends on the other's order.specific,unreached,registry) and keeps an emptyKNOWN_EXCEPTIONS. Run against main'spcapkit/, it fails 6 times. Each rule was also proven against mutated copies.Closes #2490