You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(one-home): dpkt's new _fragment helper's IP version checks are flagged as copies of IPV6_NEXT_HEADER_OFFSET #2342
tests/project/test_rfc_constants_one_home_1739_unit.py::TestNotReinlined::test_sweep fails on PR #2338's head (42903c784): the new pcapkit/toolkit/dpkt.py::_fragment helper takes an IP version number, and the sweep flags every 6 it spells as a copy of the homed constant IPV6_NEXT_HEADER_OFFSET (value 6, home pcapkit.protocols.internet.ipv6). A false positive by value collision with the unrelated IP version number 6.
Three sites, two distinct _context() strings:
pcapkit/toolkit/dpkt.py:708: _fragment(6) (a copy of a homed constant?)
pcapkit/toolkit/dpkt.py:569: version == 6 (a copy of a homed constant?)
pcapkit/toolkit/dpkt.py:561: version == 6 (a copy of a homed constant?)
The precedent is already in the test file's NOT_A_COPY dict for the sibling engine module:
('pcapkit/foundation/engines/dpkt.py', 'version == 6'):
'the IP version number',
and the same reading for pcapkit/protocols/misc/pcap/frame.py and pcapkit/protocols/misc/pcapng.py, both ('…', 'version == 6'): 'the IP version number, not the decimal places of a resolution'. So pcapkit/toolkit/dpkt.py needs the equivalent two entries.
The fix cannot land on main ahead of #2338.test_sweep also guards against stale entries (assertEqual(sorted(set(NOT_A_COPY) - seen_copy), [])), so entries naming _fragment fail on a tree where _fragment does not exist yet. Measured on 9dd46d8d4: with the entries added and #2338's dpkt.py reverted, test_sweep fails with [('pcapkit/toolkit/dpkt.py', '_fragment(6)'), ('pcapkit/toolkit/dpkt.py', 'version == 6')] != []. The entries therefore have to go in #2338 itself, or merge simultaneously with it.
Folded into PR #2338 (amended to d2841387c), since the NOT_A_COPY entries only match once that PR's dpkt.py is in the tree, as you noted. Closing with it.
Activity
JarryShaw commentedon Oct 27, 2026
Folded into PR #2338 (amended to
d2841387c), since the NOT_A_COPY entries only match once that PR's dpkt.py is in the tree, as you noted. Closing with it.