From 7e6babe2a3bdb995a1fd63fffaf6bd463d46690c Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Sun, 26 Mar 2023 16:15:10 +0200 Subject: [PATCH] Bump PyO3 to the just released version 0.19.0. --- Cargo.toml | 4 ++-- examples/linalg/Cargo.toml | 2 +- examples/parallel/Cargo.toml | 2 +- examples/simple/Cargo.toml | 2 +- src/array.rs | 2 +- tests/array.rs | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fd2df6acf..9609e736b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,11 +22,11 @@ num-complex = ">= 0.2, < 0.5" num-integer = "0.1" num-traits = "0.2" ndarray = ">= 0.13, < 0.16" -pyo3 = { version = "0.18", default-features = false, features = ["macros"] } +pyo3 = { version = "0.19", default-features = false, features = ["macros"] } rustc-hash = "1.1" [dev-dependencies] -pyo3 = { version = "0.18", default-features = false, features = ["auto-initialize"] } +pyo3 = { version = "0.19", default-features = false, features = ["auto-initialize"] } nalgebra = { version = "0.32", default-features = false, features = ["std"] } [package.metadata.docs.rs] diff --git a/examples/linalg/Cargo.toml b/examples/linalg/Cargo.toml index 3080a11d3..3056c049c 100644 --- a/examples/linalg/Cargo.toml +++ b/examples/linalg/Cargo.toml @@ -9,7 +9,7 @@ name = "rust_linalg" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.18", features = ["extension-module"] } +pyo3 = { version = "0.19", features = ["extension-module"] } numpy = { path = "../.." } ndarray-linalg = { version = "0.14.1", features = ["openblas-system"] } diff --git a/examples/parallel/Cargo.toml b/examples/parallel/Cargo.toml index e507d94c0..62bdbbba9 100644 --- a/examples/parallel/Cargo.toml +++ b/examples/parallel/Cargo.toml @@ -9,7 +9,7 @@ name = "rust_parallel" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.18", features = ["extension-module", "multiple-pymethods"] } +pyo3 = { version = "0.19", features = ["extension-module", "multiple-pymethods"] } numpy = { path = "../.." } ndarray = { version = "0.15", features = ["rayon", "blas"] } blas-src = { version = "0.8", features = ["openblas"] } diff --git a/examples/simple/Cargo.toml b/examples/simple/Cargo.toml index 7a73aae66..21218819b 100644 --- a/examples/simple/Cargo.toml +++ b/examples/simple/Cargo.toml @@ -9,7 +9,7 @@ name = "rust_ext" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.18", features = ["extension-module", "abi3-py37"] } +pyo3 = { version = "0.19", features = ["extension-module", "abi3-py37"] } numpy = { path = "../.." } [workspace] diff --git a/src/array.rs b/src/array.rs index d286cb6cb..bf242d713 100644 --- a/src/array.rs +++ b/src/array.rs @@ -1058,7 +1058,7 @@ impl PyArray { /// /// let pyarray = PyArray::from_owned_object_array(py, array); /// - /// assert!(pyarray.readonly().as_array().get(0).unwrap().as_ref(py).is_instance_of::().unwrap()); + /// assert!(pyarray.readonly().as_array().get(0).unwrap().as_ref(py).is_instance_of::()); /// }); /// ``` pub fn from_owned_object_array<'py, T>(py: Python<'py>, mut arr: Array, D>) -> &'py Self { diff --git a/tests/array.rs b/tests/array.rs index 9bbbfd70f..6476cc293 100644 --- a/tests/array.rs +++ b/tests/array.rs @@ -184,8 +184,8 @@ fn is_instance() { Python::with_gil(|py| { let arr = PyArray2::::zeros(py, [3, 5], false); - assert!(arr.is_instance_of::>().unwrap()); - assert!(!arr.is_instance_of::().unwrap()); + assert!(arr.is_instance_of::>()); + assert!(!arr.is_instance_of::()); }); }