Skip to content

refactor(protocols): reorder the remaining class members to the member-order convention - #2613

Merged
JarryShaw merged 1 commit into
mainfrom
refactor/2490-final-reorder
Nov 2, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
refactor/2490-final-reorder

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • refactor — changes neither behaviour nor performance

Description of your pull request and other information

The last classes the member-order guard had excused are now reordered to the convention, and the guard's KNOWN_EXCEPTIONS table is empty. They are OSPF, IGMPv3 with its IGMPv3/Query/Report schemas, IPv4, IPX, IP_Pseudo, SCTP and TCP. Only the out-of-order members move.

The reorder is pure. For every changed module, against the merge base, these are identical: each class's member ast.dump set, the module-level nodes, and the multiset of source lines. I re-ran that check independently. With the pcapkit/ diff reverted, the guard fails on exactly these classes.

Tests: the touched protocols' modules pass, and so do the protocols/transport and protocols/application legs. The one protocols/internet error is test_mh_timestamp_info_1886_unit, a local dictdumper/plistlib issue that fails identically on main.

Still to do under #2490, and not checked by the guard yet: rule c (option readers in their registry's declaration order), subgroup d (helpers that read/make do not reach go last), and registry-map entry order.

Part of #2490

…r-order convention (#2490)

Move members only; each member's text is unchanged.

- OSPF: _read_encrypt_auth directly before _make_encrypt_auth.
- IGMPv3: _make_group_record after _make_data, under Utilities.
- IGMPv3, Query and Report schemas: the TYPE_CHECKING __init__ after
  get_payload or post_process.
- IPv4, TCP: each options maker directly after its reader.
- IPX: _read_ipx_address before _make_ipx_address.
- IP_Pseudo: _is_ipv6 first among the helpers.
- SCTP: _decode_next_layer after the chunk reader and maker.
- Empty the member-order guard's KNOWN_EXCEPTIONS of its ten entries.
@JarryShaw JarryShaw added refactor Restructuring for its own sake — neither a fix nor a new capability (refactor: prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate labels Nov 2, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 32fc2d9be. The reorder is AST-proven pure against the merge base, a check I ran independently. The guard now passes with an empty exceptions table, and fails on exactly these classes without the change. It merges cleanly with current main: OSPF's docstring change from #2599 sits on lines this PR does not touch.

@github-actions github-actions Bot added this to the PyPCAPKit v1.6 milestone Nov 2, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 2, 2026
@JarryShaw
JarryShaw merged commit 3ccdc32 into main Nov 2, 2026
25 checks passed
@JarryShaw
JarryShaw deleted the refactor/2490-final-reorder branch November 2, 2026 02:33
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Nov 2, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Nov 2, 2026
JarryShaw added a commit that referenced this pull request Nov 2, 2026
…s latest wave into 1.6.0 (#2449)

- Added: every whole HTTP/2 frame in a TCP segment is a further HTTPv2
  layer, the previous frame's payload, as with TLS (#2609).
- Folded into unreleased entries: SSLv3 lives in
  pcapkit.protocols.application.sslv3 (#2602), and a reassembled DTLS
  Datagram's packet holds the deferred handshake decode (#2605).
  tls.SSLv3 is in no release tag, so the entry records no move.
- Changed: the remaining xdist jobs at -n logical (#2606) join the CI
  entry, and the member-order entry cites the last reorder (#2613).
- No entry for the test-only #2611 and #2612, or for #2610's private
  registry sentinel, which changes no behaviour.
- CHANGELOG.md regenerated; util/changelog_md.py --check passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Restructuring for its own sake — neither a fix nor a new capability (refactor: prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant