Repository navigation
docs(conventions): settle the member-order page wording and align the protocol registry with the other maps (#2772, #2773) - #2779
Merged
Conversation
… protocol registry with the other maps (#2772, #2773) - protocol-member-order.rst: every registry's readers precede any registry's makers; an int key with no enum orders by value, a str key alphabetically; PCAPNG.__option__ by namespace then value; __registry__ grouped by layer. - SCTP: move the chunk, parameter and cause readers ahead of their makers. - PCAP-NG Option.register names clashing namespaces sorted, and Option.__enum__ lists its namespaces alphabetically. - ProtocolBase.__registry__: built-ins under layer comments, sorted in each. - _release_name restores a displaced name through register_protocol. - Protocol API pages list members in class source order. - Member-order guard: cross-registry readers, str keys per comment group, PCAP-NG option keys and the __registry__ layer groups.
Owner
Author
|
Decision needed: four small choices this PR made on its own. Each follows my recommendation, so a ruling would only adjust the PR.
|
…restore's warning beside the code restore's (#2773)
1 of 5 tasks
Owner
Author
|
GOOD TO GO at
|
Contributor
|
Coverage: 94.45% (unit tier, Python 3.15,
Per-file detail: the |
JarryShaw
added a commit
that referenced
this pull request
Nov 4, 2026
- #2777: the cut-header sentence reads the length back too, the rebuild read at the width its parse was given (__short_width__); the ruling into the conventions entry. - #2778: a PCAP-NG block with octets after opt_endofopt rebuilds an info holding its options and padding_opts, where 1.5.1 rebuilt none, into the whole-header rebuild entry; 1.5.0's frozen entry is left as written. - #2779: SCTP's reorder, the source-ordered member lists and the sorted Option.register clash warning ('opt', 'if', 'epb', ... in 1.5.1), into the member-order entry; the layer-grouped registry and the warning name restore ('put back silently' in 1.5.1), into the #2770 entry; the page wording into the conventions entry. - #2781: import_lock serialising first resolutions, into the lazy-import entry; the removed registry lock never shipped and stays unnamed. - 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 owner's rulings on #2772 and on items 2–4 of #2773. They come as one change because both edit
protocol-member-order.rstand the member-order guard.PCAPNG.__option__is ordered by namespace (inOptionTypeorder), then by value. Int keys with no enum are ordered by key value, and string keys alphabetically. SCTP broke the readers-before-makers rule, so its members are reordered; only the order changes.Option.__enum__:Option.register's clash warning now names namespaces sorted rather than in map order, and the map is alphabetical. A clash in a single namespace reads exactly as before..rstmember lists: realigned to class source order on the protocol pages. A check confirmed no line was added or lost.__registry__: entries are grouped under# Link Layer…# Miscellaneous, alphabetical within each group, and the page records this._release_namenow goes throughregister_protocol, as the code wrappers do. So a restore over a custom class now warns "overwriting", just as a code restore already does on main.layerrule. It fails 4 times on main and passes here. Docs build with 0 warnings.Closes #2772
Part of #2773