Add Seek fallback for zip files (#2320)

## Summary

Some zip files can't be streamed; in particular, `rs-async-zip` doesn't
support data descriptors right now (though it may in the future). This
PR adds a fallback path for such zips that downloads the entire zip file
to disk, then unzips it from disk (which gives us `Seek`).

Closes https://github.com/astral-sh/uv/issues/2216.

## Test Plan

`cargo run pip install --extra-index-url https://buf.build/gen/python
hashb_foxglove_protocolbuffers_python==25.3.0.1.20240226043130+465630478360
--force-reinstall -n`
This commit is contained in:
Charlie Marsh 2024-03-10 08:39:28 -07:00 committed by GitHub
parent 67fb023f10
commit a267a501b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 591 additions and 160 deletions

View file

@ -182,7 +182,7 @@ pub enum ErrorKind {
metadata: PackageName,
},
#[error("The wheel {0} is not a valid zip file")]
#[error("Failed to unzip wheel: {0}")]
Zip(WheelFilename, #[source] ZipError),
#[error("Failed to write to the client cache")]