Repository navigation
Fix LZMA container decoding with custom filters - #886
Open
Golden007-prog wants to merge 4 commits into
Open
Golden007-prog wants to merge 4 commits into
Golden007-prog wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #886 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 921 922 +1
=========================================
+ Hits 921 922 +1
🚀 New features to boost your workflow:
|
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.
Fixes #188.
LZMAcan encode XZ and ALONE containers with custom filters, but decoding those containers forwards the filter list tolzma.decompress, which rejects explicit filters outsideFORMAT_RAW. Read container filters from their headers by supplying the filter list only for raw streams. This preserves the configured format and keeps raw decoding's required explicit filter chain.The regression covers custom XZ and ALONE filters plus a RAW control, using the existing buffer/array/output-buffer round-trip helper and registry-restored configurations. It also verifies standard-library decoding of the encoded bytes. On unchanged source, XZ and ALONE fail with
Cannot specify filters except with FORMAT_RAW, while nine other cases pass.Validation on Linux/WSL, Python 3.12 with the declared Meson/Cython build and unchanged c-blosc submodule:
zstdexecutable; installing the official Ubuntu tool in the disposable test environment resolves both failures without changing tests or repository configuration.git diff --check, pass.a494015.a494015: 41 successful overall (39 check-runs and two legacy statuses), two skipped, no pending or failed checks. This includes the 32-bit test job and platform wheel builds.Upstream integration update
Merged current upstream main into the topic and resolved the LZMA conflict. The change continues to pass explicit filters only for
FORMAT_RAW, while preserving upstream's typed overloads and output-buffer identity behavior. Upstream also includes the fix for importingzfpy 1.0.1.post0, which caused the earlier test-collection and Read the Docs failures.The XZ and ALONE regression cases fail on the unchanged upstream implementation. The RAW control passes before and after. On the integrated head, 144 focused tests passed and the full Python 3.12 suite reported 1,040 passed and 21 skipped. Ruff, formatting, mypy, and Pyright passed. The LZMA module had 100% statement coverage (41 of 41 lines). Sphinx produced HTML with two warnings from the existing documentation. The CI-matched Python 3.13 stub check passed for all eight modules.
Hosted checks for
05279c3finished with 34 successful contexts and two expected release-upload skips. Tests, typing, wheels, i386, code scanning, Read the Docs and pre-commit passed. Codecov reported 100% for both project and patch. The earlier totals above refer toa494015.TODO:
docs/release.mdAI assistance: OpenAI Codex researched, implemented and validated this contribution.