github PyO3/pyo3 v0.22.2
PyO3 0.22.2

latest releases: v0.22.6, v0.22.5, v0.22.4...
3 months ago

This release contains some minor reliability fixes building upon PyO3 0.22.1.

As PyO3 is still working on supporting freethreaded Python (upcoming in 3.13), support has been gated behind an UNSAFE_PYO3_BUILD_FREE_THREADED=1 environment variable to avoid unsuspecting users running into broken builds.

Packages built for the abi3 stable ABI will now use FFI functions for refcounting instead of inline reference count modifications on all versions of the stable ABI (previously only abi3 builds for 3.12 and up would use FFI functions). This helps mitigate interactions of old versions of the stable ABI with future CPython releases which do more complex reference counting (e.g. immortal objects, freethreaded reference counting).

The #[pymodule] declarative module now supports directly receiving options. (E.g. #[pymodule(name = "foo")], which would previously have been written as two attributes #[pymodule] #[pyo3(name = "foo")].)

A compile error on Rust 1.78 related to use of c"" literals has been fixed.

Thank you to the following contributors for the improvements:

@davidhewitt
@FlickerSoul
@gi0baro
@Icxolu
@MatthijsKok
@styvane

Don't miss a new pyo3 release

NewReleases is sending notifications on new releases.