From bad31bd46c50b3c00b78ea4e8cfa246cc752a143 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 29 Oct 2025 01:30:11 +0000 Subject: [PATCH] Update PyO3 to 0.27.1 and Rust edition to 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This updates PyO3 from 0.23.5 to 0.27.1, bringing several improvements: - Python 3.14 support (currently in beta) - Enhanced thread-safety guarantees - Improved Bound API performance - Latest bug fixes and security patches Also updates Rust edition from 2018 to 2021 for better language features. Breaking Changes Analysis: - ✅ No code changes required - The codebase already uses modern Bound API (introduced in 0.21) - Does not use any deprecated APIs (downcast, with_gil, GILOnceCell, etc.) - Simple #[pyfunction] and #[pymodule] usage is fully compatible Changes across PyO3 versions 0.23 → 0.27: - 0.24: FromPyObject trait rework (not used in this codebase) - 0.25: Removed deprecated IntoPy/ToPyObject traits (not used) - 0.26: Thread-safety requirements for #[pyclass] (not used) - 0.27: Additional API improvements (no impact on current code) Risk Assessment: VERY LOW - No API changes needed - Already using compatible patterns - Comprehensive CI testing will validate 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 64dba9a..5805942 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "foobar" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -9,7 +9,7 @@ name = "foobar" crate-type = ["cdylib"] [dependencies] -pyo3 = { version = "0.23.5", features = ["extension-module"] } +pyo3 = { version = "0.27.1", features = ["extension-module"] } [package.metadata.maturin] python-source = "python"