Skip to content

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

Open
JarryShaw wants to merge 2 commits into
mainfrom
refactor/2529-igmp-module-names
Open

JarryShaw wants to merge 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.

This branch has not been deployed

No deployments
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) review: good-to-go Cross-review at the current head says ready; CI state is separate

Projects

Status: In review

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