Update Rust crate pyo3 to 0.25.0 #36
Open
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.23.0
->0.25.0
Release Notes
pyo3/pyo3 (pyo3)
v0.25.0
Compare Source
Packaging
bigdecimal
dependency to add conversions forbigdecimal::BigDecimal
. #5011time
dependency to add conversions fortime
types. #5057cfg-if
dependency. #5110ordered_float
dependency to add conversions forordered_float::NotNan
andordered_float::OrderedFloat
. #5114Added
experimental-inspect
feature. #3977#[pyclass(generic)]
option to support runtime generic typing. #4926OnceExt
&MutexExt
forparking_lot
&lock_api
. Use the new extension traits by enabling thearc_lock
,lock_api
, orparking_lot
cargo features. #5044From
/Into
forBorrowed<T>
->Py<T>
. #5054PyTzInfo
constructors. #5055PY_INVALID_STACK_EFFECT
. #5064AsRef<Py<PyAny>>
forPy<T>
,Bound<T>
andBorrowed<T>
. #5071PyModule_Add
andcompat::PyModule_Add
. #5085Py_HashBuffer
,Py_HashPointer
, andPyObject_GenericHash
. #5086#[pymodule_export]
onconst
items in declarative modules. #5096#[pyclass(immutable_type)]
option (on Python 3.14+ withabi3
, or 3.10+ otherwise) for immutable type objects. #5101#[pyo3(rename_all)]
support on#[derive(IntoPyObject)]
. #5112PyRange
wrapper. #5117Changed
datetime
types withabi3
feature enabled. #4970timezone_utc
in favor ofPyTzInfo::utc
. #5055PyCodeObject
is now an opaque struct on all Python versions.PyFutureFeatures
is now only defined up until Python 3.10 (it was present in CPython headers but unused in 3.11 and 3.12).PyAnyMethods::is
to takeother: &Bound<T>
. #5071Py::is
to takeother: &Py<T>
. #5071PyVisit::call
to takeT: Into<Option<&Py<T>>>
. #5071PyDateTime_DATE_GET_TZINFO
andPyDateTime_TIME_GET_TZINFO
on PyPy 3.10 and later. #5079#[track_caller]
towith_gil
andwith_gil_unchecked
. #5109std::thread::park()
instead oflibc::pause()
orsleep(9999999)
. #5115Removed
IntoPy
andToPyObject
traits. #5010pyo3-ffi
(i.e. starting with_Py
) which are not referenced by public APIs:_PyLocalMonitors
,_Py_GlobalMonitors
,_PyCoCached
,_PyCoLineInstrumentationData
,_PyCoMonitoringData
,_PyCompilerSrcLocation
,_PyErr_StackItem
. #5064PyCode_GetNumFree
(PyO3 cannot support it due to knowledge of the code object). #5064AsPyPointer
trait. #5071from_py_with
. #5097_PyMethodWrapper_Type
,_PyCoroWrapper_Type
,_PyImport_FrozenBootstrap
,_PyImport_FrozenStdlib
,_PyImport_FrozenTest
,_PyManagedBuffer_Type
,_PySet_Dummy
,_PyWeakref_ProxyType
, and_PyWeakref_CallableProxyType
. #5105PyASCIIObjectState
,PyUnicode_IS_ASCII
,PyUnicode_IS_COMPACT
, andPyUnicode_IS_COMPACT_ASCII
on Python 3.14 and newer. #5133Fixed
#[derive(IntoPyObject, FromPyObject)]
when using#[pyo3()]
options recognised by only one of the two derives. #5070backports.zoneinfo
for python <3.9 when converting timezones into python. #5120v0.24.2
Compare Source
Fixed
unused_imports
lint of#[pyfunction]
and#[pymethods]
expanded inmacro_rules
context. #5030PyCodeObject::_co_instrumentation_version
ffi struct member on Python 3.13 for systems whereuintptr_t
is not 64 bits. #5048r#ident
in Python bindings. #5050v0.24.1
Compare Source
Added
abi3-py313
feature. #4969PyAnyMethods::getattr_opt
. #4978PyInt::new
constructor for all supported number types (i32, u32, i64, u64, isize, usize). #4984pyo3::sync::with_critical_section2
. #4992PyCallArgs
forBorrowed<'_, 'py, PyTuple>
,&Bound<'py, PyTuple>
, and&Py<PyTuple>
. #5013Fixed
is_type_of
for native types not using same specialized check asis_type_of_bound
. #4981Probe
class naming issue with#[pymethods]
. #4988#[pyfunction]
arguments takingOption<&str>
andOption<&T>
(for#[pyclass]
types). #5002PyString::from_object
causing of bounds reads whithencoding
anderrors
parameters which are not nul-terminated. #5008crate
for#[pyfunction]
. #5015v0.24.0
Compare Source
Packaging
target-lexicon
dependency to 0.13. #4822jiff
dependency to add conversions forjiff
datetime types. #4823uuid
dependency to add conversions foruuid::Uuid
. #4864inventory
version to 0.3.5. #4954Added
PyIterator::send
method to allow sending values into a python generator. #4746PyCallArgs
trait 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_GetFrame
andPyFrame_GetBack
. #4866last
forBoundListIterator
,BoundTupleIterator
andBorrowedTupleIterator
. #4878Iterator::count()
forPyDict
,PyList
,PyTuple
&PySet
. #4878nth
,nth_back
,advance_by
andadvance_back_by
forBoundTupleIterator
#4897types.GenericAlias
aspyo3::types::PyGenericAlias
. #4917MutextExt
trait 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_by
andadvance_back_by
forBoundListIterator
. #4810DerefToPyAny
in blanket implementations ofFrom<Py<T>>
andFrom<Bound<'py, T>>
forPyObject
. #4593io::ErrorKind::IsADirectory
/NotADirectory
to the corresponding Python exception on Rust 1.83+. #4747PyAnyMethods::call
and friends now requirePyCallArgs
for 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
&Path
into Pythonpathlib.Path
instead ofPyString
. #4925pthread_exit
trying to acquire the GIL when the interpreter is shutting down. This mimics the Python 3.14 behavior and avoids undefined behavior and crashes. #4874Removed
Deref
forPyAny
and other "native" types. #4593Fixed
PyIter_Send
to return aPySendResult
. #4746v0.23.5
Compare Source
Packaging
Fixed
__builtins__
to__globals__
in code executed byPython::py_run
(was removed in PyO3 0.23.0). #4921v0.23.4
Compare 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_args
build script API to set rpath when using macOS system Python. #4833Changed
datetime.fold
to distinguish ambiguous datetimes when converting to and fromchrono::DateTime<Tz>
(rather than erroring). #4791Fixed
py.allow_threads
GIL-switch when attempting to access contents of aPyErr
which originated from Python (could lead to unintended deadlocks). #4766BoundDictIterator
on the free-threaded build. #4788BoundDictIterator
on the free-threaded build. #4788chrono::DateTime<Tz>
to-Python conversion whenTz
ischrono_tz::Tz
. #4790#[pyclass]
not being able to be namedProbe
. #4794abi3
feature is enabled. #4806abi3
feature is enabled. #4808r#box
inderive(FromPyObject)
. #4814#[pyclass]
enum variants with more than 12 fields. #4832Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.