Bump pyo3 from 0.22.3 to 0.22.4
Bumps pyo3 from 0.22.3 to 0.22.4.
Release notes
Sourced from pyo3's releases.
PyO3 0.22.4
This release is a security fix for PyO3 0.22.0 through 0.22.3.
The
PyWeakrefMethodstrait functions for reading borrowed values from Python weak references have been identified as unsound, because they did not account for the possibility the last strong reference could be cleared at any time, leading the borrowed value to be dangling and risk of use-after-free.PyO3 0.22.4 protects against this issue by making these methods permanently leak strong references. The methods are also marked deprecated and will be removed in PyO3 0.23. Users should switch to use the use
PyWeakrefMethodsfunctions which return owned references (the deprecation messages indicate the appropriate upgrade paths).These functions were added in PyO3 0.22.0; all versions from 0.22.0 through 0.22.3 have been yanked.
Aside from the security fix, PyO3 0.22.4 contains a number of other bugfixes, including:
- A fix for cases where
__traverse__functions of base types were not called when using#[pyclass(extends = ...)]- A fix for a regression in 0.22.3 where PyO3 generated code would trigger compile failures with crates using
#![forbid(unsafe_code)]Thank you to the following contributors for the improvements:
Changelog
Sourced from pyo3's changelog.
[0.22.4] - 2024-10-12
Added
- Add FFI definition
PyWeakref_GetRefandcompat::PyWeakref_GetRef. #4528Changed
- Deprecate
_borrowedmethods onPyWeakRefandPyWeakrefProxy(just use the owning forms). #4590Fixed
- Revert removal of private FFI function
_PyLong_NumBitson Python 3.13 and later. #4450- Fix
__traverse__functions for base classes not being called by subclasses created with#[pyclass(extends = ...)]. #4563- Fix regression in 0.22.3 failing compiles under
#![forbid(unsafe_code)]. #4574- Workaround possible use-after-free in
_borrowedmethods onPyWeakRefandPyWeakrefProxyby leaking their contents. #4590- Fix crash calling
PyType_GetSloton static types before Python 3.10. #4599
Commits
dff9723release: 0.22.43330bf2fix garbage collection in inheritance cases (#4563)8b23397ci: pypy 3.7 macos on x64 stillce63713ci: run benchmarks on ubuntu 22.04 (#4609)b1173f5ci: fix more ubuntu-24.04 failures (#4610)7371028ci: move more jobs to macOS arm (#4600)8e3dc45avoid callingPyType_GetSloton static types before Python 3.10 (#4599)969300dleak references for safety inPyWeakRefMethods::upgrade_borrowed(#4590)d01fbabfix case of gil-refs feature breakingcreate_exception!macro (#4589)9a641f7fix unintentionalunsafe_codetrigger (#4574)- 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) You can disable automated security fix PRs for this repo from the Security Alerts page.