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