Skip to content
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

Concerns with zip version 1.x #3642

Closed
musicinmybrain opened this issue May 17, 2024 · 4 comments · Fixed by #3645
Closed

Concerns with zip version 1.x #3642

musicinmybrain opened this issue May 17, 2024 · 4 comments · Fixed by #3645

Comments

@musicinmybrain
Copy link
Contributor

I am working on packaging uv for Fedora Linux. Currently, we are wary of updating the zip crate past version 0.6.x (and will hold off on doing so for now) due to concerns with how the zip-rs project project is being handled:

All releases starting with v1.0.0 were developed and released by different people than the original crate, with the hand-off being handled in a kind of weird way. Additionally, releases 1.2.0+ of the "new" zip crate contain breaking API changes which are not going to be fixed in the 1.x series.

Since uv can be made to work with version 0.6.6, would it be possible to either:

  • depend on zip 0.6.6 for now, if you decide you share these concerns, or:
  • at least relax the dependency to something like >=0.6.6, <2.0 to explicitly allow building with both zip v0.6 and v1?

Note that the zip crate maintainer is planning a 2.0 release in a couple of weeks.

In order to build with zip 0.6.6, with tests passing, one source change is necessary:

use zip::write::SimpleFileOptions;

needs to be use zip::write::FileOptions as SimpleFileOptions, since the SimpleFileOptions alias was added in 1.x.

If the uv project decides to change nothing, I will just carry a small downstream patch to support zip 0.6.6 for the time being.

@musicinmybrain
Copy link
Contributor Author

See also: PyO3/python-pkginfo-rs#13

@zanieb
Copy link
Member

zanieb commented May 17, 2024

We're still considering this as a team, but it seems likely we'd pin until we have more details. Would you be willing to open a pull request?

musicinmybrain added a commit to musicinmybrain/uv that referenced this issue May 17, 2024
@musicinmybrain
Copy link
Contributor Author

We're still considering this as a team, but it seems likely we'd pin until we have more details. Would you be willing to open a pull request?

Sure! I hope #3645 is what you needed. Thanks for considering this.

@zanieb zanieb linked a pull request May 18, 2024 that will close this issue
charliermarsh pushed a commit that referenced this issue May 18, 2024
## Summary

Restore API-compatibility with pre-1.1.0 versions of the `zip` crate,
and pin the dependency to the 0.6 series, due to concerns discussed in
#3642.

## Test Plan

```
cargo run -p uv-dev -- fetch-python
cargo test
```
@AlexWaygood
Copy link
Member

In astral-sh/ruff#11779, we're adding zip as a dependency to Ruff as well, for red-knot. For now we're pinning it to the same version that uv has it pinned to.

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 a pull request may close this issue.

3 participants