Repository navigation
Rewind Hadoop and raw streams after format detection - #156
Merged
martindurant merged 2 commits intoNov 16, 2026
Merged
Conversation
Member
|
The cancelled job is due to old CI system requirements. Please update. |
Contributor
Author
|
Updated the macOS runner to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After format detection,
python -m snappy -d input.snappy outputproduces an empty file with exit status 0 for a Hadoop stream, and raisesUncompressErrorfor a raw stream. Both format probes leave the input at EOF. This is reproducible on current master withbytes(range(256))compressed using the corresponding stream compressor.Rewind after those two seek-dependent probes before returning the decoder. Framed streams keep their existing behavior, including decompression from a pipe.
Adds API and CLI regressions, a framed-stdin check, and includes
test_formats.pyin the CI test commands. On Windows, CPython 3.13.1 and cramjam 2.14.0: the four new Hadoop/raw cases fail on unchanged master; the source and installed-wheel suites each pass 27 tests and four subtests. Flake8's CI error selection, sdist/wheel builds and Twine checks pass (existing packaging warnings remain). Other platforms were not run locally.Related to #153 and #154. The read-ahead problem was also noted in #155; this fixes the remaining Hadoop/raw paths after #154 was merged.