Describe the bug
examples/generators/pcapng.py:410-413 explains why its fixture adds a trailing newline, and cites the defect location:
The underlying defect is pcapkit/protocols/schema/misc/pcapng.py:1376 splitting self.entry without first stripping the block padding.
:1376 is wrong, and the code it describes may no longer exist at all. Measured on ef859f776:
$ git show origin/main:pcapkit/protocols/schema/misc/pcapng.py | grep -n "self.entry"
1805: Entries used to be split apart with ``self.entry.split(b'\n\n')``
1840: total = len(self.entry)
1841: entry_data = io.BytesIO(self.entry)
So two things are stale, not one:
- The line number. Nothing about
self.entry is at :1376; the relevant code is at :1840-1841.
- Possibly the mechanism.
:1805 describes the self.entry.split(b'\n\n') approach in the past tense — "Entries used to be split apart with" — and the current code reads the entry through io.BytesIO instead. If the split-without-stripping defect is genuinely gone, the comment is not merely mis-citing, it is describing a defect that no longer exists and justifying a fixture workaround that may no longer be needed.
Expected behavior
The comment should cite the real location, or say plainly that the defect was fixed and why the fixture keeps the newline anyway. Whoever takes this should establish which of the two cases holds before editing the prose — that is the actual work here, not the line number.
Additional context
Found by the cross-review on #790, while sweeping for other copies of that PR's stale claims. This is a recurring defect class rather than a one-off: #756 was the same shape in extraction.py, and #785 in test_pcapng_end_to_end.py — which is why #790 now frames its retained number as a dated measurement rather than a fact. A cheap general guard would be worth considering as a follow-up: a test that greps prose for path.py:N citations and checks the cited line still contains the named construct.
Describe the bug
examples/generators/pcapng.py:410-413explains why its fixture adds a trailing newline, and cites the defect location::1376is wrong, and the code it describes may no longer exist at all. Measured onef859f776:So two things are stale, not one:
self.entryis at:1376; the relevant code is at:1840-1841.:1805describes theself.entry.split(b'\n\n')approach in the past tense — "Entries used to be split apart with" — and the current code reads the entry throughio.BytesIOinstead. If the split-without-stripping defect is genuinely gone, the comment is not merely mis-citing, it is describing a defect that no longer exists and justifying a fixture workaround that may no longer be needed.Expected behavior
The comment should cite the real location, or say plainly that the defect was fixed and why the fixture keeps the newline anyway. Whoever takes this should establish which of the two cases holds before editing the prose — that is the actual work here, not the line number.
Additional context
Found by the cross-review on #790, while sweeping for other copies of that PR's stale claims. This is a recurring defect class rather than a one-off: #756 was the same shape in
extraction.py, and #785 intest_pcapng_end_to_end.py— which is why #790 now frames its retained number as a dated measurement rather than a fact. A cheap general guard would be worth considering as a follow-up: a test that greps prose forpath.py:Ncitations and checks the cited line still contains the named construct.