From 5376f63b141bcc32da9c899fe0db6926f6845605 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Sat, 25 May 2024 14:14:45 -0700 Subject: [PATCH] rust: upgrade pyo3 0.18 -> 0.19 This required some minor code changes. --- Cargo.lock | 24 ++++++++++++------------ Cargo.toml | 2 +- docs/news.rst | 5 +++++ rust-ext/src/decompressor.rs | 4 ++-- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 12d3aac8..08a5678f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -164,9 +164,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109" +checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38" dependencies = [ "cfg-if", "indoc", @@ -181,9 +181,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3" +checksum = "076c73d0bc438f7a4ef6fdd0c3bb4732149136abd952b110ac93e4edb13a6ba5" dependencies = [ "once_cell", "target-lexicon", @@ -191,9 +191,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c" +checksum = "e53cee42e77ebe256066ba8aa77eff722b3bb91f3419177cf4cd0f304d3284d9" dependencies = [ "libc", "pyo3-build-config", @@ -201,9 +201,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d" +checksum = "dfeb4c99597e136528c6dd7d5e3de5434d1ceaf487436a3f03b2d56b6fc9efd1" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -213,9 +213,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.3" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918" +checksum = "947dc12175c254889edc0c02e399476c2f652b4b9ebd123aa655c224de259536" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 7720d478..99e260e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,5 +26,5 @@ version = "2.0.8+zstd.1.5.5" features = ["experimental", "legacy", "zstdmt"] [dependencies.pyo3] -version = "0.18.3" +version = "0.19.2" features = ["extension-module"] diff --git a/docs/news.rst b/docs/news.rst index 27ba162e..1753de92 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -48,6 +48,11 @@ Other Actions Not Blocking Release 0.23.0 (not yet released) ========================= +Changes +------- + +* PyO3 Rust crate upgraded from 0.18 to 0.19. + 0.22.0 (released 2023-11-01) ============================ diff --git a/rust-ext/src/decompressor.rs b/rust-ext/src/decompressor.rs index 2964d9a3..3ab19518 100644 --- a/rust-ext/src/decompressor.rs +++ b/rust-ext/src/decompressor.rs @@ -246,7 +246,7 @@ impl ZstdDecompressor { // First chunk should not be using a dictionary. We handle it specially. let chunk = frames.get_item(0)?; - if !chunk.is_instance_of::()? { + if !chunk.is_instance_of::() { return Err(PyValueError::new_err("chunk 0 must be bytes")); } @@ -310,7 +310,7 @@ impl ZstdDecompressor { } for (i, chunk) in frames.iter().enumerate().skip(1) { - if !chunk.is_instance_of::()? { + if !chunk.is_instance_of::() { return Err(PyValueError::new_err(format!("chunk {} must be bytes", i))); }