Unify zip and async_zip compression methods#13781
Merged
konstin merged 1 commit intoastral-sh:mainfrom Jun 2, 2025
Merged
Conversation
konstin
approved these changes
Jun 2, 2025
Member
|
Can you update the lockfile? |
astral-sh#13285 added additional compression methods for `async_zip`, but they should also be added to `zip` to support local wheel installation, on top of the ones retrieved over network.
corentin-ant
added a commit
to corentin-ant/maturin
that referenced
this pull request
Jun 2, 2025
…evelop` modes This is a follow-up to PyO3#2566 that adds the ability to - Specify other compression methods - Control compression in the `develop` mode, not only `build`. Solves PyO3#2622 ``` --compression-method <COMPRESSION_METHOD> Zip compresson method. Only Stored and Deflated are currently compatible with all package managers [default: deflated] Possible values: - deflated: Deflate compression - stored: No compression - bzip2: BZIP2 compression - zstd: Zstandard compression (supported from Python 3.14) --compression-level <COMPRESSION_LEVEL> Zip compresson level [default: 6] ``` Note that additional compression methods were added in `uv` 0.7.3 in astral-sh/uv#13285 but adding local `whl` is broken until astral-sh/uv#13781 is merged. I tested the change locally by setting ``` compression: maturin::CompressionOptions { compression_method: maturin::CompressionMethod::Bzip2, compression_level: 6, }, ``` in the tests, which is supported by `pip`. I can do a follow-up PR to update the tests after `uv` is updated, possibly with a version check.
konstin
approved these changes
Jun 2, 2025
corentin-ant
added a commit
to corentin-ant/maturin
that referenced
this pull request
Jun 2, 2025
…evelop` modes This is a follow-up to PyO3#2566 that adds the ability to - Specify other compression methods - Control compression in the `develop` mode, not only `build`. Solves PyO3#2622 ``` --compression-method <COMPRESSION_METHOD> Zip compression method. Only Stored and Deflated are currently compatible with all package managers [default: deflated] Possible values: - deflated: Deflate compression - stored: No compression - bzip2: BZIP2 compression - zstd: Zstandard compression (supported from Python 3.14) --compression-level <COMPRESSION_LEVEL> Zip compresson level [default: 6] ``` Note that additional compression methods were added in `uv` 0.7.3 in astral-sh/uv#13285 but adding local `whl` is broken until astral-sh/uv#13781 is merged. I tested the change locally by setting ``` compression: maturin::CompressionOptions { compression_method: maturin::CompressionMethod::Bzip2, compression_level: 6, }, ``` in the tests, which is supported by `pip`. I can do a follow-up PR to update the tests after `uv` is updated, possibly with a version check.
messense
pushed a commit
to PyO3/maturin
that referenced
this pull request
Jun 3, 2025
…evelop` modes. (#2625) This is a follow-up to #2566 that adds the ability to - Specify other compression methods - Control compression in the `develop` mode, not only `build`. Solves #2622 ``` --compression-method <COMPRESSION_METHOD> Zip compresson method. Only Stored and Deflated are currently compatible with all package managers [default: deflated] Possible values: - deflated: Deflate compression - stored: No compression - bzip2: BZIP2 compression - zstd: Zstandard compression (supported from Python 3.14) --compression-level <COMPRESSION_LEVEL> Zip compresson level [default: 6] ``` Note that additional compression methods were added in `uv` 0.7.3 in astral-sh/uv#13285 but adding local `whl` is broken until astral-sh/uv#13781 is merged. I tested the change locally by setting ``` compression: maturin::CompressionOptions { compression_method: maturin::CompressionMethod::Bzip2, compression_level: 6, }, ``` in the tests, which is supported by `pip`. I can do a follow-up PR to update the tests after `uv` is updated, possibly with a version check.
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.
Summary
#13285 added additional compression methods for
async_zip, but they should also be added tozipto support local wheel installation, on top of the ones retrieved over network.Test Plan
Installation of local wheels with alternative compression schemes now works (e.g.
uv add test.whl)