Skip to content

Upgrading pyo3 0.28 to 0.29

Breaking0.28.3 → 0.29.3Breaking4Security4Platform2New3Changed2Fixed12

BreakingUpgrade verdict

4 breaking changes and 2 platform requirement changes and 3 security fixes.

  • Underscore-prefixed private CPython functions are no longer exposed by pyo3-ffi.
  • If you use the build-config APIs directly, you must now depend on pyo3 or pyo3-ffi yourself.
  • Some APIs changed in incompatible ways to fix correctness bugs; see the migration guide.
  • Some pyo3-ffi definitions were wrong and are now corrected, which may break code relying on the old definitions.
Top 5 of 9 that need code or config changes

pyo3 publishes an official migration guide for version 0.29. It covers more than the release notes do.

Migration guide ↗
Breaking4
Removes many private CPython APIs with the _Py underscore prefix from pyo3-ffi's public API.
pyo3-ffi
pyo3_build_config APIs now require crates to have a direct dependency on pyo3 or pyo3-ffi.
pyo3_build_config
Contains several other minor breaking changes to close soundness holes, without the usual deprecation cycle.
Fixes incorrect pyo3-ffi definitions, which are breaking changes but necessary for correctness.
pyo3-ffi
Security3
Missing Sync bound on PyCFunction::new_closure closures
PyCFunction::new_closure
Fixes a possible out of bounds read in BoundTupleIterator::nth_back and BoundListIterator::nth_back.
BoundTupleIterator::nth_backBoundListIterator::nth_back
Out-of-bounds read in nth / nth_back for PyList and PyTuple iterators
Platform2
Adds full support for Python 3.15 beta and encourages downstream projects to test and distribute 3.15 beta wheels.
Drops support for Python 3.7 and for Python 3.13t, the first experimental free-threaded CPython release.