fix(deps): update rust crate pyo3 to 0.24 [security]#186
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update rust crate pyo3 to 0.24 [security]#186renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.21→0.24Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
GHSA-pph8-gcv7-4qj5
PyString::from_objecttook&strarguments and forwarded them directly to the Python C API without checking for terminating nul bytes. This could lead the Python interpreter to read beyond the end of the&strdata and potentially leak contents of the out-of-bounds read (by raising a Python exception containing a copy of the data including the overflow).In PyO3 0.24.1 this function will now allocate a
CStringto guarantee a terminating nul bytes. PyO3 0.25 will likely offer an alternative API which takes&CStrarguments.Release Notes
pyo3/pyo3 (pyo3)
v0.24.1Compare Source
Added
abi3-py313feature. #4969PyAnyMethods::getattr_opt. #4978PyInt::newconstructor for all supported number types (i32, u32, i64, u64, isize, usize). #4984pyo3::sync::with_critical_section2. #4992PyCallArgsforBorrowed<'_, 'py, PyTuple>,&Bound<'py, PyTuple>, and&Py<PyTuple>. #5013Fixed
is_type_offor native types not using same specialized check asis_type_of_bound. #4981Probeclass naming issue with#[pymethods]. #4988#[pyfunction]arguments takingOption<&str>andOption<&T>(for#[pyclass]types). #5002PyString::from_objectcausing of bounds reads withencodinganderrorsparameters which are not nul-terminated. #5008cratefor#[pyfunction]. #5015v0.24.0Compare Source
Packaging
target-lexicondependency to 0.13. #4822jiffdependency to add conversions forjiffdatetime types. #4823uuiddependency to add conversions foruuid::Uuid. #4864inventoryversion to 0.3.5. #4954Added
PyIterator::sendmethod to allow sending values into a python generator. #4746PyCallArgstrait for passing arguments into the Python calling protocol. This enabled using a faster calling convention for certain types, improving performance. #4768#[pyo3(default = ...']option for#[derive(FromPyObject)]to set a default value for extracted fields of named structs. #4829#[pyo3(into_py_with = ...)]option for#[derive(IntoPyObject, IntoPyObjectRef)]. #4850PyThreadState_GetFrameandPyFrame_GetBack. #4866lastforBoundListIterator,BoundTupleIteratorandBorrowedTupleIterator. #4878Iterator::count()forPyDict,PyList,PyTuple&PySet. #4878nth,nth_back,advance_byandadvance_back_byforBoundTupleIterator#4897types.GenericAliasaspyo3::types::PyGenericAlias. #4917MutextExttrait to help avoid deadlocks with the GIL while locking astd::sync::Mutex. #4934#[pyo3(rename_all = "...")]option for#[derive(FromPyObject)]. #4941Changed
nth,nth_back,advance_byandadvance_back_byforBoundListIterator. #4810DerefToPyAnyin blanket implementations ofFrom<Py<T>>andFrom<Bound<'py, T>>forPyObject. #4593io::ErrorKind::IsADirectory/NotADirectoryto the corresponding Python exception on Rust 1.83+. #4747PyAnyMethods::calland friends now requirePyCallArgsfor their positional arguments. #4768PyObject_Vectorcall(Method)on the stable abi on 3.12+. #4853#[pyo3(from_py_with = ...)]now take a path rather than a string literal #4860PathBuf&Pathinto Pythonpathlib.Pathinstead ofPyString. #4925pthread_exittrying to acquire the GIL when the interpreter is shutting down. This mimics the Python 3.14 behavior and avoids undefined behavior and crashes. #4874Removed
DerefforPyAnyand other "native" types. #4593Fixed
PyIter_Sendto return aPySendResult. #4746v0.23.5Compare Source
Packaging
Fixed
__builtins__to__globals__in code executed byPython::py_run(was removed in PyO3 0.23.0). #4921v0.23.4Compare Source
Added
PyList::locked_for_each, which uses a critical section to lock the list on the free-threaded build. #4789pyo3_build_config::add_python_framework_link_argsbuild script API to set rpath when using macOS system Python. #4833Changed
datetime.foldto distinguish ambiguous datetimes when converting to and fromchrono::DateTime<Tz>(rather than erroring). #4791Fixed
py.allow_threadsGIL-switch when attempting to access contents of aPyErrwhich originated from Python (could lead to unintended deadlocks). #4766BoundDictIteratoron the free-threaded build. #4788BoundDictIteratoron the free-threaded build. #4788chrono::DateTime<Tz>to-Python conversion whenTzischrono_tz::Tz. #4790#[pyclass]not being able to be namedProbe. #4794abi3feature is enabled. #4806abi3feature is enabled. #4808r#boxinderive(FromPyObject). #4814#[pyclass]enum variants with more than 12 fields. #4832v0.23.3Compare Source
Packaging
python3-dll-adependency to 0.2.11. #4749Fixed
abi3features enabled. #4733generate-import-libfeature. #4749PYO3_CONFIG_FILEwould not reconfigure PyO3 for the new interpreter. #4758v0.23.2Compare Source
Added
IntoPyObjectExttrait. #4708Fixed
abi3orabi3-pyxxfeatures are enabled. #4719ambiguous_associated_itemslint error in#[pyclass]and#[derive(IntoPyObject)]macros. #4725v0.23.1Compare Source
Re-release of 0.23.0 with fixes to docs.rs build.
v0.23.0Compare Source
Packaging
Fixed
__builtins__to__globals__in code executed byPython::py_run(was removed in PyO3 0.23.0). #4921v0.22.6: PyO3 0.22.6Compare Source
This release corrects the check for free-threaded Python introduced in PyO3 0.22.2 to prevent users accidentally installing PyO3 packages on Python 3.13t; PyO3 0.22 does not support free-threaded Python. (Stay tuned for the 0.23 release coming very soon!)
Thanks @minrk for the report and @davidhewitt for the fix!
v0.22.5Compare Source
Fixed
__clear__slot andclearmethod generated code. #4619v0.22.4Compare Source
Fixed
__clear__slot andclearmethod generated code. #4619v0.22.3Compare Source
Added
PyWeakref_GetRefandcompat::PyWeakref_GetRef. #4528Changed
_borrowedmethods onPyWeakRefandPyWeakrefProxy(just use the owning forms). #4590Fixed
_PyLong_NumBitson Python 3.13 and later. #4450__traverse__functions for base classes not being called by subclasses created with#[pyclass(extends = ...)]. #4563#![forbid(unsafe_code)]. #4574create_exceptionmacro triggering lint and compile errors due to interaction withgil-refsfeature. #4589_borrowedmethods onPyWeakRefandPyWeakrefProxyby leaking their contents. #4590PyType_GetSloton static types before Python 3.10. #4599v0.22.2Compare Source
Packaging
UNSAFE_PYO3_BUILD_FREE_THREADED=1environment variable (it is not yet supported by PyO3). #4327Changed
#[pymodule(...)]now directly accepts all relevant#[pyo3(...)]options. #4330Fixed
#[pymodule]under presence of#![no_implicit_prelude]. #4328v0.22.1Compare Source
Added
#[pyo3(submodule)]option for declarative#[pymodule]s. #4301PartialEq<bool>forBound<'py, PyBool>. #4305Fixed
NotImplementedinstead of raisingTypeErrorfrom generated equality method when comparing different types. #4287#[pyo3::prelude::pymodule]and similar for#[pyclass]and#[pyfunction]in declarative modules. #4288#[setter]function. #4304v0.22.0Compare Source
Packaging
heckdependency to 0.5. #3966chrono-tzoptional dependency to include version 0.10. #4061num-rationalfeature to add conversions with Python'sfractions.Fraction. #4148Added
PyWeakref,PyWeakrefReferenceandPyWeakrefProxy. #3835#[pyclass]on enums that have tuple variants. #4072Decimalconversion. #4079pyo3_disable_reference_poolconditional compilation flag to avoid the overhead of the global reference pool at the cost of known limitations as explained in the performance section of the guide. #4095#[pyo3(constructor = (...))]to customize the generated constructors for complex enum variants. #4158PyType::module, which always matches Python__module__. #4196PyType::fully_qualified_namewhich matches the "fully qualified name" defined in PEP 737. #4196PyTypeMethods::mroandPyTypeMethods::bases. #4197#[pyclass(ord)]to implement ordering based onPartialOrd. #4202ToPyObjectandIntoPy<PyObject>forPyBackedStrandPyBackedBytes. #4205#[pyclass(hash)]option to implement__hash__in terms of theHashimplementation #4206#[pyclass(eq)]option to generate__eq__based onPartialEq, and#[pyclass(eq_int)]for simple enums to implement equality based on their discriminants. #4210From<Bound<'py, T>>forPyClassInitializer<T>. #4214as_supermethods toPyRefandPyRefMutfor accessing the base class by reference. #4219PartialEq<str>forBound<'py, PyString>. #4245PyModuleMethods::filenameon PyPy. #4249PartialEq<[u8]>forBound<'py, PyBytes>. #4250pyo3_ffi::c_strmacro to create&'static CStron Rust versions which don't have 1.77'sc""literals. #4255boolconversion withnumpy2.0'snumpy.booltype #4258PyAnyMethods::{bitnot, matmul, floor_div, rem, divmod}. #4264Changed
PySliceIndices::slicelengthand thelengthparameter ofPySlice::indices(). #3761Cloneing pointers into the Python heap has been moved behind thepy-clonefeature, as it must panic without the GIL being held as a soundness fix. #4095#[track_caller]to allPy<T>,Bound<'py, T>andBorrowed<'a, 'py, T>methods which can panic. #4098PyAnyMethods::dirto be fallible and returnPyResult<Bound<'py, PyList>>(and similar forPyAny::dir). #4100weakrefordictwhen compiling forabi3for Python older than 3.9. #4194PyType::nameto always match Python__name__. #4196#[pyclass(eq_int)]. #4210module=attribute of declarative modules' child#[pymodule]s and#[pyclass]es. #4213moduleoption for complex enum variants from the value set on the complex enummodule. #4228abi3feature on PyPy or GraalPy. #4237#[pyo3(get)]on#[pyclass]fields. #4254PyCFunction::new,PyCFunction::new_with_keywordsandPyCFunction::new_closurenow take&'static CStrname and doc arguments (previously was&'static str). #4255experimental-declarative-modulesfeature is now stabilized and available by default. #4257Fixed
PYO3_CROSS_LIB_DIRis set to a missing path. #4043create_exception!living in a different Rust module using thedeclarative-modulefeature. #4086PY_VECTORCALL_ARGUMENTS_OFFSETandPyVectorcall_NARGSto fix a false-positive assertion. #4104PyUnicode_DATAon PyPy: not exposed by PyPy. #4116#[pyo3(from_py_with = ...)]attribute on dunder (__magic__) method arguments instead of silently ignoring it. #4117modnode. #4236__dict__attribute missing for#[pyclass(dict)]instances when building forabi3on Python 3.9. #4251Configuration
📅 Schedule: Branch creation - "" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.