Skip to content

refactor(internet): name IGMP member classes after their modules (#2529) - #2542

Merged
JarryShaw merged 2 commits into
mainfrom
refactor/2529-igmp-module-names
Nov 1, 2026
Merged

JarryShaw merged 2 commits into
mainfrom
refactor/2529-igmp-module-names

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else
  • const — regenerates constant or registry tables, members keeping their numeric values

Description of your pull request and other information

Part of #2529, closes #2530.

- Rename igmpv1/igmpv2/igmpv3.IGMP to IGMPv1/IGMPv2/IGMPv3, and the igmpv3
  schema and data classes to IGMPv3; id(), alias, registry keys and package
  exports are unchanged, and info_name now follows the class name.
- Update the dispatch imports, docstrings, API pages, ext.rst rows and the
  Mermaid click anchors to the new names.
- Merge igmp.py's two versionadded directives into one bare tag and drop
  igmpv3.py's restating body (#2530).
- Record the rulings: a protocol class takes its module's name and a module
  holds one protocol class (protocol-family-grouping), and the versionadded
  rule (documentation). A new test pins the class names, __all__ and info_name.
…ys (#2529)

- Reachability audit: accept a class that inherits its family base's
  __index__ (new _inherits_index()), not a shared module or __name__;
  IGMPv1/2/3 now pass through IGMP's entry. Same hunk as the DRARP move.
- igmp.rst: key the shared IGMPv1/v2 table as igmpv1.*, noting IGMPv2's
  keys start igmpv2.
- igmpv3.rst and the igmpv3 module docstring: key both tables as igmpv3.*
  on the flat Query/Report data fields; split the flags octet into resv,
  s_flag and qrv; leave Number of Sources unkeyed, as it is not output.
- protocol-family-grouping.rst: the name match ignores case and
  underscores; schema/ and data/ modules follow the same layout; list the
  classes still pending under #2529.
@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 1, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Cross-review (Sonnet) at 00b11ade7: GOOD TO GO. The reachability-audit change matches #2540's byte for byte, and clears exactly the three IGMP gaps without opening a new one. Parsing IGMPv1/v2/v3 inside IPv4 gives the igmpv1/igmpv2/igmpv3 keys, and every output-table key exists in the parsed output. The convention text matches the #2529 rulings. The earlier review of 92fd4ca9f found the rename itself correct.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Coverage: 93.94% (unit tier, Python 3.15, 00b11ade7, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 20087 144 2710 125 98.78%
pcapkit/corekit 2605 74 818 37 96.52%
pcapkit/dumpkit 281 3 100 3 98.43%
pcapkit/foundation 3194 27 1112 31 98.65%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 19906 213 5236 207 98.32%
pcapkit/toolkit 924 36 334 10 95.55%
pcapkit/utilities 502 7 144 5 98.14%
pcapkit/vendor 5009 2222 1148 182 52.31%

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

@JarryShaw
JarryShaw merged commit 54bf1d2 into main Nov 1, 2026
65 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Nov 1, 2026
@JarryShaw
JarryShaw deleted the refactor/2529-igmp-module-names branch November 1, 2026 16:00
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Nov 1, 2026
JarryShaw added a commit that referenced this pull request Nov 1, 2026
#2490, #2575)

#2541's exception table was built on a base without #2528 and #2542, so
main fails the member-order guard: #2528 put DTLS back in order, and #2542
renamed the IGMP classes to IGMPv3. Drop DTLS and re-key the IGMP entries.

#2509 merged before #2521 required a wrapper for every class-level map, so
Radiotap.__proto__ has none. Nothing dispatches by it yet; excuse it until
#2575 adds Radiotap.register and register_radiotap.
JarryShaw added a commit that referenced this pull request Nov 1, 2026
- Added: one's-complement checksum verification and computation (#2543),
  and the IPX and SCTP registration wrappers (#2521).
- Folded into unreleased entries: LinuxSLL/FRAD/Netlink registries (#2527),
  the IGMP class names (#2542), TLS record chaining and the SSLv2 trial's
  warnings (#2537), DTLS reassembly via Extractor and toolkit (#2528), and
  IP_Pseudo's walk at any depth (#2543). ICMP drops its stale checksum line.
- Breaking: make() checksums, DRARP's module (#2540), IPv6 overlapping
  fragments (#2569), TCP_GAP_LIMIT replacing TCP.__window__ (#2579), and
  Extractor/extract's positional dtls (#2528).
- Changed: member order (#2490), conventions (#2542, #2521, #2570), CI -n
  logical (#2572). Fixed: AppType.get (#2568), trial warnings (#2519, #2577).
- CHANGELOG.md regenerated; util/changelog_md.py --check passes.
@github-actions github-actions Bot added this to the PyPCAPKit v1.6 milestone Nov 2, 2026
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.

docs: one versionadded per version per block, with no body that only restates and cites

1 participant