Skip to content

docs(protocols): sweep application, misc and the protocol base (#1103) - #1765

Merged
JarryShaw merged 1 commit into
mainfrom
docs/1103-application
Oct 15, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/1103-application

Conversation

@JarryShaw

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

Description

Part of #1103, the whole-repository prose sweep, for the application slice. It follows the #719 rules: prose only, accuracy first, no churn and no timed context.

Version directives (1.5.0), in module docstrings and on the pages:

  • versionchanged for the rebuild and construction-keyword changes on
    Application, FTP, HTTP/1.*, HTTP/2, PCAP, PCAP-NG and the base
  • versionadded/versionremoved for the OSPF and RARP move out of
    protocols.link and the CryptographicAuthentication rename
  • versionchanged on schema_final (@Final enforced) and Option's ns=

Accuracy:

Render: literals moved out of bold, a Note split by the injected rtype
moved, a role broken over two lines joined, a duplicate automethod cut.

Checks:

  • An AST guard holds on every changed .py file.
  • tests/project gives 930 passed and 1 skipped, and every test that reads the edited paths passes.
  • A merged Sphinx build of all nine slices adds no new warnings.
  • A Sonnet cross-review sent this back once. After the fix round, a re-check returned GOOD TO GO.

Not covered here; a round-2 PR follows: the rest of httpv2.py, the short pcapng and pcapng-schema docstrings, and pcapkit/protocols/data/**, which no slice covered.

Refs #1103

Version directives (1.5.0), in module docstrings and on the pages:
- versionchanged for the rebuild and construction-keyword changes on
  Application, FTP, HTTP/1.*, HTTP/2, PCAP, PCAP-NG and the base
- versionadded/versionremoved for the OSPF and RARP move out of
  protocols.link and the CryptographicAuthentication rename
- versionchanged on schema_final (@Final enforced) and Option's ns=

Accuracy:
- pack() builds from kwargs alone and replaces __header__; the
  _check_construction_keywords kwargs cover from_data too
- "contains X only" fixed in protocol.py, httpv1 and pcapng
- Engine's keyword is engine=; register() checks ProtocolBase; the
  beholder and Schema.get_payload refs name the defining modules
- TLSKeyLabel directive cites issue #886, not PR #890
- timed wording ("currently", "no longer", "as before") removed

Render: literals moved out of bold, a Note split by the injected rtype
moved, a role broken over two lines joined, a duplicate automethod cut.

Refs #1103
@JarryShaw JarryShaw added the docs Pull requests that change documentation only (docs: subject prefix) label Oct 15, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at d865570d7. A Sonnet cross-review checked it (author: Opus), after one fix round.

  • First review, two blocking findings:
    • the pcapng option-overrun sentence said such an option is refused;
    • NGAP carried versionchanged although the class is new in 1.5.0.
  • Re-check: both are fixed, and the overrun behaviour was measured on the head and on v1.4.1.post2. An overrunning option now leaves its area kept as captured in options_raw, with a ProtocolWarning; 1.4.x read zeros.
  • AST guard: all 18 .py files are identical once docstrings are blanked.
  • Tests: tests/project gives 930 passed.

@JarryShaw JarryShaw added the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 15, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 15, 2026
@JarryShaw
JarryShaw merged commit 25bd6fb into main Oct 15, 2026
53 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 15, 2026
@JarryShaw
JarryShaw deleted the docs/1103-application branch October 15, 2026 17:17
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: NEEDS CHANGES at d865570d7. This supersedes the earlier good-to-go. The register Raises: clauses in pcapkit/protocols/protocol.py were changed to say "not a ProtocolBase subclass". #1016 settled that the public registration door names the public class, and #1028 deliberately kept these clauses on Protocol; ProtocolBase is documented as internal-only. Those lines go back to Protocol. The same rewording in the #1103 round-2 commits is being reverted in the same pass.

@JarryShaw JarryShaw added review: needs-changes Cross-review at the current head says changes are required; see the verdict comment and removed review: good-to-go Cross-review at the current head says ready; CI state is separate review: needs-changes Cross-review at the current head says changes are required; see the verdict comment labels Oct 15, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Correction: this PR had already merged when I posted the note above, so nothing changes here. The revert of the ProtocolBase wording in protocol.py's Raises: clauses goes into the #1103 round-2 application PR instead.

JarryShaw added a commit that referenced this pull request Oct 15, 2026
…base (#1103) (#1785)

protocol.rst:
- give ProtocolBase targets for every member Protocol documents, as
  grouped stubs linking to the Protocol entries, so the ProtocolBase.*
  references across the tree resolve; document its own
  __init_subclass__, and __keywords__ and __length_hint__ under Protocol
- drop the FRAME_LAYER_LIMIT versionremoved, a beta-only name, here and
  in protocol.py

Accuracy:
- register() names the public Protocol class, as ruled on #1016: put
  back the wording #1765 changed to ProtocolBase in protocol.py, PCAP
  and PCAP-NG
- HTTP/2 makers: the settings types accepted and the type check
  otherwise; sid_dep sets PRIORITY
- PCAP-NG: EPB timestamps are not in seconds; SPB's interface, timestamp
  and epoch are fixed; opt_endofopt and nrb_record_end are moved to the
  end, not ignored; NWK, not NKW
- PCAP ts_usec holds nanoseconds in a nanosecond-resolution file

Refs #1103
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.

1 participant