Skip to content

Commit

Permalink
Bumped pyo3 dependency to v0.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bschoenmaeckers authored and davidhewitt committed Oct 6, 2024
1 parent cf9b967 commit cd03504
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ num-complex = ">= 0.2, < 0.5"
num-integer = "0.1"
num-traits = "0.2"
ndarray = ">= 0.15, < 0.17"
pyo3 = { version = "0.21.0", default-features = false, features = ["macros"] }
pyo3 = { version = "0.22.0", default-features = false, features = ["macros"] }
rustc-hash = "1.1"

[dev-dependencies]
pyo3 = { version = "0.21.0", default-features = false, features = ["auto-initialize"] }
pyo3 = { version = "0.22.0", default-features = false, features = ["auto-initialize"] }
nalgebra = { version = "0.32", default-features = false, features = ["std"] }

[package.metadata.docs.rs]
all-features = true

[features]
default = ["gil-refs"]
"gil-refs" = ["pyo3/gil-refs"]
2 changes: 1 addition & 1 deletion src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl TypeDescriptors {
}
};

dtype.clone().into_bound(py)
dtype.bind(py).to_owned()
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/dtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ mod tests {
use super::*;

use pyo3::{py_run, types::PyTypeMethods};
use pyo3::types::PyString;

use crate::npyffi::{is_numpy_2, NPY_NEEDS_PYAPI};

Expand All @@ -851,7 +852,7 @@ mod tests {

#[test]
fn test_dtype_names() {
fn type_name<'py, T: Element>(py: Python<'py>) -> String {
fn type_name<T: Element>(py: Python) -> Bound<PyString> {
dtype_bound::<T>(py).typeobj().qualname().unwrap()
}
Python::with_gil(|py| {
Expand Down
2 changes: 1 addition & 1 deletion src/strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl TypeDescriptors {
}
};

dtype.clone().into_bound(py)
dtype.bind(py).to_owned()
}
}

Expand Down

0 comments on commit cd03504

Please sign in to comment.