Skip to content

ZipWriter requires a compression level of None for the stored method #2644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025

Conversation

jatoben
Copy link
Contributor

@jatoben jatoben commented Jun 10, 2025

I tried using the stored compression level in Maturin 1.8.7 with my project, but I hit this error:

% maturin develop -b pyo3 -m path/to/Cargo.toml --compression-method stored --profile release
🔗 Found pyo3 bindings
🐍 Found CPython 3.13 at /Users/jatoben/.pyenv/versions/3.13.3/envs/project-3.13.3/bin/python
📡 Using build options features from pyproject.toml
    Finished `release` profile [optimized] target(s) in 0.02s
💥 maturin failed
  Caused by: unsupported Zip archive: Unsupported compression level

The same issue also occurred when I ran cargo test --features faster-tests.

ZipWriter requires the compression level to be None if the method is CompressionMethod::Stored. I didn't want to change the existing external interface, so I added a check for this case inside CompressionOptions::get_file_options().

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@messense messense merged commit 800fb6a into PyO3:main Jun 11, 2025
40 of 42 checks passed
@jatoben jatoben deleted the compression-stored branch June 14, 2025 21:04
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Jun 24, 2025
https://build.opensuse.org/request/show/1288127
by user mia + anag_factory
- Update to 1.9.0
  * Update pyproject-toml to 0.13.5
    gh#PyO3/maturin#2645
  * Fix clippy lints
    gh#PyO3/maturin#2648
  * ZipWriter requires a compression level of None for the stored
    method
    gh#PyO3/maturin#2644
  * Implement PEP 639 Support
    gh#PyO3/maturin#2647
  * Don't go through Display for platform tag to policy
    gh#PyO3/maturin#2652
  * Add --compatibility pypi to avoid building for unsupported
    architectures
    gh#PyO3/maturin#2650
  * Fix self bootstrap without Rust installed
    gh#PyO3/maturin#2653
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants