fix(deps): update rust crate pyo3 to 0.27.0 #1910
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.25.1
->0.27.0
Release Notes
pyo3/pyo3 (pyo3)
v0.27.1
: PyO3 0.27.1Compare Source
This release fixes a clippy lint regression in PyO3 0.27.0, and exposes the
PySendResult
type (the return value fromBound<PyIterator>::send
).Thank you to the following contributors for the improvements:
@alex
@davidhewitt
@reaperhulk
@tpoliaw
v0.27.0
Compare Source
Packaging
hashbrown
optional dependency to include version 0.16. #5428num-bigint
dependency minimum version to 0.4.4. #5471Added
FromPyObjectOwned
as convenient trait bound forFromPyObject
when the data is not borrowed from Python. #4390Borrowed::extract
, same asPyAnyMethods::extract
, but does not restrict the lifetime by deref. #4390experimental-inspect
: basic support for#[derive(IntoPyObject)]
(no struct fields support yet). #5365experimental-inspect
: support#[pyo3(get, set)]
and#[pyclass(get_all, set_all)]
. #5370PyTypeCheck::classinfo_object
that returns an object that can be used as parameter inisinstance
orissubclass
. #5387PyTypeInfo
ondatetime.*
types even when the limited API is enabled. #5388PyTypeInfo
onPyIterator
,PyMapping
andPySequence
. #5402PyTypeInfo
onPyCode
when using the stable ABI. #5403PyTypeInfo
onPyWeakrefReference
when using the stable ABI. #5404pyo3::sync::RwLockExt
trait, analogous topyo3::sync::MutexExt
for readwrite locks. #5435PyString::from_bytes
. #5437AsRef<[u8]>
forPyBytes
. #5445CastError
andCastIntoError
. #5468PyCapsuleMethods::pointer_checked
andPyCapsuleMethods::is_valid_checked
. #5474Borrowed::cast
,Borrowed::cast_exact
andBorrowed::cast_unchecked
. #5475jiff::civil::ISOWeekDate
. #5478&Cstr
,Cstring
andCow<Cstr>
. #5482#[pyclass(skip_from_py_object)]
option, to opt-out of theFromPyObject: PyClass + Clone
blanket impl. #5488PyErr::add_note
. #5489FromPyObject
impl forCow<Path>
&Cow<OsStr>
. #5497#[pyclass(from_py_object)]
pyclass option, to opt-in to the extraction of pyclasses by value (requiresClone
). #5506Changed
FromPyObject
trait for flexibility and performance: #4390FromPyObject
, to allow borrowing data from Python objects (e.g.&str
from Pythonstr
).extract_bound
withextract
, which takesBorrowed<'a, 'py, PyAny>
.FromPyObject
implementations forVec<u8>
and[u8; N]
frombytes
andbytearray
. #5244#[pyfn]
attribute. #5384PyTypeCheck::NAME
. #5387PyTypeCheck::NAME
in favour ofPyTypeCheck::classinfo_object
which provides the type information at runtime. #5387PyClassGuard(Mut)
andPyRef(Mut)
extraction now returns an opaque Rust error #5413PyTypeInfo
with#[pymodule_use]
. #5414Debug
representation ofPyBuffer<T>
. #5442experimental-inspect
: change the way introspection data is emitted in the binaries to avoid a pointer indirection and simplify parsing. #5450Py<T>::drop
for the case when attached to the Python interpreter. #5454DowncastError
andDowncastIntoError
withCastError
andCastIntoError
. #5468GraalPy
. #5471PyAnyMethods::downcast
functions in favour ofBound::cast
functions. #5472PyTypeCheck
anunsafe trait
. #5473PyCapsuleMethods
:pointer()
,reference()
, andis_valid()
. #5474PyCapsuleMethods::reference
. #5474PyCapsuleMethods::name
now returnsCapsuleName
wrapper instead of&CStr
. #5474import_exception_bound
in favour ofimport_exception
. #5480PyList::get_item_unchecked
,PyTuple::get_item_unchecked
, andPyTuple::get_borrowed_item_unchecked
no longer check for null values at the provided index. #5494DateTime<Local>
. #5507Removed
FromPyObjectBound
trait. #4390Fixed
wasm32-wasip2
. #5368OsStr
conversion for non-utf8 strings on Windows. #5444cargo vendor
caused by gitignored build artifactemscripten/pybuilddir.txt
. #5456PyMethodDef
instances inside#[pyfunction]
macro generated code. #5459PyObjectObFlagsAndRefcnt
on 32-bit Python 3.14 (doesn't exist). #5499abi3
interpreters on Windows using maturin's built-in sysconfig in combination with thegenerate-import-lib
feature. #5503PyModule_ExecDef
andPyModule_FromDefAndSpec2
on PyPy. #5529v0.26.0
Compare Source
Packaging
bytes
dependency to add conversions forbytes::Bytes
. #5252pyo3-introspection
to pair with theexperimental-inspect
feature. #5300PYO3_BUILD_EXTENSION_MODULE
now causes the same effect as theextension-module
feature. Eventually we expect maturin and setuptools-rust to set this environment variable automatically. Users with their own build systems will need to do the same. #5343Added
#[pyo3(warn(message = "...", category = ...))]
attribute for automatic warnings generation for#[pyfunction]
and#[pymethods]
. #4364PyMutex
, available on Python 3.13 and newer. #4523PyMutex_IsLocked
, available on Python 3.14 and newer. #4523PyString::from_encoded_object
. #5017experimental-inspect
: add basic input type annotations. #5089PyFrameObject
from CPython 3.13. #5154experimental-inspect
: tag modules created using#[pymodule]
or#[pymodule_init]
functions as incomplete. #5207experimental-inspect
: add basic return type support. #5208PyCode::compile
andPyCodeMethods::run
to create and execute code objects. #5217PyOnceLock
type for thread-safe single-initialization. #5223PyClassGuard(Mut)
pyclass holders. In the future they will replacePyRef(Mut)
. #5233experimental-inspect
: allow annotations in#[pyo3(signature)]
signature attribute. #5241MutexExt
for parking_lot's/lock_apiReentrantMutex
. #5258experimental-inspect
: support class associated constants. #5272Bound::cast
family of functions superseding thePyAnyMethods::downcast
family. #5289Py_Version
andPy_IsFinalizing
. #5317experimental-inspect
: add output type annotation for#[pyclass]
. #5320experimental-inspect
: support#[pyclass(eq, eq_int, ord, hash, str)]
. #5338experimental-inspect
: add basic support for#[derive(FromPyObject)]
(no struct fields support yet). #5339Python::try_attach
. #5342Changed
Py_TPFLAGS_DISALLOW_INSTANTIATION
instead of a__new__
which always fails for a#[pyclass]
without a#[new]
on Python 3.10 and up. #4568PyModule::from_code
now defaultsfile_name
to<string>
if empty. #4777PyString::from_object
in favour ofPyString::from_encoded_object
. #5017abi3
for a Python version newer than pyo3 supports, automatically fall back to an abi3 build for the latest supported version. #5144is_instance_of
trait bound fromPyTypeInfo
toPyTypeCheck
. #5146MutexExt
return type to be an associated type. #5201PyCallArgs
forPy::call
and friends so they're equivalent to theirBound
counterpart. #5206Python::with_gil
toPython::attach
. #5209Python::allow_threads
toPython::detach
#5221GILOnceCell
type in favour ofPyOnceLock
. #5223pyo3::prepare_freethreaded_python
toPython::initialize
. #5247PyMemoryError
into/fromio::ErrorKind::OutOfMemory
. #5256GILProtected
. #5285#[pyclass]
docstring formatting from import time to compile time. #5286Python::attach
will now panic if the Python interpreter is in the process of shutting down. #5317PyTypeInfo::type_object
for#[pyclass]
types. #5324PyObject
type alias forPy<PyAny>
. #5325Python::with_gil_unchecked
toPython::attach_unchecked
. #5340Python::assume_gil_acquired
toPython::assume_attached
. #5354Removed
PyFrameObject
. #5154Eq
andPartialEq
implementations onPyGetSetDef
FFI definition. #5196_Py_IsCoreInitialized
and_Py_InitializeMain
. #5317Fixed
PyByteArray::to_vec
on freethreaded build to replicate GIL-enabled "soundness". #4742bigdecimal
into Python. #5198PyBuffer<T>
after the Python interpreter has been finalized. #5242experimental-inspect
: better automated imports generation. #5251experimental-inspect
: fix introspection of__richcmp__
,__concat__
,__repeat__
,__inplace_concat__
and__inplace_repeat__
. #5273PyRef::into_super
#5281Py_Exit
(never returns, was()
return value, now!
). #5317experimental-inspect
: fix handling of module members gated behind#[cfg(...)]
attributes. #5318Configuration
📅 Schedule: Branch creation - Only on Sunday ( * * * * 0 ) (UTC), 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 has been generated by Renovate Bot.