Skip to content

Conversation

@renovate-sh-app
Copy link
Contributor

@renovate-sh-app renovate-sh-app bot commented Jan 12, 2026

This PR contains the following updates:

Package Type Update Change
pyo3 dependencies minor 0.26.00.28.0

Release Notes

pyo3/pyo3 (pyo3)

v0.28.0

Compare Source

Packaging
  • Bump MSRV to Rust 1.83. #​5531
  • Bump minimum supported quote version to 1.0.37. #​5531
  • Bump supported GraalPy version to 25.0. #​5542
  • Drop memoffset dependency. #​5545
  • Support for free-threaded Python is now opt-out rather than opt-in. #​5564
  • Bump target-lexicon dependency to 0.13.3. #​5571
  • Drop indoc and unindent dependencies. #​5608
Added
  • Add __init__ support in #[pymethods]. #​4951
  • Expose PySuper on PyPy, GraalPy and ABI3 #​4951
  • Add PyString::from_fmt and py_format! macro. #​5199
  • Add #[pyclass(new = "from_fields")] option. #​5421
  • Add pyo3::buffer::PyUntypedBuffer, a type-erased form of PyBuffer<T>. #​5458
  • Add PyBytes::new_with_writer #​5517
  • Add PyClass::NAME. #​5579
  • Add pyo3_build_config::add_libpython_rpath_link_args. #​5624
  • Add PyBackedStr::clone_ref and PyBackedBytes::clone_ref methods. #​5654
  • Add PyCapsule::new_with_pointer and PyCapsule::new_with_pointer_and_destructor for creating capsules with raw pointers. #​5689
  • Add #[deleter] attribute to implement property deleters in #[methods]. #​5699
  • Add IntoPyObject and FromPyObject implementations for uuid::NonNilUuid. #​5707
  • Add PyBackedStr::as_str and PyBackedStr::as_py_str methods. #​5723
  • Add support for subclassing native types (PyDict, exceptions, ...) when building for abi3 on Python 3.12+. #​5733
  • Add support for subclassing PyList when building for Python 3.12+. #​5734
  • FFI definitions:
    • Add FFI definitions PyEval_GetFrameBuiltins, PyEval_GetFrameGlobals and PyEval_GetFrameLocals on Python 3.13 and up. #​5590
    • Add FFI definitions PyObject_New, PyObject_NewVar, PyObject_GC_Resize, PyObject_GC_New, and PyObject_GC_NewVar. #​5591
    • Added FFI definitions and an unsafe Rust API wrapping Py_BEGIN_CRITICAL_SECTION_MUTEX and Py_BEGIN_CRITICAL_SECTION_MUTEX2. #​5642
    • Add FFI definition PyDict_GetItemStringRef on Python 3.13 and up. #​5659
    • Add FFI definition PyIter_NextItem on Python 3.14 and up, and compat::PyIter_NextItem for older versions. #​5661
    • Add FFI definitions PyThreadState_GetInterpreter and PyThreadState_GetID on Python 3.9+, PyThreadState_EnterTracing and PyThreadState_LeaveTracing on Python 3.11+, PyThreadState_GetUnchecked on Python 3.13+, and compat::PyThreadState_GetUnchecked. #​5711
    • Add FFI definitions PyImport_ImportModuleAttr and PyImport_ImportModuleAttrString on Python 3.14+. #​5737
    • Add FFI definitions for the PyABIInfo and PyModExport APIs available in Python 3.15. #​5746
  • experimental-inspect:
    • Emit base classes. #​5331
    • Emit @typing.final on final classes. #​5552
    • Generate nested classes for complex enums. #​5708
    • Emit async keyword for async functions. #​5731
Changed
  • Call sys.unraisablehook instead of PyErr_Print if panicking on null FFI pointer in Bound, Borrowed and Py constructors. #​5496
  • Use PEP-489 multi-phase initialization for #[pymodule]. #​5525
  • Deprecate implicit by-value implementation of FromPyObject for #[pyclass]. #​5550
  • Deprecate PyTypeInfo::NAME and PyTypeInfo::MODULE. #​5579
  • Deprecate Py<T>::from_{owned,borrowed}[or_{err,opt}] constructors from raw pointer. #​5585
  • Deprecate FFI definitions PyEval_AcquireLock and PyEval_ReleaseLock. #​5590
  • Relax 'py: 'a bound in Py::extract. #​5594
  • Add a T: PyTypeCheck bound to the IntoPyObject implementations on Bound<T>, Borrowed<T> and Py<T>. #​5640
  • The with_critical_section and with_critical_section2 functions are moved to pyo3::sync::critical_section. #​5642
  • Use PyIter_NextItem in PyIterator::next implementation. #​5661
  • IntoPyObject for simple enums now uses a singleton value, allowing identity (python is) comparisons. #​5665
  • Allow any Sequence[int] in FromPyObject on Cow<[u8]> and change the error type to PyErr. #​5667
  • async pymethods now borrow self only for the duration of awaiting the future, not the entire method call. #​5684
  • Change CastError formatted message to directly describe the "is not an instance of" failure condition. #​5693
  • Add #[inline] hints to many methods on PyBackedStr. #​5723
  • Remove redundant internal counters from BoundSetIterator and BoundFrozenSetIterator. #​5725
  • Implement PyIterator::size_hint on abi3 builds (previously was only on unlimited API builds). #​5727
  • Deprecate FFI definition PyImport_ImportModuleNoBlock (deprecated in Python 3.13). #​5737
  • #[new] can now return arbitrary Python objects. #​5739
  • experimental-inspect:
    • Introduce TypeHint and make use of it to encode type hint annotations. #​5438
    • Rename PyType{Info,Check}::TYPE_INFO into PyType{Info,Check}::TYPE_HINT. #​5438 #​5619 #​5641
    • Fill annotations on function arguments and return values for all types supported natively by PyO3. #​5634 #​5637 #​5639
    • Use _typeshed.Incomplete instead of typing.Any as default type hint, to make it easier to spot incomplete trait implementations. #​5744
    • Use general Python expression syntax for type hints. #​5671
Removed
  • Remove all functionality deprecated in PyO3 0.25 and 0.26. #​5740
  • FFI definitions:
    • Remove FFI definition PyEval_GetCallStats (removed from CPython in Python 3.7). #​5590
    • Remove FFI definitions PyEval_AcquireLock and PyEval_ReleaseLock on Python 3.13 and up. #​5590
    • Remove private FFI definitions _PyObject_New, _PyObject_NewVar, _PyObject_GC_Resize, _PyObject_GC_New, and _PyObject_GC_NewVar. #​5591
    • Remove private FFI definitions _PyDict_SetItem_KnownHash, _PyDict_Next, _PyDict_NewPresized, _PyDict_Contains_KnownHash, and _PyDict_Contains. #​5659
    • Remove private FFI definitions _PyFrameEvalFunction, _PyInterpreterState_GetEvalFrameFunc and _PyInterpreterState_SetEvalFrameFunc. #​5711
    • Remove private FFI definitions _PyImport_IsInitialized, _PyImport_SetModule, _PyImport_SetModuleString, _PyImport_AcquireLock, _PyImport_ReleaseLock, _PyImport_FindBuiltin, _PyImport_FindExtensionObject, _PyImport_FixupBuiltin, and _PyImport_FixupExtensionObject. #​5737
Fixed
  • Fix PyModuleMethods::add_submodule() to use the last segment of the submodule name as the attribute name on the parent module instead of using the full name. #​5375
  • Link with libpython for Cygwin extension modules. #​5571
  • Link against the limited API DLL for Cygwin when abi3 is used. #​5574
  • Handle errors in PyIterator when calling size_hint #​5604
  • Link with libpython for iOS extension modules. #​5605
  • Correct IntoPyObject output type of PyBackedStr to be PyString, not PyAny. #​5655
  • Fix async functions to return None rather than empty tuple (). #​5685
  • Fix compile error when using references to #[pyclass] types (e.g. &MyClass) as arguments to async #[pyfunction]s. #​5725
  • FFI definitions:
    • Fix FFI definition PyMemberDescrObject.d_member to use PyMemberDef for Python 3.11+ (was incorrectly PyGetSetDef). #​5647
    • Mark FFI definition PyThreadState_GetFrame available with abi3 in 3.10+. #​5711
    • Fix FFI definition PyImport_GetModule on PyPy. #​5737
  • experimental-inspect:
    • fix __new__ return type to be the built object type and not None. #​5555
    • fix imports of decorators. #​5618
    • fix the return type annotation of PyResult<()> (must be None and not tuple) #​5674

v0.27.2

Compare Source

Changed
  • Disable subclassing PyDict on GraalPy (unsupported for now, may crash at runtime). #​5653
Fixed
  • Fix crash when compiling on Rust 1.92+ with both debug assertions and optimizations enabled. #​5638
  • Fix FFI definition of PyDictObject on PyPy. #​5653

v0.27.1

Compare Source

Fixed
  • Fix clippy:declare_interior_mutable_const warning from #[pyfunction]. #​5538
  • Expose pyo3::types::PySendResult in public API. #​5539

v0.27.0

Compare Source

Packaging
  • Extend range of supported versions of hashbrown optional dependency to include version 0.16. #​5428
  • Bump optional num-bigint dependency minimum version to 0.4.4. #​5471
  • Test against Python 3.14 final release. #​5499
  • Drop support for PyPy 3.9 and 3.10. #​5516
  • Provide a better error message when building an outdated PyO3 for a too-new Python version. #​5519
Added
  • Add FromPyObjectOwned as convenient trait bound for FromPyObject when the data is not borrowed from Python. #​4390
  • Add Borrowed::extract, same as PyAnyMethods::extract, but does not restrict the lifetime by deref. #​4390
  • experimental-inspect: basic support for #[derive(IntoPyObject)] (no struct fields support yet). #​5365
  • experimental-inspect: support #[pyo3(get, set)] and #[pyclass(get_all, set_all)]. #​5370
  • Add PyTypeCheck::classinfo_object that returns an object that can be used as parameter in isinstance or issubclass. #​5387
  • Implement PyTypeInfo on datetime.* types even when the limited API is enabled. #​5388
  • Implement PyTypeInfo on PyIterator, PyMapping and PySequence. #​5402
  • Implement PyTypeInfo on PyCode when using the stable ABI. #​5403
  • Implement PyTypeInfo on PyWeakrefReference when using the stable ABI. #​5404
  • Add pyo3::sync::RwLockExt trait, analogous to pyo3::sync::MutexExt for readwrite locks. #​5435
  • Add PyString::from_bytes. #​5437
  • Implement AsRef<[u8]> for PyBytes. #​5445
  • Add CastError and CastIntoError. #​5468
  • Add PyCapsuleMethods::pointer_checked and PyCapsuleMethods::is_valid_checked. #​5474
  • Add Borrowed::cast, Borrowed::cast_exact and Borrowed::cast_unchecked. #​5475
  • Add conversions for jiff::civil::ISOWeekDate. #​5478
  • Add conversions for &Cstr, Cstring and Cow<Cstr>. #​5482
  • add #[pyclass(skip_from_py_object)] option, to opt-out of the FromPyObject: PyClass + Clone blanket impl. #​5488
  • Add PyErr::add_note. #​5489
  • Add FromPyObject impl for Cow<Path> & Cow<OsStr>. #​5497
  • Add #[pyclass(from_py_object)] pyclass option, to opt-in to the extraction of pyclasses by value (requires Clone). #​5506
Changed
  • Rework FromPyObject trait for flexibility and performance: #​4390
    • Add a second lifetime to FromPyObject, to allow borrowing data from Python objects (e.g. &str from Python str).
    • Replace extract_bound with extract, which takes Borrowed<'a, 'py, PyAny>.
  • Optimize FromPyObject implementations for Vec<u8> and [u8; N] from bytes and bytearray. #​5244
  • Deprecate #[pyfn] attribute. #​5384
  • Fetch type name dynamically on cast errors instead of using PyTypeCheck::NAME. #​5387
  • Deprecate PyTypeCheck::NAME in favour of PyTypeCheck::classinfo_object which provides the type information at runtime. #​5387
  • PyClassGuard(Mut) and PyRef(Mut) extraction now returns an opaque Rust error #​5413
  • Fetch type name dynamically when exporting types implementing PyTypeInfo with #[pymodule_use]. #​5414
  • Improve Debug representation of PyBuffer<T>. #​5442
  • experimental-inspect: change the way introspection data is emitted in the binaries to avoid a pointer indirection and simplify parsing. #​5450
  • Optimize Py<T>::drop for the case when attached to the Python interpreter. #​5454
  • Replace DowncastError and DowncastIntoError with CastError and CastIntoError. #​5468
  • Enable fast-path for 128-bit integer conversions on GraalPy. #​5471
  • Deprecate PyAnyMethods::downcast functions in favour of Bound::cast functions. #​5472
  • Make PyTypeCheck an unsafe trait. #​5473
  • Deprecate unchecked PyCapsuleMethods: pointer(), reference(), and is_valid(). #​5474
  • Reduce lifetime of return value in PyCapsuleMethods::reference. #​5474
  • PyCapsuleMethods::name now returns CapsuleName wrapper instead of &CStr. #​5474
  • Deprecate import_exception_bound in favour of import_exception. #​5480
  • PyList::get_item_unchecked, PyTuple::get_item_unchecked, and PyTuple::get_borrowed_item_unchecked no longer check for null values at the provided index. #​5494
  • Allow converting naive datetime into chrono DateTime<Local>. #​5507
Removed
  • Removed FromPyObjectBound trait. #​4390
Fixed
  • Fix compilation failure on wasm32-wasip2. #​5368
  • Fix OsStr conversion for non-utf8 strings on Windows. #​5444
  • Fix issue with cargo vendor caused by gitignored build artifact emscripten/pybuilddir.txt. #​5456
  • Stop leaking PyMethodDef instances inside #[pyfunction] macro generated code. #​5459
  • Don't export definition of FFI struct PyObjectObFlagsAndRefcnt on 32-bit Python 3.14 (doesn't exist). #​5499
  • Fix failure to build for abi3 interpreters on Windows using maturin's built-in sysconfig in combination with the generate-import-lib feature. #​5503
  • Fix FFI definitions PyModule_ExecDef and PyModule_FromDefAndSpec2 on PyPy. #​5529

Configuration

📅 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.


  • If you want to rebase/retry this PR, check this box

Need help?

You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| crate      | pyo3    | 0.26.0 | 0.28.0 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
@renovate-sh-app renovate-sh-app bot changed the title fix(deps): update rust crate pyo3 to 0.27.0 fix(deps): update rust crate pyo3 to 0.28.0 Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants