Skip to content

fix(docs): drop dpkt.py's duplicate DPKT target and let the epilog test see #: comments (#2177) - #2181

Merged
JarryShaw merged 1 commit into
mainfrom
fix/2177-dpkt-epilog-target
Oct 25, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/2177-dpkt-epilog-target

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • fix — corrects a defect

Description

Closes #2177.

  • Defect: the TIMESTAMP_ATTR and BUFFER_ATTR #: comments in pcapkit/toolkit/dpkt.py define .. _DPKT: again, though rst_epilog already defines it.
  • Fix: both targets are removed; the epilog's DPKT target serves the references.
  • Test fix: test_no_file_defines_an_epilog_name_again read raw file text, where TARGET and SUBST cannot match behind a #: prefix. It now scans _rendered() text (docstrings and #: comments, with the prefix blanked) through a new _redefinitions() helper. test_a_doc_comment_redefinition_is_seen pins the #: case.
  • Without the fix: on main, the updated test fails with Lists differ: ['pcapkit/toolkit/dpkt.py:58: _DPKT', 'pcapkit/toolkit/dpkt.py:71: _DPKT'] != [] (1 failed, 9 passed). With the fix, 10 pass.
  • Overlap: docs(foundation): fifth whole-repo pass over foundation, toolkit, dumpkit, interface and utilities (#1103) #2157 also edits dpkt.py; the two merge cleanly.

…st see #: comments (#2177)

Problem: the TIMESTAMP_ATTR and BUFFER_ATTR #: comments in
pcapkit/toolkit/dpkt.py define `.. _DPKT:` again, though rst_epilog already
defines it. test_no_file_defines_an_epilog_name_again read raw file text, so
its TARGET and SUBST patterns could not match behind a #: prefix.

Fix: delete both targets; the epilog's DPKT target serves the references.
The test now scans _rendered() text (docstrings and #: comments, the prefix
blanked), through a new _redefinitions() helper.

Test: test_no_file_defines_an_epilog_name_again fails on origin/main's
dpkt.py (lines 58 and 71) and passes with the fix;
test_a_doc_comment_redefinition_is_seen pins the #: case.
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) test Pull requests that add or correct tests (test: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 25, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Review: GOOD TO GO at 8cc33011d (Sonnet): rst_epilog keeps the DPKT target, the test fails on main at dpkt.py:58/71, and reverting to raw text fails the new #: 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 25, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 25, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge at 8cc33011d. Merging closes #2177.

  • Review: Sonnet GOOD TO GO.
  • CI: Required checks passed SUCCESS, 0 failed. Still open: the board's Sync Status and the non-gating Python graalpy-25.4 (experimental) leg.
  • KTLO: 12 legs, no warnings.
  • Ordering: the project leg merged into main: 2289 tests, 0 failures.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.55% (unit tier, Python 3.15, 8cc33011d, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19599 880 2618 866 92.12%
pcapkit/corekit 2589 75 816 37 96.48%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2971 23 1036 25 98.80%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17418 219 4574 185 98.14%
pcapkit/toolkit 869 36 298 10 95.20%
pcapkit/utilities 504 7 146 5 98.15%
pcapkit/vendor 4432 1988 1018 167 51.87%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit 9d4c409 into main Oct 25, 2026
68 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 25, 2026
@JarryShaw
JarryShaw deleted the fix/2177-dpkt-epilog-target branch October 25, 2026 14:24
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 25, 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) test Pull requests that add or correct tests (test: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs(toolkit): dpkt.py re-defines the rst_epilog DPKT target, and the epilog test cannot see #: comments

1 participant