From f6f7e87253db2c18ce1c4b48bd391a42f89caacc Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:39:15 +1300 Subject: [PATCH 1/2] :arrow_up: Bump pyo3 from 0.21.1 to 0.22.4, numpy from 0.21.0 to 0.22.0 Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.21.1 to 0.22.4. - [Release notes](https://github.com/pyo3/pyo3/releases) - [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md) - [Commits](https://github.com/pyo3/pyo3/compare/v0.21.1...v0.22.4) Bumps [numpy](https://github.com/PyO3/rust-numpy) from 0.21.0 to 0.22.0. - [Release notes](https://github.com/PyO3/rust-numpy/releases) - [Changelog](https://github.com/PyO3/rust-numpy/blob/main/CHANGELOG.md) - [Commits](https://github.com/PyO3/rust-numpy/compare/v0.21.0...v0.22.0) --- Cargo.lock | 64 +++++++++++++++++++++++++++++------------------------- Cargo.toml | 4 ++-- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f184355..2c3569b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -67,7 +67,7 @@ checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -334,7 +334,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -475,6 +475,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.9" @@ -791,9 +797,9 @@ dependencies = [ [[package]] name = "numpy" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec170733ca37175f5d75a5bea5911d6ff45d2cd52849ce98b685394e4f2f37f4" +checksum = "cf314fca279e6e6ac2126a4ff98f26d88aa4ad06bc68fb6ae5cf4bd706758311" dependencies = [ "libc", "ndarray", @@ -909,24 +915,24 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" dependencies = [ "unicode-ident", ] [[package]] name = "pyo3" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a8b1990bd018761768d5e608a13df8bd1ac5f678456e0f301bb93e5f3ea16b" +checksum = "00e89ce2565d6044ca31a3eb79a334c3a79a841120a98f64eea9f579564cb691" dependencies = [ "cfg-if", "indoc", "libc", "memoffset", - "parking_lot", + "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", @@ -936,9 +942,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650dca34d463b6cdbdb02b1d71bfd6eb6b6816afc708faebb3bac1380ff4aef7" +checksum = "d8afbaf3abd7325e08f35ffb8deb5892046fcb2608b703db6a583a5ba4cea01e" dependencies = [ "once_cell", "target-lexicon", @@ -946,9 +952,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a7da8fc04a8a2084909b59f29e1b8474decac98b951d77b80b26dc45f046ad" +checksum = "ec15a5ba277339d04763f4c23d85987a5b08cbb494860be141e6a10a8eb88022" dependencies = [ "libc", "pyo3-build-config", @@ -956,27 +962,27 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8a199fce11ebb28e3569387228836ea98110e43a804a530a9fd83ade36d513" +checksum = "15e0f01b5364bcfbb686a52fc4181d412b708a68ed20c330db9fc8d2c2bf5a43" dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] name = "pyo3-macros-backend" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fbbfd7eb553d10036513cb122b888dcd362a945a00b06c165f2ab480d4cc3b" +checksum = "a09b550200e1e5ed9176976d0060cbc2ea82dc8515da07885e7b8153a85caacb" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "pyo3-build-config", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -1266,7 +1272,7 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -1323,7 +1329,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", "syn 1.0.109", @@ -1376,9 +1382,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2", "quote", @@ -1480,7 +1486,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -1532,7 +1538,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] [[package]] @@ -1646,7 +1652,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -1680,7 +1686,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1919,5 +1925,5 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.79", ] diff --git a/Cargo.toml b/Cargo.toml index fa9e898..4cb1d2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,9 +14,9 @@ bytes = "1.5.0" geo = { git = "https://github.com/georust/geo.git", version = "0.28.0", rev = "481196b4e50a488442b3919e02496ad909fc5412" } ndarray = "0.15.6" num-traits = "0.2.19" -numpy = "0.21.0" +numpy = "0.22.0" object_store = { version = "0.9.0", features = ["http"] } -pyo3 = { version = "0.21.1", features = ["abi3-py310", "extension-module"] } +pyo3 = { version = "0.22.4", features = ["abi3-py310", "extension-module"] } tiff = { git = "https://github.com/image-rs/image-tiff.git", version = "0.9.1", rev = "0c54a18e2130bd8e3e897009e1fb59eaaf607c6c" } # https://github.com/image-rs/image-tiff/pull/224 tokio = { version = "1.36.0", features = ["rt-multi-thread"] } url = "2.5.0" From 46a825fd38933a697e86be22e478f27e6e51df28 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Mon, 14 Oct 2024 10:45:09 +1300 Subject: [PATCH 2/2] :alien: Import pyo3::types::PyModuleMethods Needed to fix `error[E0599]: no method named `add_class` found for reference `&pyo3::Bound<'_, PyModule>` in the current scope` and `error[E0599]: no method named `add_function` found for reference `&pyo3::Bound<'_, PyModule>` in the current scope`. --- src/python/adapters.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python/adapters.rs b/src/python/adapters.rs index da6cff3..6ebbb55 100644 --- a/src/python/adapters.rs +++ b/src/python/adapters.rs @@ -6,6 +6,7 @@ use numpy::{PyArray1, PyArray3, ToPyArray}; use object_store::{parse_url, ObjectStore}; use pyo3::exceptions::{PyBufferError, PyFileNotFoundError, PyValueError}; use pyo3::prelude::{pyclass, pyfunction, pymethods, pymodule, PyModule, PyResult, Python}; +use pyo3::types::PyModuleMethods; use pyo3::{wrap_pyfunction, Bound, PyErr}; use url::Url;