From a0aac01d32b83d3bca38ce084d47e504577a022f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 24 Feb 2026 11:13:39 +0000 Subject: [PATCH 1/2] Update zip to 8.1 Deal with removal of deprecated `DateTime` methods, https://github.com/zip-rs/zip2/pull/597. --- Cargo.lock | 23 +++++++++++++++-------- Cargo.toml | 2 +- src/build_context.rs | 1 + tests/common/other.rs | 6 +++--- tests/run.rs | 2 +- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 770bdfabf..6251a01a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1599,11 +1599,10 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "lzma-rust2" -version = "0.13.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c60a23ffb90d527e23192f1246b14746e2f7f071cb84476dd879071696c18a4a" +checksum = "47bb1e988e6fb779cf720ad431242d3f03167c1b3f2b1aae7f1a94b2495b36ae" dependencies = [ - "crc", "sha2", ] @@ -1724,7 +1723,7 @@ dependencies = [ "which", "wild", "xz2", - "zip 6.0.0", + "zip 8.1.0", ] [[package]] @@ -2259,7 +2258,7 @@ dependencies = [ "rfc2047-decoder", "tar", "thiserror 2.0.18", - "zip 6.0.0", + "zip 4.6.1", ] [[package]] @@ -3155,6 +3154,7 @@ checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "itoa", + "js-sys", "num-conv", "powerfmt", "serde_core", @@ -3412,6 +3412,12 @@ dependencies = [ "rand 0.9.2", ] +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + [[package]] name = "typenum" version = "1.19.0" @@ -4221,15 +4227,15 @@ dependencies = [ "flate2", "indexmap", "memchr", + "zopfli", ] [[package]] name = "zip" -version = "6.0.0" +version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" +checksum = "6e499faf5c6b97a0d086f4a8733de6d47aee2252b8127962439d8d4311a73f72" dependencies = [ - "arbitrary", "bzip2", "crc32fast", "flate2", @@ -4237,6 +4243,7 @@ dependencies = [ "lzma-rust2", "memchr", "time", + "typed-path", "zopfli", "zstd", ] diff --git a/Cargo.toml b/Cargo.toml index 41d013e14..e44c131d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ tar = "0.4.38" tempfile = "3.2.0" toml = "0.9.11" toml_edit = "0.24.0" -zip = { version = "6.0.0", default-features = false, features = [ +zip = { version = "8.1.0", default-features = false, features = [ "bzip2", "deflate", "time", diff --git a/src/build_context.rs b/src/build_context.rs index 36fa12607..b64de2ca7 100644 --- a/src/build_context.rs +++ b/src/build_context.rs @@ -1567,6 +1567,7 @@ fn zip_mtime() -> DateTime { .and_then(|epoch| { let epoch: i64 = epoch.parse()?; let dt = time::OffsetDateTime::from_unix_timestamp(epoch)?; + let dt = time::PrimitiveDateTime::new(dt.date(), dt.time()); let dt = DateTime::try_from(dt)?; Ok(dt) }); diff --git a/tests/common/other.rs b/tests/common/other.rs index 2e2804949..a690482fa 100644 --- a/tests/common/other.rs +++ b/tests/common/other.rs @@ -10,7 +10,7 @@ use std::collections::BTreeSet; use std::io::Read; use std::path::{Path, PathBuf}; use tar::Archive; -use time::OffsetDateTime; +use time::PrimitiveDateTime; use zip::ZipArchive; pub fn copy_dir_recursive(src: &Path, dst: &Path) -> std::io::Result<()> { @@ -291,11 +291,11 @@ fn build_wheel_files(package: impl AsRef, unique_name: &str) -> Result, - expected_mtime: Vec, + expected_mtime: Vec, unique_name: &str, ) -> Result<()> { let mut wheel = build_wheel_files(package, unique_name)?; - let mut mtimes = BTreeSet::::new(); + let mut mtimes = BTreeSet::::new(); for idx in 0..wheel.len() { let mtime = wheel.by_index(idx)?.last_modified().unwrap().try_into()?; diff --git a/tests/run.rs b/tests/run.rs index efa3034c7..d7fa05793 100644 --- a/tests/run.rs +++ b/tests/run.rs @@ -1223,7 +1223,7 @@ fn pyo3_source_date_epoch() { unsafe { env::set_var("SOURCE_DATE_EPOCH", "0") }; handle_result(other::check_wheel_mtimes( "test-crates/pyo3-mixed-include-exclude", - vec![datetime!(1980-01-01 0:00 UTC)], + vec![datetime!(1980-01-01 0:00)], "pyo3_source_date_epoch", )) } From ee301da3c3cfeb3eba4d16a30cb2ecd2a933fcee Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 24 Feb 2026 21:43:43 +0800 Subject: [PATCH 2/2] Update python-pkginfo to 0.6.8 --- Cargo.lock | 7 +++---- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6251a01a0..dcb04d38b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2248,9 +2248,9 @@ dependencies = [ [[package]] name = "python-pkginfo" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464e5e2e0fb6c8c2c7aedc0cd6615258a3def4e34b417f6bf8835e76e7d441d4" +checksum = "229fe47647d6602b9b0934b21fab8aece1c5a5aeb0a934196a14355fec656623" dependencies = [ "flate2", "fs-err", @@ -2258,7 +2258,7 @@ dependencies = [ "rfc2047-decoder", "tar", "thiserror 2.0.18", - "zip 4.6.1", + "zip 8.1.0", ] [[package]] @@ -4227,7 +4227,6 @@ dependencies = [ "flate2", "indexmap", "memchr", - "zopfli", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e44c131d2..5c1a297fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,7 +74,7 @@ semver = "1.0.22" target-lexicon = "0.13.3" indexmap = "2.2.3" pyproject-toml = { version = "0.13.5", features = ["pep639-glob"] } -python-pkginfo = "0.6.6" +python-pkginfo = "0.6.8" textwrap = "0.16.1" ignore = "0.4.20" itertools = "0.14.0"