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
fix(corekit): the record-skip helper trusts seekable() as the Extractor did before #2104 #2108
Found while reviewing #2104. The skip helper in pcapkit/corekit/io.py (the function that skips the rest of a record, just above PeekableStream) picks seek or read by isinstance(file, SeekableReader) or not file.seekable(). On Windows a pipe reports seekable() as True while seek does nothing (CPython gh-86768), so a raw pipe reaching this helper would "skip" without moving.
Once #2104 lands, the Extractor wraps such a stream in SeekableReader before any frame reader sees it, so that path is covered. The open question is whether any other caller hands the helper a raw stream, such as an engine or protocol used directly.
To do: check every caller. Then either share #2104's _can_seek() here or document why it cannot see a raw pipe, with a test either way. This depends on #2104 merging first.
Activity
fix(corekit): skip a record by reading when the stream only claims to…
refactor(corekit): make can_seek public in pcapkit.corekit.io (#2108)