mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Update Rust crate zip to v1 (#3175)
This commit is contained in:
parent
14f05f27b3
commit
054fa3e439
3 changed files with 28 additions and 6 deletions
25
Cargo.lock
generated
25
Cargo.lock
generated
|
@ -127,6 +127,15 @@ version = "1.0.82"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519"
|
||||
|
||||
[[package]]
|
||||
name = "arbitrary"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
|
||||
dependencies = [
|
||||
"derive_arbitrary",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "arc-swap"
|
||||
version = "1.7.1"
|
||||
|
@ -983,6 +992,17 @@ dependencies = [
|
|||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_arbitrary"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.58",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "diff"
|
||||
version = "0.1.13"
|
||||
|
@ -5640,10 +5660,11 @@ checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
|
|||
|
||||
[[package]]
|
||||
name = "zip"
|
||||
version = "0.6.6"
|
||||
version = "1.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
|
||||
checksum = "f2655979068a1f8fa91cb9e8e5b9d3ee54d18e0ddc358f2f4a395afc0929a84b"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
"byteorder",
|
||||
"crc32fast",
|
||||
"crossbeam-utils",
|
||||
|
|
|
@ -149,7 +149,7 @@ wiremock = { version = "0.6.0" }
|
|||
walkdir = { version = "2.5.0" }
|
||||
which = { version = "6.0.0" }
|
||||
winapi = { version = "0.3.9" }
|
||||
zip = { version = "0.6.6", default-features = false, features = ["deflate"] }
|
||||
zip = { version = "1.1.0", default-features = false, features = ["deflate"] }
|
||||
|
||||
[patch.crates-io]
|
||||
# For pyproject-toml
|
||||
|
|
|
@ -11,7 +11,7 @@ use rustc_hash::FxHashMap;
|
|||
use sha2::{Digest, Sha256};
|
||||
use tracing::{instrument, warn};
|
||||
use walkdir::WalkDir;
|
||||
use zip::write::FileOptions;
|
||||
use zip::write::SimpleFileOptions;
|
||||
use zip::ZipWriter;
|
||||
|
||||
use pypi_types::DirectUrl;
|
||||
|
@ -190,7 +190,8 @@ pub(crate) fn windows_script_launcher(
|
|||
// We're using the zip writer, but with stored compression
|
||||
// https://github.com/njsmith/posy/blob/04927e657ca97a5e35bb2252d168125de9a3a025/src/trampolines/mod.rs#L75-L82
|
||||
// https://github.com/pypa/distlib/blob/8ed03aab48add854f377ce392efffb79bb4d6091/PC/launcher.c#L259-L271
|
||||
let stored = FileOptions::default().compression_method(zip::CompressionMethod::Stored);
|
||||
let stored =
|
||||
SimpleFileOptions::default().compression_method(zip::CompressionMethod::Stored);
|
||||
let mut archive = ZipWriter::new(Cursor::new(&mut payload));
|
||||
let error_msg = "Writing to Vec<u8> should never fail";
|
||||
archive.start_file("__main__.py", stored).expect(error_msg);
|
||||
|
@ -731,10 +732,10 @@ mod test {
|
|||
use std::io::Cursor;
|
||||
use std::path::Path;
|
||||
|
||||
use crate::Error;
|
||||
use indoc::{formatdoc, indoc};
|
||||
|
||||
use crate::wheel::format_shebang;
|
||||
use crate::Error;
|
||||
|
||||
use super::{parse_key_value_file, parse_wheel_file, read_record_file, relative_to, Script};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue