github PyO3/pyo3 v0.28.0
PyO3 0.28.0

7 hours ago

This release contains many improvements across PyO3's feature set:

  • Proper support for __init__ methods for #[pyclass] types
  • Support for #[deleter]s to complement the existing #[getter] and #[setter] attributes when implementing class "properties".
  • Support for subclassing many Python types with the abi3 feature (requires Python 3.12+).
  • A new #[pyclass(new = "from_fields")] option to automatically define the constructor from the class fields.
  • Many corrections to FFI definitions (including removal of many private CPython methods)
  • Many improvements to the experimental-inspect feature's functionality.

The minimum supported Rust version has been increased to Rust 1.83.

This release also switches #[pymodule] to use PEP 489 multi-phase initialization internally. This should have no immediate functional impact other than preparing PyO3 to support newer technologies such as Python subinterpreters.

There are also many other incremental improvements, bug fixes and smaller features; full detail can be found in the CHANGELOG.

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:

@ABorgna
@ahlinc
@alex
@altendky
@bazaah
@bschoenmaeckers
@chirizxc
@clin1234
@davidhewitt
@dependabot[bot]
@freakboy3742
@henryp3278
@Icxolu
@lazka
@LilyFirefly
@linkmauve
@lmmx
@lukaslueg
@MatthieuDartiailh
@MusicalNinjaDad
@ngoldbaum
@pkalivas
@reaperhulk
@RedKinda
@SilasMarvin
@SoroushMoosapour
@stijndcl
@tpoliaw
@Tpt

Don't miss a new pyo3 release

NewReleases is sending notifications on new releases.