Skip to content

docs(const): drop version directives from generated tables (#1884) - #1895

Merged
JarryShaw merged 1 commit into
mainfrom
fix/1884-drop-template-version-directives
Oct 17, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/1884-drop-template-version-directives

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • 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

  • Removes the version directives from the template text of the ftp/command, http/method, ipv6/extension_header, pcapng/option_type, pcapng/tls_key_label, reg/apptype/apptype and tcp/flags crawlers. The same blocks come out of the committed const modules, with no re-crawl.

  • Each note moves onto its hand-written page under docs/source/pcapkit/const/, as fix(const)!: name LLACode codes 0 and 2 as RFC 5568 does (#1848) #1872 did, keeping the original version.

  • Directives on the crawler framework's own code stay. That covers pcapkit/vendor/__init__.py, __main__.py and default.py, plus the apptype crawler's own wrap_comment and tabulate methods, since none of them is template text.

  • tests/project/test_no_version_directives_in_generated_tables_1884_unit.py finds template text by parsing each crawler, not from a list of exempt files. It fails on main and passes here.

  • tests/vendor, tests/const, tests/project and the tier guard pass. No Sphinx build was run.

Closes #1884

- Remove the versionadded and versionchanged directives from the template
  text of the ftp/command, http/method, ipv6/extension_header,
  pcapng/option_type, pcapng/tls_key_label, reg/apptype/apptype and
  tcp/flags crawlers, and identically from the committed const modules,
  without re-crawling.
- Move each note onto its hand-written page under docs/source/pcapkit/const,
  as #1848 did, since the crawlers regenerate the modules (#1872).
- Keep the directives on the crawler framework's own code and on the
  hand-written AppType.wrap_comment and AppType.tabulate crawler methods.
- Pin that no const module and no crawler template carries a directive, and
  that the moved notes are on their pages; the #1824 test now expects no
  directive in Command.get's docstring.

Closes #1884
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) const Regenerated IANA or vendor constant tables; members keep their numeric values review: running A cross-review is in flight against the current head - no verdict yet labels Oct 17, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at 5cfa5a46b. A Sonnet cross-review confirmed the following:

  • Every removed directive sat in emitted LINE/BASE template text, and came out of its const file identically.
  • The directives that stay are on hand-written framework code that never reaches a const module.
  • Every moved note keeps its version and facts.
  • The new test fails on main, catches a directive re-added to a template, and ignores one added to a crawler method's docstring.
  • tests/vendor, tests/const, tests/project and the tier guard pass.

Two gaps, neither blocking. The regex at :42 would miss .. versionchanged:: written with two spaces, or one split across a +. And no Sphinx build of the const pages was run.

@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 17, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 17, 2026
@JarryShaw
JarryShaw merged commit c9b4823 into main Oct 17, 2026
57 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 17, 2026
@JarryShaw
JarryShaw deleted the fix/1884-drop-template-version-directives branch October 17, 2026 16:22
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 17, 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.

const/vendor: drop version directives from the generated tables and their templates

1 participant