Skip to content

PyO3 0.22.2

Latest
Compare
Choose a tag to compare
@davidhewitt davidhewitt released this 17 Jul 21:39
· 32 commits to release-0.22 since this release

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