Skip to content

refactor(protocols)!: move NoPayload into misc/no_payload.py - #2636

Merged
JarryShaw merged 1 commit into
mainfrom
refactor/2529-no-payload
Nov 2, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
refactor/2529-no-payload

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

Breaking. NoPayload and its schema and data modules move from pcapkit.protocols.misc.null to pcapkit.protocols.misc.no_payload, per the owner's rulings on #2529 (Q1, Q3, Q4). The class keeps its name. Nothing is re-exported at the old paths, so importing from them raises ModuleNotFoundError.

That completes #2529: protocol-family-grouping.rst has no pending exception left. The moved module and its page carry versionadded/versionremoved:: 1.6.0, as the 1.5.0 RARP move did. A test pins the three old paths as gone.

User-visible consequences:

A script did the rename. Every sample capture parses identically (1,632 frames), and the protocol legs pass. A Sonnet cross-review returned GOOD TO GO.

Closes #2529

@JarryShaw JarryShaw added this to the PyPCAPKit v1.6 milestone Nov 2, 2026
@JarryShaw JarryShaw added breaking Breaks public-facing behaviour or API (apply alongside the type label) 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 95032c1ed. A Sonnet cross-review checked the three moves and the reference sweep: only the intentional history notes remain. LinkType.NULL is untouched. The version directives match the shape of the 1.5.0 RARP move. All 1,632 frames in the 23 sample captures parse identically. The old-path test fails on main. One user-visible consequence, stated in the description: a frame pickled before this change no longer loads.

@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 2, 2026
- `pcapkit.protocols.misc.null` and its `schema.misc.null` and
  `data.misc.null` modules move to `misc/no_payload.py`, so the module takes
  its class's name; the class keeps the name `NoPayload`, and nothing is
  re-exported at the old paths.
- Every import, `:class:`/`:mod:` role, `.. module::` target, toctree entry,
  `ext.rst` row and class-hierarchy click target follows the move; the
  module and its docs page record `versionadded`/`versionremoved:: 1.6.0`.
- protocol-family-grouping.rst leaves nothing pending under #2529.
- Tests: `test_no_payload_path_2529_unit.py` pins `ModuleNotFoundError` on the
  old paths and the new homes; the #1744 ledger gains `MOVED_MODULES`, which
  pins the `versionremoved` notes; the existing tests import the new paths.
@JarryShaw
JarryShaw force-pushed the refactor/2529-no-payload branch from 95032c1 to 3e5fbb2 Compare November 2, 2026 07:19
@JarryShaw

Copy link
Copy Markdown
Owner Author

Fix round and rebase: 95032c1ed → 3e5fbb2af, now on 18544c3c9. Patch-id changes (acc66cdf7bc3 → 4489da6f51da) because of the fix below.

Verdict stays good to go.

@JarryShaw

Copy link
Copy Markdown
Owner Author

The red Python 3.15 leg comes from this PR's base, not its change. It fails only the DTLSCIDCiphertext schema round trip, which main fixed in 16ccc4373 (#2645), and the re-export test that #2641 fixes. I'll rebase once #2641 merges. The verdict stays good to go.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Coverage: 94.08% -- tests failure, so this is partial (unit tier, Python 3.15, 3e5fbb2af, Unit Tests run failure)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 20561 177 2832 158 98.53%
pcapkit/corekit 2697 74 854 37 96.65%
pcapkit/dumpkit 281 3 100 3 98.43%
pcapkit/foundation 3475 27 1206 32 98.74%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 21416 218 5650 196 98.46%
pcapkit/toolkit 961 28 342 10 96.32%
pcapkit/utilities 512 7 144 5 98.17%
pcapkit/vendor 5256 2260 1198 194 53.61%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit 74238b7 into main Nov 2, 2026
59 of 61 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Nov 2, 2026
@JarryShaw
JarryShaw deleted the refactor/2529-no-payload branch November 2, 2026 14:36
@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
…shared value helpers into 1.6.0 (#2449)

- Breaking: NoPayload and its data model and schema move from misc.null to
  misc.no_payload with no re-export, so a frame pickled by 1.5.x fails to
  load (#2636). 1.5.0's three NoPayload roles and 1.6.0's own point at
  misc.no_payload, 1.5.0's text unchanged.
- Added: the IP, L2TP, ICMP, IGMP and LinuxSLL bases give a member on read,
  make and from_data, version= naming it, with the refusals and IPv4's
  Version check ahead of the header (#2639).
- Changed: SCTP's chunk-flag and Invalid Stream Identifier reserved-octet
  messages (#2638). Folded into the TLS/DTLS entry: make() raises
  StructError for a value too wide for its field (#2638), and the
  DTLS_CIDCiphertext and TLS_ConnectionId package exports (#2641).
- The conventions entry records the version= dispatch rule (#2639) and ARP
  as the member-order reference (#2638).
- No entry for #2638's private value helpers or the Ethernet and PCAP-NG
  PAT_MAC_ADDR, as for #1844's OSPF copy; #2640's docstring fixes; or the
  test-only #2620, #2637, #2645 and #2646.
- 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

breaking Breaks public-facing behaviour or API (apply alongside the type label) 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.

refactor(protocols): a protocol class takes its module's name (igmpv1.IGMPv1, httpv1.HTTPv1)

1 participant