rpds
rpds copied to clipboard
Bump pyo3 from 0.20.3 to 0.21.2
Bumps pyo3 from 0.20.3 to 0.21.2.
Release notes
Sourced from pyo3's releases.
PyO3 0.21.2
This release contains some fixes to compile-time edge cases for the PyO3 0.21 series:
- A missing deprecation warning for the GIL Ref constructor
PySet::emptyhas now been added.#[pymodule]functions will no longer triggermissing_docslints on their generated code.- Incorrect implementations of
__traverse__in#[pymethods]will now emit a better error.- Extension modules on AIX will now link to
libpython.This release also fixes some compile errors for the
experimental-asyncandexperimental-declarative-modulesfeatures, and corrects some documentation typos.Thank you to the following users for the improvements:
@adamreichold@blmarket@davidhewitt@Icxolu@lfn3@messense@wyfoPyO3 0.21.1
This release is a set of touch-ups to PyO3 0.21 to fix cases found as adoption of PyO3 0.21.0 progressed.
The new
PyBackedStrandPyBackedBytestypes have had a large range of standard traits implemented, includingClone,PartialEq,Hash,PartialOrd,Display,Debug,SendandSync.The argument to a
#[setter]function now accepts the full range of input types as any other function argument in a#[pymethods]block, and will now correctly handle a#[pyo3(from_py_with = "...")]annotation.Some procedural macro output has been adjusted to reuse more code and make it easier to reach complete code coverage in projects using PyO3. The
import_exception_bound!macro has been added to further assist with coverage during migration, by skipping generating code which is only needed to use the exception as a GIL Ref.Finally, the
experimental-asyncfeature now correctly handlesasync fnin#[pymethods]which have a&selfor&mut selfreceiver plus additional arguments.Thank you to the following users for the improvements:
@alex@davidhewitt@geo7@Icxolu@reswqa@rikushoney@tisonkunPyO3 0.21.0
This release introduces a substantial new direction for PyO3's API. The
Bound<'py, T>smart pointer type has been added that replaces "GIL Refs" such as&'py PyAnyand&'py PyListwith smart-pointer formsBound<'py, PyAny>andBound<'py, PyList>. This new smart pointer brings ownership out of PyO3's internals and into user control. This has been done for sake of both performance and soundness.The migration guide extensively details the intended transition to the new API. To allow users a more graceful upgrade path, PyO3 0.21 and 0.22 will maintain backwards compatibility support for the existing "GIL Refs" API.
As well as the Bound API, highlights of PyO3 0.21 include:
- Support for compiling for GraalPy
- Extended
chrono/ datetime conversions, including support for theabi3feature and thechrono-tzcrate- Simplifications to
__next__and__anext__methods
... (truncated)
Changelog
Sourced from pyo3's changelog.
[0.21.2] - 2024-04-16
Changed
- Deprecate the
PySet::empty()gil-ref constructor. #4082Fixed
- Fix compile error for
async fnin#[pymethods]with a&selfreceiver and more than one additional argument. #4035- Improve error message for wrong receiver type in
__traverse__. #4045- Fix compile error when exporting a
#[pyclass]living in a different Rust module using theexperimental-declarative-modulesfeature. #4054- Fix
missing_docslint triggering on documented#[pymodule]functions. #4067- Fix undefined symbol errors for extension modules on AIX (by linking
libpython). #4073[0.21.1] - 2024-04-01
Added
- Implement
SendandSyncforPyBackedStrandPyBackedBytes. #4007- Implement
Clone,Debug,PartialEq,Eq,PartialOrd,OrdandHashimplementation forPyBackedBytesandPyBackedStr, andDisplayforPyBackedStr. #4020- Add
import_exception_bound!macro to import exception types without generating GIL Ref functionality for them. #4027Changed
- Emit deprecation warning for uses of GIL Refs as
#[setter]function arguments. #3998- Add
#[inline]hints on manyBoundandBorrowedmethods. #4024Fixed
- Handle
#[pyo3(from_py_with = "")]in#[setter]methods #3995- Allow extraction of
&Boundin#[setter]methods. #3998- Fix some uncovered code blocks emitted by
#[pymodule],#[pyfunction]and#[pyclass]macros. #4009- Fix typo in the panic message when a class referenced in
pyo3::import_exception!does not exist. #4012- Fix compile error when using an async
#[pymethod]with a receiver and additional arguments. #4015[0.21.0] - 2024-03-25
Added
- Add support for GraalPy (24.0 and up). #3247
- Add
PyMemoryViewtype. #3514- Allow
async fnin for#[pyfunction]and#[pymethods], with theexperimental-asyncfeature. #3540 #3588 #3599 #3931- Implement
PyTypeInfoforPyEllipsis,PyNoneandPyNotImplemented. #3577- Support
#[pyclass]on enums that have non-unit variants. #3582- Support
chronofeature withabi3feature. #3664FromPyObject,IntoPy<PyObject>andToPyObjectare implemented onstd::duration::Duration#3670- Add
PyString::to_cow. AddPy<PyString>::to_str,Py<PyString>::to_cow, andPy<PyString>::to_string_lossy, as ways to access Python string data safely beyond the GIL lifetime. #3677- Add
Bound<T>andBorrowed<T>smart pointers as a new API for accessing Python objects. #3686- Add
PyNativeType::as_borrowedto convert "GIL refs" to the newBoundsmart pointer. #3692
... (truncated)
Commits
a646a82release: 0.21.2bd15f92Deprecate thePySet::emptygil-ref constructor (#4082)4f7c706Suppress non_local_definitions lint as we often want the non-local effects in...3f6faf0Extend guide on interaction between method receivers and lifetime elision. (#...4e13c0eLink libpython for AIX target (#4073)e501377fix declarative-modules compile error (#4054)fd18955add#[doc(hidden)]to the Rust module created by#[pymodule](#4067)e174a04Minor: Fix a typo in Contributing.md (#4066)a8abe50build(deps): bump peaceiris/actions-gh-pages from 3 to 4 (#4062)68d1973Fix typo (#4052)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)