rust-hwi
rust-hwi copied to clipboard
Update pyo3 requirement from 0.21.2 to 0.24.1 in the cargo group across 1 directory
Updates the requirements on pyo3 to permit the latest version.
Updates pyo3 to 0.24.1
Release notes
Sourced from pyo3's releases.
v0.24.1
This release is a security fix for the
PyString::from_objectmethod, which passed&strdata to the Python C API without checking for a terminating nul byte. All historical PyO3 versions are affected, and we recommend you upgrade if you are usingPyString::from_object. Thank you to@vthibfor the report and@Dr-Emannfor the fix. A RUSTSEC advisory will be published shortly.Aside from the security fix, this release contains a number of other non-breaking additions:
- An
abi3-py313feature to support compiling with the Python 3.13 stable ABI.PyAnyMethods::getattr_optto get optional attributes without paying the cost of a Python exception when the attribute in question does not exist.- Constructor for
PyInt::new.with_critical_section2for locking two objects at the same time on the free-threaded build.- Fix for a PyO3 0.24.0 regression with
Option<&str>andOption<&T>(whereT: PyClass) function arguments no longer being permittedThere are also a few other small bug fixes for edge cases, mostly related to compile errors from PyO3's macro code.
Thank you to the following contributors for the improvements:
@bschoenmaeckers@davidhewitt@Dr-Emann@emmagordon@epontan@Icxolu@IvanIsCoding@jelmer@jonaspleyer@ngoldbaum@Owen-CH-Leung@Tpt@Trolldemorted@XuehaiPan
Changelog
Sourced from pyo3's changelog.
[0.24.1] - 2025-03-31
Added
- Add
abi3-py313feature. #4969- Add
PyAnyMethods::getattr_opt. #4978- Add
PyInt::newconstructor for all supported number types (i32, u32, i64, u64, isize, usize). #4984- Add
pyo3::sync::with_critical_section2. #4992- Implement
PyCallArgsforBorrowed<'_, 'py, PyTuple>,&Bound<'py, PyTuple>, and&Py<PyTuple>. #5013Fixed
- Fix
is_type_offor native types not using same specialized check asis_type_of_bound. #4981- Fix
Probeclass naming issue with#[pymethods]. #4988- Fix compile failure with required
#[pyfunction]arguments takingOption<&str>andOption<&T>(for#[pyclass]types). #5002- Fix
PyString::from_objectcausing of bounds reads whithencodinganderrorsparameters which are not nul-terminated. #5008- Fix compile error when additional options follow after
cratefor#[pyfunction]. #5015[0.24.0] - 2025-03-09
Packaging
- Add supported CPython/PyPy versions to cargo package metadata. #4756
- Bump
target-lexicondependency to 0.13. #4822- Add optional
jiffdependency to add conversions forjiffdatetime types. #4823- Add optional
uuiddependency to add conversions foruuid::Uuid. #4864- Bump minimum supported
inventoryversion to 0.3.5. #4954Added
- Add
PyIterator::sendmethod to allow sending values into a python generator. #4746- Add
PyCallArgstrait for passing arguments into the Python calling protocol. This enabled using a faster calling convention for certain types, improving performance. #4768- Add
#[pyo3(default = ...']option for#[derive(FromPyObject)]to set a default value for extracted fields of named structs. #4829- Add
#[pyo3(into_py_with = ...)]option for#[derive(IntoPyObject, IntoPyObjectRef)]. #4850- Add FFI definitions
PyThreadState_GetFrameandPyFrame_GetBack. #4866- Optimize
lastforBoundListIterator,BoundTupleIteratorandBorrowedTupleIterator. #4878- Optimize
Iterator::count()forPyDict,PyList,PyTuple&PySet. #4878- Optimize
nth,nth_back,advance_byandadvance_back_byforBoundTupleIterator#4897- Add support for
types.GenericAliasaspyo3::types::PyGenericAlias. #4917- Add
MutextExttrait to help avoid deadlocks with the GIL while locking astd::sync::Mutex. #4934- Add
#[pyo3(rename_all = "...")]option for#[derive(FromPyObject)]. #4941Changed
- Optimize
nth,nth_back,advance_byandadvance_back_byforBoundListIterator. #4810- Use
DerefToPyAnyin blanket implementations ofFrom<Py<T>>andFrom<Bound<'py, T>>forPyObject. #4593- Map
io::ErrorKind::IsADirectory/NotADirectoryto the corresponding Python exception on Rust 1.83+. #4747PyAnyMethods::calland friends now requirePyCallArgsfor their positional arguments. #4768- Expose FFI definitions for
PyObject_Vectorcall(Method)on the stable abi on 3.12+. #4853#[pyo3(from_py_with = ...)]now take a path rather than a string literal #4860
... (truncated)
Commits
a213b36release: 0.24.1 (#5021)d85a02dsplitPyFunctionArgumentto specializeOption(#5002)c37a50aAdd example of more complex exceptions (#5014)dcacb9bSimplify PyFunctionArgument impl on &Bound<T> (#5018)03c31c5fix#[pyfunction]option parsing (#5015)0f49eb1docs: Remove examples with outdated PyO3 and unmaintained projects (#4952)1b00b0dimplementPyCallArgsfor borrowed types (#5013)5caaa37fix: convert to cstrings in PyString::from_object (#5008)4aca459docs: guide - add link to tables and traits (#5001)0452c0ereplace quansight-labs/setup-python with actions/setup-python (#5007)- 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 <dependency name> major versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor versionwill close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)@dependabot unignore <dependency name>will remove all of the ignore conditions of the specified dependency@dependabot unignore <dependency name> <ignore condition>will remove the ignore condition of the specified dependency and ignore conditions You can disable automated security fix PRs for this repo from the Security Alerts page.