Skip to content

fix(engines): require scapy>=2.6.0 in the Scapy and dev extras (#1572) - #1578

Merged
JarryShaw merged 1 commit into
mainfrom
fix/1572-scapy-minimum-version
Oct 10, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
fix/1572-scapy-minimum-version

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Oct 10, 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

Description of your pull request and other information

Closes #1572.

  • Fix: Scapy and dev now require "scapy>=2.6.0; python_version >= '3.7'", and the Pipfile [dev-packages] entry has the same floor and marker. 2.6.0 is the first release after 2.5.0 and fixes all three failures in the issue. The marker works like PCAP_CT's: 2.6.0 declares Requires-Python >=3.7.
  • Measured on main (cc084357f, fix(engines): take a scapy packet's link type and clock from its interface (#1503, #1517, #1549) #1563 included): toolkit, trace and engine-agreement selections give 4 failed on scapy 2.5.0 and 22 passed on 2.6.0. 2.6.0 installs and imports on 3.10–3.14. A pip install --dry-run of the new requirement, run over an existing 2.5.0 install, upgrades it to 2.8.0.
  • Docs: the engine-prerequisites note in docs/source/index.rst states the floor, and that pcapkit does not check the version at run time.
  • Tests: a new DependencyRequirementTests method pins both requirement strings. On main it fails with ['scapy'] != ["scapy>=2.6.0; python_version >= '3.7'"]. Its dev half fails by itself too.
  • Not changed: conda/requirements.txt and examples/benchmark/requirements-common.txt already pin scapy==2.8.0. There is no Pipfile.lock, and no test reads the Pipfile. CI installs through the extras.

@JarryShaw JarryShaw added fix Pull requests that fix a defect (fix: subject prefix) review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 10, 2026
- The Scapy extra was unpinned, so scapy 2.5.0 satisfied it. On 2.5.0 the
  engine reads a PCAP-NG nanosecond interface as microseconds (scapy drops
  if_tsresol after a comment option without a newline), and packet2dict
  reports DNS records as a dict and IP's options key first. 2.6.0, the next
  release, fixes all three. Both extras now carry
  "scapy>=2.6.0; python_version >= '3.7'", the marker as PCAP_CT's, since
  2.6.0 needs Python 3.7. The Pipfile's dev-packages entry matches.
- docs/source/index.rst's engine-prerequisites note states the floor.
- test_tier_guard pins both requirement strings; it fails on main.

Toolkit, trace and engine-agreement selections fail on 2.5.0 and pass on
2.6.0; tier-guard and docs-claims tests pass.
@JarryShaw
JarryShaw force-pushed the fix/1572-scapy-minimum-version branch from dc08514 to ef436c0 Compare October 10, 2026 05:24
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 10, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at ef436c04e. Cross-reviewed on Sonnet; the author ran Opus. It merges cleanly into current main.

  • The floor is right. On origin/main, scapy 2.5.0 fails all three: KeyError: 0 in test_dns_records_are_converted, trace hash b2a5ea79… against 7679cddf…, and profile.pcapng timestamps 1500000000.0005 != 1500000.0000005. Scapy 2.6.0, the next release, passes them, and its scapy CI selection gives 68 passed.
  • The requirement strings work. Both extras reject 2.4.5 and 2.5.0, accept 2.6.0–2.8.0, and their marker is false on 3.6 but true on 3.7 and 3.10–3.14. pip install --dry-run '.[Scapy]' resolves 2.8.0, even in a venv already holding 2.5.0. pipenv 2026.8.0 parses the Pipfile entry as the same requirement.
  • Nothing is missed. conda/requirements.txt and examples/benchmark/ pin 2.8.0. The workflows install through the extra. Nothing else in the repo admits 2.5.0.
  • Fail-before: with main's pyproject.toml, the new test fails ['scapy'] != [...].
  • Tests: tests/test_tier_guard.py (110), the two doc-claims modules and test_isort_clean.py all pass.

Non-blocking nits:

  • The comment at pyproject.toml:146 says the marker matches PCAP_CT's, but PCAP_CT's is >= '3.10'. Only the mechanism is shared, and the test docstring repeats the slip.
  • The docs note names only the timestamp failure. It doesn't mention the DNS shape or key-order differences.

@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 10, 2026
@JarryShaw
JarryShaw merged commit e4c707e into main Oct 10, 2026
36 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 10, 2026
@JarryShaw
JarryShaw deleted the fix/1572-scapy-minimum-version branch October 10, 2026 05:57
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull requests that fix a defect (fix: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(engines): the unpinned Scapy extra admits scapy 2.5.0, which misreads PCAP-NG timestamps and reshapes packet2dict output

1 participant