github PyO3/pyo3 v0.26.0
PyO3 0.26.0

2 days ago

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 as Python::attach
  • Python::allow_threads is now known as Python::detach
  • pyo3::prepare_freethreaded_python is now known as Python::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

Don't miss a new pyo3 release

NewReleases is sending notifications on new releases.