Skip to content

Releases: PyO3/pyo3

PyO3 0.14.4

29 Aug 06:56
Compare
Choose a tag to compare

This release resolves issues with the PyString::data API added in 0.14.3. After release it was found to be unsound on certain platforms, so has been disabled on those platforms and marked unsafe with the safety expectation that users will ensure it works appropriately on their platform as part of usage.

Thanks to @decathorpe and @indygreg for the report, discussion, and resolution.

PyO3 0.14.3

22 Aug 00:20
Compare
Choose a tag to compare

This release is a small set of bugfixes added on top of the PyO3 0.14.2 release.

For full details of all changes, see the CHANGELOG.

Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:

@awestlake87
@davidhewitt
@indygreg
@mejrs
@messense
@mtreinish
@pschafhalter
@Ptrskay3
@sansyrox
@tiran

PyO3 0.14.2

09 Aug 08:03
Compare
Choose a tag to compare

This release is a small quality-of-life update for the PyO3 0.14 release series. Optional support for the indexmap crate has been added. In addition, there have been a number of documentation improvements, and bugfixes for regressions and incorrect FFI definitions.

Users who removed macOS cargo configuration from their setup after updating to PyO3 0.14 will unfortunately have to once again add configuration to their compilation after updating to this release. This is because PyO3 was using functionality which Cargo had erroneously allowed.

The recommended way to restore configuration for macOS is to add a build script which invokes pyo3_build_config::add_extension_module_link_args(). The cargo configuration previously recommended is also still an option.

For full details of all changes, see the CHANGELOG.

Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:

@alex
@awestlake87
@batconjurer
@birkenfeld
@davidhewitt
@deantvv
@Eric-Arellano
@indygreg
@IvanIsCoding
@mejrs
@messense
@nihaals
@tommilligan

PyO3 0.14.1

04 Jul 21:22
Compare
Choose a tag to compare

This release addresses some incorrect FFI definitions in PyO3 0.14.0 which caused crashes when targeting PyPy. In addition, IntoPy<PyObject> has been implemented for &PathBuf and &OsString for additional convenience when working with the new conversions.

Thank you to @alex and @jameshilliard for the quick reports, and @birkenfeld and @messense for the quick fixes!

PyO3 0.14.0

03 Jul 21:27
Compare
Choose a tag to compare

This release contains a significant number of improvements and optimizations since the 0.13 releases. Conversion support for more Rust standard library types has been added: [T; N], Path, PathBuf, OsStr, and OsString. In addition, the #[pyo3(...)] attribute options already used in #[pyclass] and #[derive(FromPyObject)] have been expanded to all macros to cover more options such as #[pyo3(name = "...")].

This release also includes some notable performance optimizations to PyO3's Python function generation, and users should observe reductions in overhead when calling PyO3-wrapped functions from Python. The documentation has also benefited from extensive work from several contributors.

Finally, there are a number of breaking changes to this release:

  • To reduce the default dependency set, a new feature multiple-pymethods has been added. If this feature is not enabled, each #[pyclass] may only have a single #[pymethods] block. If this feature is enabled then the previous behavior (and dependency on inventory) is restored.
  • The pyo3::ffi module has received many updates to keep in sync with CPython's definitions.
  • A number of APIs and particular usages of PyO3 macros have been marked deprecated where better alternatives now exist.
  • A number of previously-deprecated APIs have been removed.

For full details of all changes, see the CHANGELOG. For help with upgrading, see the migration guide.

Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following users' commits are included in this release:

@alex
@alonblade
@aviramha
@birkenfeld
@c410-f3r
@daggy1234
@daniil-konovalenko
@davidhewitt
@erikjohnston
@GabrielMajeri
@gilescope
@indygreg
@isosphere
@jameshilliard
@kangalioo
@kngwyu
@konstin
@m-ou-se
@mejrs
@messense
@nw0
@ohadravid
@ravenexp
@scalexm
@simonrainerson
@TheGhostHuCodes
@Winxton
@1tgr

PyO3 0.13.2

12 Feb 23:33
Compare
Choose a tag to compare

This release contains small improvements over PyO3 0.13.1. The minimum supported Rust version has been lowered to Rust 1.41. A serde feature has been added which provides implementations of Serialize and Deserialize for types inside the Py<T> smart pointer.

Of note is that this release disables automatic finalization of the Python interpreter at program exit for Rust binaries embedding the Python interpreter. This was found to cause a number of issues with C extensions such as Tensorflow and Scipy which were sensitive to the deinitialization order. For the vast majority of users this should cause no impact or fix a number of problem cases. For the minority who did depend on finalization, the unsafe method with_embedded_python_interpreter has been added to manually control the interpreter lifecycle.

For full details of all changes, see the CHANGELOG.

Thank you to everyone who contributed code, documentation fixes, design ideas, bug reports, and feedback. The following users' commits are included in this release:

@alex
@awestlake87
@birkenfeld
@cfbolz
@daniil-konovalenko
@davidhewitt
@decathorpe
@ijl
@kangalioo
@kngwyu
@lazka
@nw0
@tdamsma

PyO3 0.13.1

10 Jan 13:44
Compare
Choose a tag to compare

This release is a set of quality-of-life improvements and bugfixes for PyO3 0.13.0. All new functionality adds flexibility to pyo3 in rarer cases, such as fixing #[pyclass(dict)] support for the abi3 feature (on compatible Python versions). In addition, a long-overdue initiative to reconcile PyO3's ffi definitions with the current state of the upstream Python API has started. This resulted in a number of new deprecations where mismatches were found.

For full details of all changes, see the CHANGELOG.

Thank you to everyone who contributed code, documentation fixes, design ideas, bug reports, and feedback. The following users' commits are included in this release:

@cecini
@dalcde
@daniil-konovalenko
@davidhewitt
@kngwyu
@konstin
@nw0
@OrangeTux

PyO3 0.13.0

22 Dec 16:10
Compare
Choose a tag to compare

The major feature for this PyO3 release is support for the CPython limited API. This is an opt-in feature when building extension modules which makes it possible for the built wheel to be installable on multiple Python versions.

As well as this, a number of other refinements, fixes, and performance improvements have been merged into this release. In particular, note that the internal "macros" crates have been renamed to pyo3-macros and pyo3-macros-backend for clarity and consistency (previously pyo3cls and pyo3-derive-backend).

For full details of all changes, see the CHANGELOG.

Thank you to everyone who contributed code, documentation fixes, design ideas, bug reports, and feedback. The following users' commits are included in this release:

@AleksaC
@alex
@Askaholic
@aviramha
@birkenfeld
@daggy1234
@davidhewitt
@dvermd
@kngwyu
@konstin
@Palladinium
@roblabla
@scalexm
@Stranger6667

PyO3 0.12.4

28 Nov 20:33
Compare
Choose a tag to compare

This release fixes a reference count issue discovered in PyO3 0.12.3, present in the implementation of From<Py<T>> for PyObject. Usage of this implementation would lead to an incorrect Python reference count decrease, likely leading to use-after-free.

This regression was only present in the PyO3 0.12 series. The offending implementation was used only in one location inside the PyO3 codebase itself, though of course is likely used in downstream code. As a result, previous PyO3 versions in the 0.12 series will be yanked.

Sincerest apologies for the inconvenience.

Fixed

  • Fix reference count bug in implementation of From<Py<T>> for PyObject, a regression introduced in PyO3 0.12. #1297

PyO3 0.12.3

12 Oct 22:29
Compare
Choose a tag to compare

This release fixes support for Rust versions 1.39 through Rust 1.44, which was erroneously broken in PyO3 0.12.2. Thanks to @mtreinish for the quick bug report!