-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Rust crate pyo3 to 0.23.0 #73
base: master
Are you sure you want to change the base?
Conversation
9fdd43c
to
a19cd23
Compare
a19cd23
to
1b54140
Compare
1b54140
to
073965e
Compare
073965e
to
195ccf7
Compare
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: Cargo.lock
|
195ccf7
to
832486d
Compare
832486d
to
5568290
Compare
5568290
to
80712a8
Compare
80712a8
to
ae6381b
Compare
ae6381b
to
8cbd1dc
Compare
8cbd1dc
to
fe62ba1
Compare
fe62ba1
to
ee7321c
Compare
ee7321c
to
5d9a978
Compare
5d9a978
to
046958a
Compare
046958a
to
5d0d6fd
Compare
5d0d6fd
to
7a20094
Compare
7a20094
to
222cb19
Compare
222cb19
to
0a7f803
Compare
0a7f803
to
e94c3ce
Compare
|
e94c3ce
to
420406d
Compare
This PR contains the following updates:
0.17.1
->0.23.0
Release Notes
pyo3/pyo3 (pyo3)
v0.23.0
Compare Source
Packaging
hashbrown
optional dependency to include version 0.15. #4604eyre
optional dependency to 0.6.8. #4617hashbrown
optional dependency to 0.14.5. #4617indexmap
optional dependency to 2.5.0. #4617num-complex
optional dependency to 0.4.6. #4617chrono-tz
optional dependency to 0.10. #4617Added
IntoPyObject
(fallible) conversion trait to convert from Rust to Python values. #4060#[pyclass(str="<format string>")]
option to generate__str__
based on aDisplay
implementation or format string. #4233PartialEq
forBound<'py, PyInt>
withu8
,u16
,u32
,u64
,u128
,usize
,i8
,i16
,i32
,i64
,i128
andisize
. #4317PartialEq<f64>
andPartialEq<f32>
forBound<'py, PyFloat>
. #4348as_super
andinto_super
methods forBound<T: PyClass>
. #4351PyCFunctionFast
andPyCFunctionFastWithKeywords
#4415PyMutex
on Python 3.13 and newer. #4421PyDict::locked_for_each
to iterate efficiently on freethreaded Python. #4439PyObject_GetOptionalAttr
,PyObject_GetOptionalAttrString
,PyObject_HasAttrWithError
,PyObject_HasAttrStringWithError
,Py_CONSTANT_*
constants,Py_GetConstant
,Py_GetConstantBorrowed
, andPyType_GetModuleByDef
on Python 3.13 and newer. #4447IntoPyObject
. #4495Borrowed::as_ptr
. #4520PyImport_AddModuleRef
. #4529PyAnyMethods::try_iter
. #4553pyo3::sync::with_critical_section
, a wrapper around the Python Critical Section API added in Python 3.13. #4587#[pymodule(gil_used = false)]
option to declare that a module supports the free-threaded build. #4588PyModule::gil_used
method to declare that a module supports the free-threaded build. #4588PyDateTime_CAPSULE_NAME
. #4634PyMappingProxy
type to represent themappingproxy
Python class. #4644PyList_Extend
andPyList_Clear
. #4667IntoPyObjectRef
. #4674pyo3::sync::OnceExt
andpyo3::sync::OnceLockExt
traits. #4676Changed
IntoPyObject
overIntoPy<Py<PyAny>>>
for#[pyfunction]
and#[pymethods]
return types. #4060#[pyclass]
and#[pyo3(..)]
attributes. #4243#[pymodule]
are automatically treated as submodules (noPyInit_
entrypoint is created). #4308PyAnyMethods::is_ellipsis
(Py::is_ellipsis
was deprecated in PyO3 0.20). #4322PyLong
in favor ofPyInt
. #4347IntoPyDict::into_py_dict_bound
toIntoPyDict::into_py_dict
. #4388PyModule::from_code
now expects&CStr
as arguments instead of&str
. #4404#[pyfunction]
s when compiling on abi3 for Python 3.10 and up. #4415Copy
andClone
fromPyObject
struct FFI definition. #4434Python::eval
andPython::run
now take a&CStr
instead of&str
. #4435IPowModulo
,PyClassAttributeDef
,PyGetterDef
,PyMethodDef
,PyMethodDefType
, andPySetterDef
from PyO3's public API. #4441IntoPyObject
impls forVec<u8>
,&[u8]
,[u8; N]
,Cow<[u8]>
andSmallVec<[u8; N]>
now convert into Pythonbytes
rather than alist
of integers. #4442IntoPyDict::into_py_dict
is now fallible due toIntoPyObject
migration. #4493abi3
feature will now override config files provided viaPYO3_BUILD_CONFIG
. #4497GILProtected
struct on free-threaded Python. #4504PyListMethods::get_item_unchecked
on free-threaded Python. #4539GILOnceCell::import
. #4542PyAnyMethods::iter
in favour ofPyAnyMethods::try_iter
. #4553#[pyclass]
macro now requires a types to beSync
. (Except for#[pyclass(unsendable)]
types). #4566PyList::new
andPyTuple::new
are now fallible due toIntoPyObject
migration. #4580PyErr::matches
is now fallible due toIntoPyObject
migration. #4595ToPyObject
in favour ofIntoPyObject
#4595PyWeakrefMethods::get_option
. #4597PyWeakrefMethods
trait. #4598PyNativeTypeInitializer
andPyObjectInit
from the PyO3 public API. #4611IntoPy
in favor ofIntoPyObject
#4618PyErr::take()
andPyErr::fetch()
on Python 3.11 and older. #4655IntoPy::type_output
toIntoPyObject::type_output
. #4657PyMapping::keys
,PyMapping::values
andPyMapping::items
toBound<'py, PyList>
instead ofBound<'py, PySequence>
. #4661IntoPyObject
by reference or by value together withClone
. This makesPy<T>
available as field type. #4694Removed
PyUnicode
in favour ofPyString
. #4370gil-refs
feature. #4378_Py_IMMORTAL_REFCNT
,_Py_IsImmortal
,_Py_TPFLAGS_STATIC_BUILTIN
,_Py_Dealloc
,_Py_IncRef
,_Py_DecRef
. #4447_Py_c_sum
,_Py_c_diff
,_Py_c_neg
,_Py_c_prod
,_Py_c_quot
,_Py_c_pow
,_Py_c_abs
. #4521_borrowed
methods ofPyWeakRef
andPyWeakRefProxy
. #4528_PyErr_ChainExceptions
. #4534Fixed
lib_dir
when cross-compiling. #4389Py_Is
for PyPy on 3.10 to call the function defined by PyPy. #4447#[cfg]
attributes for simple enum variants. #4509non_snake_case
method names inside#[pymethods]
generated code. #4567#[derive(FromPyObject)]
generic struct with trait bounds. #4645#[classmethod]
and#[staticmethod]
on magic methods. #4654unsafe_op_in_unsafe_fn
in generated macro code. #4674#[pyclass] enum
s with custom__eq__
implementation. #4692non_upper_case_globals
lint firing for generated__match_args__
on complex enums. #4705v0.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.5
Compare Source
Fixed
__clear__
slot andclear
method generated code. #4619v0.22.4
Compare Source
Added
PyWeakref_GetRef
andcompat::PyWeakref_GetRef
. #4528Changed
_borrowed
methods onPyWeakRef
andPyWeakrefProxy
(just use the owning forms). #4590Fixed
_PyLong_NumBits
on Python 3.13 and later. #4450__traverse__
functions for base classes not being called by subclasses created with#[pyclass(extends = ...)]
. #4563#![forbid(unsafe_code)]
. #4574_borrowed
methods onPyWeakRef
andPyWeakrefProxy
by leaking their contents. #4590PyType_GetSlot
on static types before Python 3.10. #4599v0.22.3
Compare Source
Added
pyo3::ffi::compat
namespace with compatibility shims for C API functions added in recent versions of Python.PyDict_GetItemRef
on Python 3.13 and newer, andcompat::PyDict_GetItemRef
for all versions. #4355PyList_GetItemRef
on Python 3.13 and newer, andpyo3_ffi::compat::PyList_GetItemRef
for all versions. #4410compat::Py_NewRef
andcompat::Py_XNewRef
. #4445compat::PyObject_CallNoArgs
andcompat::PyObject_CallMethodNoArgs
. #4461GilOnceCell<Py<T>>::clone_ref
. #4511Changed
#[pyfunction]
defined inside#[pymethods]
. #4349Removed
_Py_PackageContext
. #4420Fixed
#[pymodule]
under presence of#![no_implicit_prelude]
. #4328PyDict::get_item
(unsafe in free-threaded Python). #4355#[pyclass(eq)]
macro hygiene issues for structs and enums. #4359'#[pyfunction]
and#[pymethods]
generated code which affected expansion inmacro_rules
context. #4382unsafe_code
lint error in#[pyclass]
generated code. #4396PyList::get_item
(unsafe in free-threaded Python). #4410PyArg_ParseTupleAndKeywords
to take*const *const c_char
instead of*mut *mut c_char
on Python 3.13 and up. #4420PyClassInitializer
: panic if adding subclass to existing instance viaPyClassInitializer::from(Py<BaseClass>).add_subclass(SubClass)
. #4454__traverse__
handlers. #4479v0.22.2
Compare Source
Packaging
UNSAFE_PYO3_BUILD_FREE_THREADED=1
environment 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.1
Compare Source
Added
#[pyo3(submodule)]
option for declarative#[pymodule]
s. #4301PartialEq<bool>
forBound<'py, PyBool>
. #4305Fixed
NotImplemented
instead of raisingTypeError
from 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.0
Compare Source
Packaging
heck
dependency to 0.5. #3966chrono-tz
optional dependency to include version 0.10. #4061num-rational
feature to add conversions with Python'sfractions.Fraction
. #4148Added
PyWeakref
,PyWeakrefReference
andPyWeakrefProxy
. #3835#[pyclass]
on enums that have tuple variants. #4072Decimal
conversion. #4079pyo3_disable_reference_pool
conditional 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_name
which matches the "fully qualified name" defined in PEP 737. #4196PyTypeMethods::mro
andPyTypeMethods::bases
. #4197#[pyclass(ord)]
to implement ordering based onPartialOrd
. #4202ToPyObject
andIntoPy<PyObject>
forPyBackedStr
andPyBackedBytes
. #4205#[pyclass(hash)]
option to implement__hash__
in terms of theHash
implementation #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_super
methods toPyRef
andPyRefMut
for accesing the base class by reference. #4219PartialEq<str>
forBound<'py, PyString>
. #4245PyModuleMethods::filename
on PyPy. #4249PartialEq<[u8]>
forBound<'py, PyBytes>
. #4250pyo3_ffi::c_str
macro to create&'static CStr
on Rust versions which don't have 1.77'sc""
literals. #4255bool
conversion withnumpy
2.0'snumpy.bool
type #4258PyAnyMethods::{bitnot, matmul, floor_div, rem, divmod}
. #4264Changed
PySliceIndices::slicelength
and thelength
parameter ofPySlice::indices()
. #3761Clone
ing pointers into the Python heap has been moved behind thepy-clone
feature, 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::dir
to be fallible and returnPyResult<Bound<'py, PyList>>
(and similar forPyAny::dir
). #4100weakref
ordict
when compiling forabi3
for Python older than 3.9. #4194PyType::name
to always match Python__name__
. #4196#[pyclass(eq_int)]
. #4210module=
attribute of declarative modules' child#[pymodule]
s and#[pyclass]
es. #4213module
option for complex enum variants from the value set on the complex enummodule
. #4228abi3
feature on PyPy or GraalPy. #4237#[pyo3(get)]
on#[pyclass]
fields. #4254PyCFunction::new
,PyCFunction::new_with_keywords
andPyCFunction::new_closure
now take&'static CStr
name and doc arguments (previously was&'static str
). #4255experimental-declarative-modules
feature is now stabilized and available by default. #4257Fixed
PYO3_CROSS_LIB_DIR
is set to a missing path. #4043create_exception!
living in a different Rust module using thedeclarative-module
feature. #4086PY_VECTORCALL_ARGUMENTS_OFFSET
andPyVectorcall_NARGS
to fix a false-positive assertion. #4104PyUnicode_DATA
on PyPy: not exposed by PyPy. #4116#[pyo3(from_py_with = ...)]
attribute on dunder (__magic__
) method arguments instead of silently ignoring it. #4117mod
node. #4236__dict__
attribute missing for#[pyclass(dict)]
instances when building forabi3
on Python 3.9. #4251v0.21.2
Compare Source
Changed
PySet::empty()
gil-ref constructor. #4082Fixed
async fn
in#[pymethods]
with a&self
receiver and more than one additional argument. #4035__traverse__
. #4045#[pyclass]
living in a different Rust module using theexperimental-declarative-modules
feature. #4054missing_docs
lint triggering on documented#[pymodule]
functions. #4067libpython
). #4073v0.21.1
Compare Source
Added
Send
andSync
forPyBackedStr
andPyBackedBytes
. #4007Clone
,Debug
,PartialEq
,Eq
,PartialOrd
,Ord
andHash
implementation forPyBackedBytes
andPyBackedStr
, andDisplay
forPyBackedStr
. #4020import_exception_bound!
macro to import exception types without generating GIL Ref functionality for them. #4027Changed
#[setter]
function arguments. #3998#[inline]
hints on manyBound
andBorrowed
methods. #4024Fixed
#[pyo3(from_py_with = "")]
in#[setter]
methods #3995&Bound
in#[setter]
methods. #3998#[pymodule]
,#[pyfunction]
and#[pyclass]
macros. #4009pyo3::import_exception!
does not exist. #4012#[pymethod]
with a receiver and additional arguments. #4015v0.21.0
Compare Source
Added
PyMemoryView
type. #3514async fn
in for#[pyfunction]
and#[pymethods]
, with theexperimental-async
feature. #3540 #3588 #3599 #3931PyTypeInfo
forPyEllipsis
,PyNone
andPyNotImplemented
. #3577#[pyclass]
on enums that have non-unit variants. #3582chrono
feature withabi3
feature. #3664FromPyObject
,IntoPy<PyObject>
andToPyObject
are implemented onstd::duration::Duration
#3670PyString::to_cow
. AddPy<PyString>::to_str
,Py<PyString>::to_cow
, andPy<PyString>::to_string_lossy
, as ways to access Python string data safely beyond the GIL lifetime. #3677Bound<T>
andBorrowed<T>
smart pointers as a new API for accessing Python objects. #3686PyNativeType::as_borrowed
to convert "GIL refs" to the newBound
smart pointer. #3692FromPyObject::extract_bound
method, to migrateFromPyObject
implementations to the Bound API. #3706gil-refs
feature to allow continued use of the deprecated GIL Refs APIs. #3707PyAnyMethods
for binary operators (add
,sub
, etc.) #3712chrono-tz
feature allowing conversion betweenchrono_tz::Tz
andzoneinfo.ZoneInfo
#3730PyType_GetModuleByDef
. #3734std::time::SystemTime
anddatetime.datetime
#3736Py::as_any
andPy::into_any
. #3785PyStringMethods::encode_utf8
. #3801PyBackedStr
andPyBackedBytes
, as alternatives to&str
and&bytes
where a Python object owns the data. #3802 #3991#[pymodule]
macro on Rustmod
blocks, with theexperimental-declarative-modules
feature. #3815ExactSizeIterator
forset
andfrozenset
iterators onabi3
feature. #3849Py::drop_ref
to explicitly drop a `Py`` and immediately decrease the Python reference count if the GIL is already held. #3871#[pymodule]
macro on single argument functions that take&Bound<'_, PyModule>
. #3905FromPyObject
forCow<str>
. #3928Default
forGILOnceCell
. #3971PyDictMethods::into_mapping
,PyListMethods::into_sequence
andPyTupleMethods::into_sequence
. #3982Changed
PyDict::from_sequence
now takes a single argument of type&PyAny
(previously took two argumentsPython
andPyObject
). #3532Py::is_ellipsis
andPyAny::is_ellipsis
in favour ofany.is(py.Ellipsis())
. #3577PyTypeInfo
functionality into new traitsHasPyGilRef
andPyTypeCheck
. #3600PyTryFrom
andPyTryInto
traits in favor ofany.downcast()
via thePyTypeCheck
andPyTypeInfo
traits. #3601&self
/&mut self
#3609FromPyObject
for set types now also acceptfrozenset
objects as input. #3632FromPyObject
forbool
now also accepts NumPy'sbool_
as input. #3638AsRefSource
associated type toPyNativeType
. #3653.is_true
to.is_truthy
onPyAny
andPy<PyAny>
to clarify that the test is not based on identity with or equality to the True singleton. #3657PyType::name
is nowPyType::qualname
whereasPyType::name
efficiently accesses the full name which includes the module name. #3660Iter(A)NextOutput
types are now deprecated and__(a)next__
can directly return anything which can be converted into Python objects, i.e. awaitables do not need to be wrapped intoIterANextOutput
orOption
any more.Option
can still be used as well and returningNone
will trigger the fast path for__next__
, stopping iteration without having to raise aStopIteration
exception. #3661FromPyObject
onchrono::DateTime<Tz>
for allTz
, not justFixedOffset
andUtc
. #3663PyTzInfoAccess
trait. For the deprecated gil-ref API, the trait is now implemented for&'py PyTime
and&'py PyDateTime
instead ofPyTime
andPyDate
. #3679__traverse__
become no-ops for unsendable pyclasses if on the wrong thread, thereby avoiding hard aborts at the cost of potential leakage. #3689PyNativeType
inpyo3::prelude
. #3692extract::<i64>
(and other integer types) by avoiding call to__index__()
converting the value to an integer for 3.10+. Gives performance improvement of around 30% for successful extraction. #3742FromPyObject
forPy<T>
to justT: PyTypeCheck
. #3776PySet
andPyFrozenSet
iterators now always iterate the equivalent ofiter(set)
. (A "fast path" with no noticeable performance benefit was removed.) #3849FromPyObject
for&str
,Cow<str>
,&[u8]
andCow<[u8]>
onto a temporary traitFromPyObjectBound
whengil-refs
feature is deactivated. #3928GILPool
,Python::with_pool
, andPython::new_pool
. #3947Removed
Fixed
Py_MAX_NDIMS
in favour ofPyBUF_MAX_NDIM
. #3757datetime
types when an invaliddatetime
module is on sys.path. #3818non_local_definitions
lint warning triggered by many PyO3 macros. #3901PyCode
andPyCode_Type
on PyPy:PyCode_Type
is not exposed by PyPy. #3934v0.20.3
Compare Source
Packaging
portable-atomic
dependency. #3619abi3
stable ABI by the environment variablePYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
. #3821Fixed
portable-atomic
to support platforms without 64-bit atomics. #3619either
feature enabled withoutexperimental-inspect
enabled. #3834v0.20.2
Compare Source
Packaging
pyo3
andpyo3-ffi
dependencies onpyo3-build-config
to require the same patch version, i.e.pyo3
0.20.2 requires exactlypyo3-build-config
0.20.2. #3721Fixed
pyo3
0.20.0 with latestpyo3-build-config
0.20.X. #3724v0.20.1
Compare Source
Added
either
feature to add conversions foreither::Either<L, R>
sum type. #3456smallvec
feature to add conversions forsmallvec::SmallVec
. #3507take
andinto_inner
methods toGILOnceCell
#3556#[classmethod]
methods can now also receivePy<PyType>
as their first argument. #3587#[pyfunction(pass_module)]
can now also receivePy<PyModule>
as their first argument. #3587traverse
method toGILProtected
. #3616abi3-py312
feature #3687Fixed
chrono
dependency. #3512clippy::unnecessary_fallible_conversions
warning when using aPy<Self>
self
receiver. #3564v0.20.0
Compare Source
Packaging
indoc
dependency to 2.0 andunindent
dependency to 0.2. #3237syn
dependency to 2.0. #3239chrono
optional dependency to require 0.4.25 or newer. #3427Added
__lt__
,__le__
,__eq__
,__ne__
,__gt__
and__ge__
in#[pymethods]
. #3203Py_GETENV
. #3336as_ptr
andinto_ptr
inherent methods forPy
,PyAny
,PyRef
, andPyRefMut
. #3359DoubleEndedIterator
forPyTupleIterator
andPyListIterator
. #3366#[pyclass(rename_all = "...")]
option: this allows renaming all getters and setters of a struct, or all variants of an enum. Available renaming rules are:"camelCase"
,"kebab-case"
,"lowercase"
,"PascalCase"
,"SCREAMING-KEBAB-CASE"
,"SCREAMING_SNAKE_CASE"
,"snake_case"
,"UPPERCASE"
. #3384PyObject_GC_IsTracked
andPyObject_GC_IsFinalized
on Python 3.9 and up (PyPy 3.10 and up). #3403None
,Ellipsis
, andNotImplemented
. #3408Py_mod_multiple_interpreters
constant and its possible values. #3494PyInterpreterConfig
struct, its constants andPy_NewInterpreterFromConfig
. #3502Changed
PySet::discard
to returnPyResult<bool>
(previously returned nothing). #3281IntoPy
for Rust tuples to Python tuples. #3321PyDict::get_item
to no longer suppress arbitrary exceptions (the return type is nowPyResult<Option<&PyAny>>
instead ofOption<&PyAny>
), and deprecatePyDict::get_item_with_error
. #3330AsPyPointer
is now anunsafe trait
. #3358os.PathLike
values in implementation ofFromPyObject
forPathBuf
. #3374__builtins__
to globals inpy.run()
andpy.eval()
if they're missing. #3378FromPyObject
forBigInt
andBigUint
. #3379PyIterator::from_object
andPyByteArray::from
now take a single argument of type&PyAny
(previously took two argumentsPython
andAsPyPointer
). #3389AsPyPointer
withAsRef<PyAny>
as a bound in the blanket implementation ofFrom<&T> for PyObject
. #3391impl IntoPy<PyObject> for &T where T: AsPyPointer
with implementations ofimpl IntoPy<PyObject>
for&PyAny
,&T where T: AsRef<PyAny>
, and&Py<T>
. #3393std::io::Error
kind in implementation ofFrom<std::io::IntoInnerError>
forPyErr
#3396ErrorKind
in implementation ofFrom<PyErr>
forOSError
subclass. #3397PyErr
in implementation ofFrom<std::io::Error>
forPyErr
if thestd::io::Error
has been built using a Python exception (previously would create a new exception wrapping thestd::io::Error
). #3402#[pymodule]
will now return the same module object on repeated import by the same Python interpreter, on Python 3.9 and up. #3446chrono
types to Pythondatetime
types (datetime
cannot represent leap-seconds). #3458Err
returned from#[pyfunction]
will now have a non-None__context__
if called from inside acatch
block. #3455#[__new__]
form of#[new]
attribute. #3505Removed
#[args]
attribute for#[pymethods]
. #3232IntoPyPointer
trait in favour ofinto_ptr
inherent methods. #3385Fixed
PySet::discard
. #3281PyTupleIterator
type returned byPyTuple::iter
is now public and hence can be named by downstream crates. #3366PyOS_FSPath
on PyPy. #3374PyTypeBuilder::build
. #3401_Py_GetAllocatedBlocks
,_PyObject_GC_Malloc
, and_PyObject_GC_Calloc
on Python 3.11 and up. #3403ResourceWarning
and crashes related to GC when running with debug builds of CPython. #3404Option<T>
default arguments will no longer re-wrapSome(T)
or expressions evaluating toNone
. #3461IterNextOutput::Return
not returning a value on PyPy. #3471#[pymethods]
blocks. #3491#[new]
,#[classmethod]
,#[staticmethod]
, and#[classattr]
. #3484PyMarshal_WriteObjectToString
fromPyMarshal_ReadObjectFromString
with theabi3
feature. #3490_PyFrameEvalFunction
on Python 3.11 and up (it now receives a_PyInterpreterFrame
opaque struct). #3500v0.19.2
Compare Source
Added
PyState_AddModule
,PyState_RemoveModule
andPyState_FindModule
for PyPy 3.9 and up. #3295_PyObject_CallFunction_SizeT
and_PyObject_CallMethod_SizeT
. #3297PyErr::Display
for all Python versions, and FFI symbolPyErr_DisplayException
for Python 3.12. #3334PyType_GetDict()
for Python 3.12. #3339PyAny::downcast_exact
. #3346PySlice::full()
to construct a full slice (::
). #3353Changed
PyErr
for 3.12 betas to avoid deprecated ffi methods. #3306object.h
for Python 3.12.0b4. #3335pyo3::ffi
struct definitions to be compatible with 3.12.0b4. #3342float
tof64
(andPyFloat::value
) on non-abi3 builds. #3345Fixed
SystemError
raised inPyUnicodeDecodeError_Create
on PyPy 3.10. #3297Py_EnterRecursiveCall
to returnc_int
(was incorrectly returning()
). #3300PyErr::matches
andPyErr::is_instance
returned results inconsistent withPyErr::get_type
. #3313PanicException
when unwinding after the exception was "normalized". #3326PyErr::from_value
andPyErr::into_value
losing traceback on conversion. #3328v0.19.1
Compare Source
Packaging
hashbrown
optional dependency to include version 0.14 #3258indexmap
optional dependency to include version 2. #3277Added
pyo3::types::PyFrozenSetBuilder
to allow building aPyFrozenSet
item by item. #3156ipaddress.IPv4Address
/ipaddress.IPv6Address
andstd::net::IpAddr
. #3197num-bigint
feature in combination withabi3
. #3198PyErr_GetRaisedException()
,PyErr_SetRaisedException()
to FFI definitions for Python 3.12 and later. #3248Python::with_pool
which is a safer but more limited alternative toPython::new_pool
. #3263PyDict::get_item_with_error
on PyPy. #3270#[new]
methods may to returnPy<Self>
in order to return existing instances. #3287Fixed
__complex__
toComplex
when usingabi3
or PyPy. #3185PyAny::hasattr
. #3271PySet
orPyFrozenSet
or returning types converted into these internally, e.g.HashSet
orBTreeSet
. #3286v0.19.0
Compare Source
Packaging
Added
text_signature
option (and automatically generate signature) for#[new]
in#[pymethods]
. #2980decimal.Decimal
andrust_decimal::Decimal
. #3016#[pyo3(from_item_all)]
when derivingFromPyObject
to specifyget_item
as getter for all fields. #3120pyo3::exceptions::PyBaseExceptionGroup
for Python 3.11, and corresponding FFI definitionPyExc_BaseExceptionGroup
. #3141#[new]
with#[classmethod]
to create a constructor which receives a (subtype's) class/PyType
as its first argument. #3157PyClass::get
andPy::get
for GIL-indepedent access to classes with#[pyclass(frozen)]
. #3158PyAny::is_exact_instance
andPyAny::is_exact_instance_of
. #3161Changed
PyAny::is_instance_of::<T>(obj)
is now equivalent toT::is_type_of(obj)
, and now returnsbool
instead ofPyResult<bool>
. #2881text_signature
option on#[pyclass]
structs. #2980anyhow::Error
/eyre::Report
containing a basicPyErr
without a chain in aPyRuntimeError
. #3004#[getter]
and#[setter]
to use a common call "trampoline" to slightly reduce generated code size and compile times. #3029text_signature
. #3050None
in automatically-generatedtext_signature
. #3066PySequence::list
andPySequence::tuple
toPySequence::to_list
andPySequence::to_tuple
. (The old names continue to exist as deprecated forms.) #3111PyRef::py
andPyRefMut::py
to match the underlying borrow. #3131Python::with_gil
, is now locked inside of implementations of the `__traverConfiguration
📅 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.