This version solidifies support for Python 3.14 and free-threaded Python 3.14t. A number of PyO3 APIs have been renamed to reflect the fact the GIL is no longer a universal feature of all Python implementations. For example:
Python::with_gil
is now known asPython::attach
Python::allow_threads
is now known asPython::detach
pyo3::prepare_freethreaded_python
is now known asPython::initialize()
The minimum supported Rust version has been increased to Rust 1.74.
An optional dependency on the bytes
crate has been added to allow support for converting bytes::Bytes
to / from Python.
The PyObject
type alias for Py<PyAny>
has also been deprecated; the Py
and Bound
smart pointers have been the primary interface for all Python-facing types since PyO3 0.21 and the PyObject
type alias had been a frequent source of confusion.
There are also many other incremental improvements, bug fixes and smaller features.
Please consult the migration guide for help upgrading.
Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following contributors' commits are included in this release:
@ahlinc
@alex
@anilbey
@bschoenmaeckers
@Cheukting
@codeguru42
@davidhewitt
@decathorpe
@dependabot[bot]
@drewkett
@FlickerSoul
@Icxolu
@jder
@jessekrubin
@jjmarchewitz
@kemingy
@msimacek
@musicinmybrain
@ngoldbaum
@Nnamdi-sys
@nucccc
@olp-cs
@robsdedude
@rrricharrrd
@sxlijin
@timfel
@tonybaloney
@Tpt
@wxianxin
@xushiyan
@yogevm15