Releases: PyO3/pyo3
PyO3 0.17.0
This release contains a focus on quality improvements over the PyO3 0.16 releases.
There have been new API types added such as PyDictKeys
, PyDictValues
, PyDictItems
, PyCode
, PyFrame
, and PySuper
. The PyMapping
and PySequence
types have changed so they are more directly compatible with the corresponding Python Mapping
and Sequence
base classes in the collections.abc
module (this is a breaking change).
A new #[pyclass(frozen)]
option has been added to opt-out of runtime borrow checking by removing the ability to access &mut self
for objects owned by Python.
There have been a number of soundness fixes, both to the PyCapsule
type (see the CHANGELOG for more details) and to a number of FFI bindings which had fallen out of sync with newer Python and PyPy releases.
There have been numerous other smaller improvements, changes and fixes. For full details see 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 users' commits are included in this release:
@acshi
@aganders3
@alex
@birkenfeld
@cjermain
@Cryptex-github
@cuishuang
@davidhewitt
@drewkett
@dswij
@herquan
@hoodmane
@ikrivosheev
@indygreg
@jeertmans
@jinlow
@jonaspleyer
@kngwyu
@mejrs
@messense
@n8henrie
@PigeonF
@PWhiddy
@ravenexp
@savente93
@yankun1992
@yodaldevoid
PyO3 0.16.6
This release is a tactical set of soundness fixes identified for the PyCapsule
bindings released in PyO3 0.16. To avoid breaking API changes capsules created with PyCapsule::new
and PyCapsule::new_with_destructor
will now leak their contents (and not call the destructor) if released on a thread other than the one they were created.
PyO3 0.17 will be released shortly with breaking API changes which resolve the PyCapsule
issues with better design (e.g. the destructor
has a Send
bound added). Users are encouraged to upgrade at their earliest convenience.
Thanks to @saethlin for reporting the issue, and to @adamreichold and @davidhewitt for implementing the resolution.
PyO3 0.16.5
This release contains an FFI definition correction to resolve crashes for PyOxidizer on Python 3.10, and a new generate-import-lib
feature to allow easier cross-compiling to Windows.
Thank you to the following users for the improvements:
PyO3 0.16.4
This release fixes a regression introduced in 0.16.3 leading to build failures on Windows, enables crates depending on PyO3 to collect code coverage using LLVM instrumentation on stable Rust version 1.60 or later, and enables safe access to time zone information attached to Python's time
and datetime
objects. There are also some adjustments to PyO3's build-time interpreter detection to make it easier to cross-compile abi3
Python extensions.
Thank you to the following users for the improvements:
@adamreichold
@davidhewitt
@mejrs
@messense
@pickfire
@ravenexp
@ricohageman
PyO3 0.15.2
PyO3 0.16.3
This release contains a number of non-breaking additions and fixes since PyO3 0.16.2.
They are mostly centered on improving support for various build configurations. There are also usability tweaks to the #[pyclass]
macro and a new intern!
macro to create statically-backed PyString
objects as an optimization technique.
Thank you to the following users for the improvements:
@adamreichold
@aganders3
@alex
@kmp1
@mejrs
@messense
@mityax
@momirza
@ravenexp
@zh-jq
PyO3 0.16.2
This release contains support for the latest PyPy 7.3.8 release, a fix for a regression from PyO3 0.16.0 which would cause flaky build failures, and corrections to documentation.
Thank you for the following users for the improvements:
PyO3 0.16.1
This release contains a couple of fixes for regressions in PyO3 0.16.0, as well as documentation fixes. The hashbrown
optional dependency range has been extended to include its new 0.12 version.
Thank you for the following users for the improvements:
@adamreichold
@alex
@birkenfeld
@davidhewitt
@JerzySpendel
@mejrs
@messense
@PanQL
PyO3 0.16.0
This release contains substantial changes and improvements over PyO3 0.15.1. To support these improvements, support has been dropped for the end-of-life Python 3.6 and Rust versions older than 1.48.
The pyo3::ffi
submodule has been split out into a separate pyo3-ffi
crate, so that users who want to use PyO3's Python bindings without any of the safe APIs or macros are able to do so.
#[pyclass]
can now be used on simple "C-like" enums to create Python enums.
The #[pyproto]
macro has been deprecated, and can be disabled by disabling the optional #[pyproto]
feature. The "magic methods" such as __repr__
which previously were implemented by #[pyproto]
gained support in #[pymethods]
in 0.15, and now in PyO3 0.16 #[pymethods]
is intended to be the only attribute macro needed to write class method implementations.
There are numerous other reworks, improvements, and bugfixes.
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:
@adamreichold
@aganders3
@Amanieu
@aviramha
@birkenfeld
@b05902132
@CarlKCarlK
@cmpute
@danielhenrymantilla
@davidhewitt
@DSPOM2
@ghuls
@Gobot1234
@kevinheavey
@konstin
@mejrs
@messense
@milesgranger
@mrl5
@parsons20
@ricohageman
@saidvandeklundert
@Tom1380
@vxgmichel
PyO3 0.15.1
This release is a set of bug fixes for some minor issues reported since PyO3 0.15's release. There are also some small additions for those storing PyIterator
, PySequence
, and PyMapping
in Py
smart pointers, and a PyTraceback
type to ease interacting with Python tracebacks from Rust.
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:
@dansvo
@davidhewitt
@KRunchPL
@mejrs
@messense
@moriyoshi
@saidvandeklundert
@taiki-e