From 9ba9f79975983ffaf0b8afd0cb5f53f702a67fc5 Mon Sep 17 00:00:00 2001 From: Philipp Rehner Date: Sun, 14 Jun 2026 17:12:35 +0200 Subject: [PATCH] Update PyO3 and nalgebra dependencies --- CHANGELOG.md | 7 +++++++ Cargo.toml | 12 ++++++------ README.md | 2 +- example/extend_quantity/Cargo.toml | 4 ++-- si-units/Cargo.toml | 6 +++--- si-units/src/extra_units.rs | 6 +++--- src/ad.rs | 2 +- 7 files changed, 23 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f21b1d..f4d742e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.14.0] - 2026-06-14 +### Packaging +- Updated `nalgebra` dependency to 0.35. +- Updated `pyo3` and `numpy` dependencies to 0.29. +- Updated `num-dual` dependency to 0.14. +- Updated minimum supported Rust version to 1.89. + ## [0.13.2] - 2026-05-21 ### Added - Made `Quantity::new` available in `const` contexts. diff --git a/Cargo.toml b/Cargo.toml index c10a56a..d8e3138 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "quantity" -version = "0.13.2" +version = "0.14.0" authors = [ "Philipp Rehner ", "Gernot Bauer ", ] -rust-version = "1.87" +rust-version = "1.89" edition = "2024" license = "MIT OR Apache-2.0" description = "Representation of quantites, i.e. of unit valued scalars and arrays." @@ -29,11 +29,11 @@ document-features = "0.2" ## Use N-dimensional arrays from the [ndarray] crate as value of a quantity. ndarray = { version = "0.17", optional = true } ## Use dynamic or static arrays from the [nalgebra] crate as value of a quantity. -nalgebra = { version = "0.34", optional = true } +nalgebra = { version = "0.35", optional = true } approx = { version = "0.5", optional = true } -pyo3 = { version = "0.27", optional = true } -numpy = { version = "0.27", optional = true } -num-dual = { version = "0.13", optional = true } +pyo3 = { version = "0.29", optional = true } +numpy = { version = "0.29", optional = true } +num-dual = { version = "0.14", optional = true } [dev-dependencies] approx = "0.5" diff --git a/README.md b/README.md index ca9efe9..3a53652 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Add this to your `Cargo.toml`: ``` [dependencies] -quantity = "0.13" +quantity = "0.14" ``` ## Examples diff --git a/example/extend_quantity/Cargo.toml b/example/extend_quantity/Cargo.toml index eadd06a..5f2b98c 100644 --- a/example/extend_quantity/Cargo.toml +++ b/example/extend_quantity/Cargo.toml @@ -8,7 +8,7 @@ name = "extend_quantity" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.27", features = ["extension-module", "abi3-py310"] } +pyo3 = { version = "0.29", features = ["extension-module", "abi3-py310"] } quantity = { version = "*", path = "../../", features = ["python_numpy"] } ndarray = "0.17" -nalgebra = "0.34" \ No newline at end of file +nalgebra = "0.35" \ No newline at end of file diff --git a/si-units/Cargo.toml b/si-units/Cargo.toml index 4ff052f..370cdc8 100644 --- a/si-units/Cargo.toml +++ b/si-units/Cargo.toml @@ -5,7 +5,7 @@ authors = [ "Philipp Rehner ", "Gernot Bauer ", ] -rust-version = "1.87" +rust-version = "1.89" edition = "2024" license = "MIT OR Apache-2.0" description = "Representation of SI unit valued scalars and arrays." @@ -22,7 +22,7 @@ crate-type = ["cdylib"] [dependencies] ndarray = "0.17" -numpy = "0.27" -pyo3 = { version = "0.27", features = ["extension-module", "abi3-py310"] } +numpy = "0.29" +pyo3 = { version = "0.29", features = ["extension-module", "abi3-py310"] } regex = "1.12" thiserror = "2.0" diff --git a/si-units/src/extra_units.rs b/si-units/src/extra_units.rs index 6259427..7409fa9 100644 --- a/si-units/src/extra_units.rs +++ b/si-units/src/extra_units.rs @@ -4,7 +4,7 @@ use pyo3::exceptions::PyTypeError; use pyo3::prelude::*; use pyo3::types::{PyFloat, PyNotImplemented}; -#[pyclass(module = "si_units")] +#[pyclass(module = "si_units", from_py_object)] #[derive(Clone, Copy)] pub struct Celsius; @@ -25,7 +25,7 @@ impl Celsius { } } -#[pyclass(module = "si_units")] +#[pyclass(module = "si_units", from_py_object)] #[derive(Clone, Copy)] pub struct Debye(pub f64); @@ -55,7 +55,7 @@ impl Debye { } } -#[pyclass(module = "si_units")] +#[pyclass(module = "si_units", from_py_object)] #[derive(Clone, Copy)] pub struct Angle(pub(crate) f64); diff --git a/src/ad.rs b/src/ad.rs index 88bf1c5..6a3920f 100644 --- a/src/ad.rs +++ b/src/ad.rs @@ -6,7 +6,7 @@ use num_dual::{ }; use std::ops::Sub; -impl, U> DualStruct for Quantity { +impl, U> DualStruct for Quantity { type Real = Quantity; type Inner = Quantity;