Skip to content

docs: link library-internal references and document the missing public classes (#1940) - #1946

Merged
JarryShaw merged 2 commits into
mainfrom
docs/1940-link-internal-refs
Oct 19, 2026
Merged

JarryShaw merged 2 commits into
mainfrom
docs/1940-link-internal-refs

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • docs — documentation only

Description of your pull request and other information

Turns library-internal names written as literals in rendered prose into roles, such as FrameType.Flags and AppType.get. It also documents what they point at: the missing public classes (CommandType, ConformanceRequirement, ResponseKind, GroupingInformation, Settings, OptionEnumField) and, per the ruling on #1940, the private helpers and special methods that rendered text names. Concepts, layer names, wire fields, extras and historical names stay literals.

docs/source/conf.py gains an attribute getter so :special-members: __new__ documents an enum's own __new__ rather than the enum machinery's. Const docstrings go through their vendor templates. The AppType and OptionType files are left to #1945.

tests/project/test_docs_internal_refs_1940_unit.py pins the entries and a curated set of converted references, and fails without the change. The docs build has no warnings.

Closes #1940

…c classes (#1940)

- Convert library-internal names written as double-backtick literals in
  rendered prose and docstrings to Python-domain roles; literals that mean a
  concept, a layer, a wire field, an extra or a historical name stay literals
- Document CommandType, ConformanceRequirement, ResponseKind,
  GroupingInformation, the HTTP/2 Settings data model, OptionEnumField and
  OptionAreaField
- Give every private helper and special method that rendered text names an
  entry, with a docstring where it had none (const docstrings in their vendor
  templates), and repoint or demote the roles those docstrings carry
- Read an enumeration's own __new__ in autodoc, so :special-members: __new__
  documents the registry row constructor rather than the enum machinery's
- Add a project test pinning the entries, the helpers and a curated set of
  the converted references; update the tests that pinned the old literals

Closes #1940
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

NEEDS CHANGES at d1bb31e8c, two nits. A Sonnet review built the docs on the 3.17.2 pin with -W: 0 warnings. AppType.get and FrameType.Flags link. The __new__ attribute getter is right for stdlib and aenum enums and touches nothing else. Const and template text match, and the new test fails on main (57 failed). Two fixes are going in a follow-up commit. ipv6_ext.rst still carries the unlinked Internet._lookup_next_layer role that the docstring copy already repoints. And two test docstrings use timed wording ("now has", "now written").

@JarryShaw JarryShaw added review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
…wording (#1940)

- Point the ipv6_ext page's Internet._lookup_next_layer role at
  ProtocolBase._lookup_next_layer, where the method is documented, as the
  module docstring already does
- Restate the #1940 test's docstrings and comments, and the conf.py getter's
  docstring, as standing facts rather than as what changed

Refs #1940
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: needs-changes Cross-review at the current head says changes are required; see the verdict comment labels Oct 19, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 78d68598d. A Sonnet delta review confirmed the new commit touches only the ipv6_ext.rst role, a conf.py docstring and the #1940 test's docstrings. No assertion or curated data changed. The role's new target, ProtocolBase._lookup_next_layer, imports and has an entry on the protocol page. No review-history wording is left in the lines this PR adds. The #1940 and #1919 tests pass, and the docs build with 0 warnings (worker's build).

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 19, 2026
@JarryShaw
JarryShaw merged commit 7f53822 into main Oct 19, 2026
9 checks passed
@JarryShaw
JarryShaw deleted the docs/1940-link-internal-refs branch October 19, 2026 17:58
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 19, 2026
@JarryShaw JarryShaw moved this to Done in PyPCAPKit Oct 19, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Pull requests that change documentation only (docs: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs: link library-internal references written as literals, and document the public classes missing from the inventory

1 participant