Skip to content

Commit bad31bd

Browse files
committed
Update PyO3 to 0.27.1 and Rust edition to 2021
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<PyModule> 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 <noreply@anthropic.com>
1 parent 449277f commit bad31bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
22
name = "foobar"
33
version = "0.1.0"
4-
edition = "2018"
4+
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77
[lib]
88
name = "foobar"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
pyo3 = { version = "0.23.5", features = ["extension-module"] }
12+
pyo3 = { version = "0.27.1", features = ["extension-module"] }
1313

1414
[package.metadata.maturin]
1515
python-source = "python"

0 commit comments

Comments
 (0)