Skip to content

Releases: PyO3/pyo3

PyO3 0.18.1

07 Feb 21:35
Compare
Choose a tag to compare

This release fixes several bugs identified since PyO3 0.18.0, including a segfault and a Windows-specific issue with the PyIterator type, which would incorrectly accept any Python class regardless of whether it defined __next__ or not.

Some new APIs have been added such as PyErr::write_unraisable(), PyAny::is_ellipsis() and PyDict::update.

Thank you to the following users for the improvements:

@adamreichold
@alexpyattaev
@davidhewitt
@jjerphan
@jmhodges
@mejrs
@messense
@mitsuhiko
@neachdainn
@qbx2
@samuelcolvin

PyO3 0.18.0

17 Jan 20:39
Compare
Choose a tag to compare

This release contains a number of new features for PyO3's macros which should make maintaining PyO3 projects easier.

#[pyfunction] and #[pymethods] have a new #[pyo3(signature = (...))] option which allows specifying the Python signature. This replaces the #[args] option already present for #[pymethods]; the new option is better-validated and offers a syntax much more intuitive to users familiar with writing pure-Python functions.

#[pyclass] has new get_all and set_all options for cases where all fields of a type should be readable or writable from Python.

The #[pyo3(text_signature = "...")] option is now autogenerated for all functions created with #[pyfunction] and #[pymethods]. It can still be applied manually when it is necessary to override the generated form.

As well as the macro API improvements, some other notable changes include:

  • PySet::new and PyFrozenSet::new now accept Rust iterators rather than requiring a slice.
  • Rust types have been added for all Python's built-in Warning types.
  • Non-zero integer types in std::num now have a conversion to/from Python int.
  • The deprecated #[pyproto] attribute is now removed.

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:

@a1phyr
@adamreichold
@AdilZouitine
@alex
@birkenfeld
@CLOVIS-AI
@ctb
@dalcde
@datapythonista
@davidhewitt
@dylanbstorey
@flickpp
@gnaaman-dn
@haixuanTao
@hauntsaninja
@ijl
@itamarst
@jqnatividad
@matthewlloyd
@mejrs
@messense
@mrob95
@ongchi
@Oppen
@prehner
@Psykopear
@qbx2
@ryanrussell
@saethlin
@santokalayil
@saulshanabrook
@smheidrich
@SquidDev

PyO3 0.17.3

01 Nov 20:46
Compare
Choose a tag to compare

This release confirms support for Python 3.11 in PyO3.

(Previous versions of PyO3 0.17 had been tested against release candidates of Python 3.11 and no Python 3.11 fixes have been added since 0.17.0, so all PyO3 0.17 versions should in practice be fine to use with Python 3.11.)

In addition, some other small additions and fixes have been added on top of PyO3 0.17.2.

Thank you to the following users for the improvements:

@adamreichold
@ctb
@datapythonista
@davidhewitt
@messense
@saethlin

PyO3 0.17.2

04 Oct 07:12
Compare
Choose a tag to compare

This release contains non-breaking improvements and bugfixes over PyO3 0.17.1.

A new chrono feature has been added to support converting from types in chrono to types in the Python datetime module. The num-bigint feature has been expanded to add support to PyPy.

There has also been fixes for a couple of regressions observed in PyO3 0.17.

Thank you to the following users for the improvements:

@adamreichold
@AdilZouitine
@davidhewitt
@messense
@mrob95
@Oppen
@prehner
@Psykopear
@ryanrussell
@smheidrich
@SquidDev

PyO3 0.17.1

28 Aug 08:33
Compare
Choose a tag to compare

This release contains some minor bug fixes for PyO3 0.17.0. In particular the new PyDictItems, PyDictKeys and PyDictValues types are actually accessible!

Thanks to @davidhewitt, @messense and @PrettyWood for the fixes.

PyO3 0.17.0

23 Aug 21:49
Compare
Choose a tag to compare

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

23 Aug 20:13
Compare
Choose a tag to compare

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

15 May 19:27
Compare
Choose a tag to compare

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:

@cjermain
@davidhewitt
@indygreg
@messense

PyO3 0.16.4

14 Apr 18:20
Compare
Choose a tag to compare

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

14 Apr 18:13
Compare
Choose a tag to compare

This release is a backport of PyO3 0.16's support for PyPy 3.9.

Thanks to @mejrs and @messense for the implementation work, and to @alex for testing it to build the cryptography package.