Skip to content

docs(extraction): name only PyShark and PyPCAPFile for the PCAP trace warning (#1719) - #1720

Merged
JarryShaw merged 1 commit into
mainfrom
docs/1719-extraction-trace-warns
Oct 14, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
docs/1719-extraction-trace-warns

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 of your pull request and other information

Closes #1719.

  • Fix: Extractor.__init__'s Warns: bullet for PCAP trace output named DPKT and Scapy. The guard at pcapkit/foundation/extraction.py:1315 stopped warning for those two in design: late duplicate IP fragments, and dpkt/scapy trace_format=pcap fallback #1507. The bullet now names only PyShark and PyPCAPFile.
  • Checked: the next bullet, on PCAP output from a third-party engine, matches its guard at :1192 and is unchanged.
  • Tests: two tests in tests/foundation/test_extraction.py run the constructor once per registered engine, collect the engines each guard warns for, and compare that set with the engines the bullet names.
  • Fail before: against the unfixed docstring, the trace test fails with 'dpkt' and 'scapy' extra. Removing pcap-ct from the second bullet makes the other test fail too.
  • Run: pytest tests/foundation/test_extraction.py: 24 passed.

… warning (#1719)

- Extractor.__init__ Warns: the PCAP-trace bullet still named DPKT and
  Scapy, which left the trace_format guard in #1507; it now names only
  PyShark and PyPCAPFile, matching the guard
- the PCAP-output bullet (DPKT, Scapy, PyShark, PyPCAP, pcap-ct,
  PyPCAPFile) was checked against its guard and is accurate; unchanged
- tests/foundation/test_extraction.py: two tests parse each bullet's
  engine list and compare it with the engines its guard actually warns
  for, so the docstring and the guard tuples cannot drift apart again

Closes #1719

tests/foundation/test_extraction.py: 24 passed; the trace-bullet test
fails against the unfixed docstring ('dpkt', 'scapy' extra).
@JarryShaw JarryShaw added docs Pull requests that change documentation only (docs: subject prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate labels Oct 14, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 14, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at 9068362ec. A Sonnet cross-review checked the change (the author was Opus).

  • Docstring against the guards: the trace bullet now matches the guard at extraction.py:1315, and the output bullet matches the guard at :1192.
  • Fail before: I re-ran it myself. Against the unfixed docstring the trace test fails (1 failed, 1 passed, 'dpkt' and 'scapy' extra). The fixed tree passes both tests.
  • Mutations: the reviewer's mutations break each guard and each bullet in turn, and every one is caught. Wording the tests cannot parse fails loudly.
  • Non-blocking: the tests pin the docstring against the guards, not the guards against the adapters. A new engine added to neither would still pass.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 89.47% (unit tier, Python 3.15, 9068362ec, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 3 20 3 95.16%
pcapkit/const 18860 954 2368 868 91.06%
pcapkit/corekit 2372 67 762 35 96.49%
pcapkit/dumpkit 275 3 100 3 98.40%
pcapkit/foundation 3035 151 1076 34 94.28%
pcapkit/interface 138 7 52 5 93.68%
pcapkit/protocols 17166 226 4580 190 98.07%
pcapkit/toolkit 1437 281 592 6 77.97%
pcapkit/utilities 494 4 146 4 98.75%
pcapkit/vendor 4417 2342 1010 157 43.38%

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

@JarryShaw
JarryShaw merged commit 27ccb5f into main Oct 14, 2026
52 checks passed
@JarryShaw
JarryShaw deleted the docs/1719-extraction-trace-warns branch October 14, 2026 13:09
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 14, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 14, 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(foundation): Extractor's Warns block lists DPKT and Scapy for PCAP trace output, which #1507 stopped warning for

1 participant