Warn on unexpected ZIP compression methods (#17885)
## Summary This adds warnings to both our steam and sync ZIP handling on ZIP entries that aren't "well-known." For now, "well-known" means stored (i.e. no compression), DEFLATE, or zstd. In practice we have duplicated codepaths for this check: one for the "sync" (pre-downloaded) path, and one for the streaming path. See #16911 and #17467 for context. ## Test Plan Will update snapshots if/when they change. I'll also add a ZIP test for this. (Upd: added some "futzed" wheels for the ZIP tests.) --------- Signed-off-by: William Woodruff <william@astral.sh>
This commit is contained in:
@@ -47,7 +47,7 @@ pub(crate) async fn validate_zip(
|
||||
|
||||
let target = tempfile::TempDir::new()?;
|
||||
|
||||
uv_extract::stream::unzip(reader.compat(), target.path()).await?;
|
||||
uv_extract::stream::unzip(args.url.to_url(), reader.compat(), target.path()).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user