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:
William Woodruff
2026-02-09 12:53:15 -05:00
committed by GitHub
parent 3290856161
commit 5c74d31eb8
15 changed files with 180 additions and 43 deletions
+1 -1
View File
@@ -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(())
}