Skip to content

docs(const): document the get overrides instead of hiding them (#1921) - #1935

Merged
JarryShaw merged 2 commits into
mainfrom
docs/1921-document-get-overrides
Oct 19, 2026
Merged

JarryShaw merged 2 commits into
mainfrom
docs/1921-document-get-overrides

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Per the ruling on #1921, this drops :meta private: from the get overrides of Command, Method, OptionType, TransportProtocol and AppType. Every :meth:get`` reference on the ftp, http, pcapng and reg pages now links.

The const modules are regenerated from the edited templates, reusing the crawled parts already committed, and are byte-identical to the rendered output. Each summary now states how the lookup handles case and what a miss returns. OptionType.get also gets a full description of its lookup rules.

A new project test fails if an override, its template, or a :meth: reference to one is marked private. The pinned docs build reports 0 warnings.

#1910 changed some AppType.get references to plain literals. They can link again now, but this PR leaves them as they are.

Closes #1921

- Drop `:meta private:` from the `get` overrides of `Command`, `Method`,
  `OptionType`, `TransportProtocol` and `AppType`, in the vendor templates
  and the const modules regenerated from them, so `:meth:`get`` links again
- Replace each "Backport support for original codes." summary with the
  lookup it performs, and state what `get` returns on a miss
- Give `OptionType.get` a contract: namespace overlay for codes,
  case-sensitive names, and what `default` is for
- Add a project test that no override, template or `:meth:` reference to
  one is marked private

Closes #1921
@JarryShaw JarryShaw added const Regenerated IANA or vendor constant tables; members keep their numeric values 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 9b6b2514b. A Sonnet cross-review called every override, and the case handling, lookup order and unchanged table sizes on a miss all match the docstrings. Every get() chip on the four pages links. Two small fixes are still needed. First, AppType.get says a miss is "named after the IANA range holding the port". In fact it takes the label of the span holding the port (reserved, unassigned, or a service name), and unknown in a gap, so say exactly that. Second, the new test's prose carries timed context: "no longer overrides get" in an assertion message, and "carried" in the module docstring. Restate both as what the test checks.

@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
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 19, 2026
- Say that `AppType.get` names a miss after the label of the IANA span
  holding the port, whatever that label is, or `unknown` when no span
  holds it, in the template and the regenerated const module
- State the #1921 test's prose as what it checks, without timed context
- Pin known references among the `:meth:` hits, so a reference that
  stops resolving fails the test

Closes #1921
@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 b20a6a62c. The miss wording now matches a sweep of every TCP port. Unregistered ports get reserved, unassigned, a service label (ircu at 6666, swx at 7300), or unknown. Port 300 is a registered port (tacacss), not a miss, so the earlier review's example was wrong. The template and const hunks are byte-identical. The test prose has no timed context. Dropping a pinned :meth:get`` now fails the test.

@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 1a2c5a9 into main Oct 19, 2026
51 checks passed
@JarryShaw
JarryShaw deleted the docs/1921-document-get-overrides branch October 19, 2026 15:03
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 19, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

const Regenerated IANA or vendor constant tables; members keep their numeric values docs Pull requests that change documentation only (docs: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs: the :meta private: get overrides leave every get() reference to them unlinked

1 participant