PyO3 0.19.0
This release completes the implementation of automatically generated __text_signature__
for #[pymethods]
and #[pyfunctions]
by extending support for #[new]
functions as well as rendering the value of simple default values such as integers, bools, and None
in the generated signature.
Support for rust_decimal
conversions to Python's decimal.Decimal
has been added.
Usage of #[pyclass(frozen)]
types becomes more powerful with the addition of Py::get
to access contents of frozen classes without needing the Python GIL.
Some important fixes and removals have landed:
__traverse__
implementations may no longer access Python APIs or acquire the Python GIL. Attempting to usePython::with_gil
will panic.#[pyclass(unsendable)]
types will now warn and skipDrop
implementations when dropped on a thread other than the one the type was created on.- The deprecated
Python::acquire_gil
has been 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:
@adamreichold
@AdilZouitine
@adriangb
@alex
@AntoineRR
@BlueGlassBlock
@cardoe
@cfour2
@davidhewitt
@decathorpe
@Enyium
@est31
@iajoiner
@ijl
@jond01
@kngwyu
@lifthrasiir
@lycantropos
@mattip
@mejrs
@messense
@OliverBalfour
@samuelcolvin
@sollyucko
@stuhood
@suyanhanx
@Walnut356
@why-not-try-calmer
@willstott101
@wjones127
@xcharleslin