Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Aug 31, 2025

This PR contains the following updates:

Package Type Update Change
pyo3 dependencies minor 0.25.1 -> 0.27.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

pyo3/pyo3 (pyo3)

v0.27.2: PyO3 0.27.2

Compare Source

This patch contains very minor fixes for the PyO3 0.27 series:

  • Workaround a rustc 1.92+ crash compiling PyO3 with both debug assertions and optimizations enabled.
  • Fix runtime crash when subclassing dicts on PyPy and GraalPy.

There are also a number of documentation improvements applied across the codebase.

Thank you to the following contributors for the improvements:

@​davidhewitt
@​dependabot[bot]
@​MusicalNinjaDad
@​pkalivas
@​tpoliaw
@​Tpt

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

v0.26.0

Compare Source

Packaging
  • Bump hashbrown dependency to 0.15. #​5152
  • Update MSRV to 1.74. #​5171
  • Set the same maximum supported version for alternative interpreters as for CPython. #​5192
  • Add optional bytes dependency to add conversions for bytes::Bytes. #​5252
  • Publish new crate pyo3-introspection to pair with the experimental-inspect feature. #​5300
  • The PYO3_BUILD_EXTENSION_MODULE now causes the same effect as the extension-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. #​5343
Added
  • Add #[pyo3(warn(message = "...", category = ...))] attribute for automatic warnings generation for #[pyfunction] and #[pymethods]. #​4364
  • Add PyMutex, available on Python 3.13 and newer. #​4523
  • Add FFI definition PyMutex_IsLocked, available on Python 3.14 and newer. #​4523
  • Add PyString::from_encoded_object. #​5017
  • experimental-inspect: add basic input type annotations. #​5089
  • Add FFI function definitions for PyFrameObject from CPython 3.13. #​5154
  • experimental-inspect: tag modules created using #[pymodule] or #[pymodule_init] functions as incomplete. #​5207
  • experimental-inspect: add basic return type support. #​5208
  • Add PyCode::compile and PyCodeMethods::run to create and execute code objects. #​5217
  • Add PyOnceLock type for thread-safe single-initialization. #​5223
  • Add PyClassGuard(Mut) pyclass holders. In the future they will replace PyRef(Mut). #​5233
  • experimental-inspect: allow annotations in #[pyo3(signature)] signature attribute. #​5241
  • Implement MutexExt for parking_lot's/lock_api ReentrantMutex. #​5258
  • experimental-inspect: support class associated constants. #​5272
  • Add Bound::cast family of functions superseding the PyAnyMethods::downcast family. #​5289
  • Add FFI definitions Py_Version and Py_IsFinalizing. #​5317
  • experimental-inspect: add output type annotation for #[pyclass]. #​5320
  • experimental-inspect: support #[pyclass(eq, eq_int, ord, hash, str)]. #​5338
  • experimental-inspect: add basic support for #[derive(FromPyObject)] (no struct fields support yet). #​5339
  • Add Python::try_attach. #​5342
Changed
  • Use Py_TPFLAGS_DISALLOW_INSTANTIATION instead of a __new__ which always fails for a #[pyclass] without a #[new] on Python 3.10 and up. #​4568
  • PyModule::from_code now defaults file_name to <string> if empty. #​4777
  • Deprecate PyString::from_object in favour of PyString::from_encoded_object. #​5017
  • When building with abi3 for a Python version newer than pyo3 supports, automatically fall back to an abi3 build for the latest supported version. #​5144
  • Change is_instance_of trait bound from PyTypeInfo to PyTypeCheck. #​5146
  • Many PyO3 proc macros now report multiple errors instead of only the first one. #​5159
  • Change MutexExt return type to be an associated type. #​5201
  • Use PyCallArgs for Py::call and friends so they're equivalent to their Bound counterpart. #​5206
  • Rename Python::with_gil to Python::attach. #​5209
  • Rename Python::allow_threads to Python::detach #​5221
  • Deprecate GILOnceCell type in favour of PyOnceLock. #​5223
  • Rename pyo3::prepare_freethreaded_python to Python::initialize. #​5247
  • Convert PyMemoryError into/from io::ErrorKind::OutOfMemory. #​5256
  • Deprecate GILProtected. #​5285
  • Move #[pyclass] docstring formatting from import time to compile time. #​5286
  • Python::attach will now panic if the Python interpreter is in the process of shutting down. #​5317
  • Add fast-path to PyTypeInfo::type_object for #[pyclass] types. #​5324
  • Deprecate PyObject type alias for Py<PyAny>. #​5325
  • Rename Python::with_gil_unchecked to Python::attach_unchecked. #​5340
  • Rename Python::assume_gil_acquired to Python::assume_attached. #​5354
Removed
  • Remove FFI definition of internals of PyFrameObject. #​5154
  • Remove Eq and PartialEq implementations on PyGetSetDef FFI definition. #​5196
  • Remove private FFI definitions _Py_IsCoreInitialized and _Py_InitializeMain. #​5317
Fixed
  • Use critical section in PyByteArray::to_vec on freethreaded build to replicate GIL-enabled "soundness". #​4742
  • Fix precision loss when converting bigdecimal into Python. #​5198
  • Don't treat win7 target as a cross-compilation. #​5210
  • WASM targets no longer require exception handling support for Python < 3.14. #​5239
  • Fix segfault when dropping PyBuffer<T> after the Python interpreter has been finalized. #​5242
  • experimental-inspect: better automated imports generation. #​5251
  • experimental-inspect: fix introspection of __richcmp__, __concat__, __repeat__, __inplace_concat__ and __inplace_repeat__. #​5273
  • fixed a leaked borrow, when converting a mutable sub class into a frozen base class using PyRef::into_super #​5281
  • Fix FFI definition Py_Exit (never returns, was () return value, now !). #​5317
  • experimental-inspect: fix handling of module members gated behind #[cfg(...)] attributes. #​5318

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC).

🚦 Automerge: Enabled.

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.


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

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot enabled auto-merge (squash) August 31, 2025 12:29
@renovate
Copy link
Contributor Author

renovate bot commented Aug 31, 2025

⚠️ Artifact update problem

Renovate 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:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: Cargo.lock
Command failed: cargo update --config net.git-fetch-with-cli=true --manifest-path bindings/python/Cargo.toml --package [email protected] --precise 0.27.2
error: failed to parse manifest at `/tmp/renovate/repos/github/codegen-sh/pink/bindings/python/Cargo.toml`

Caused by:
  error inheriting `edition` from workspace root manifest's `workspace.package.edition`

Caused by:
  failed to parse manifest at `/tmp/renovate/repos/github/codegen-sh/pink/Cargo.toml`

Caused by:
  the cargo feature `codegen-backend` requires a nightly version of Cargo, but this is the `stable` channel
  See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
  See https://doc.rust-lang.org/cargo/reference/unstable.html#codegen-backend for more information about using this feature.

@renovate renovate bot force-pushed the renovate/pyo3-0.x branch 3 times, most recently from 413494f to 0a9638c Compare October 19, 2025 13:35
@renovate renovate bot changed the title fix(deps): update rust crate pyo3 to 0.26.0 fix(deps): update rust crate pyo3 to 0.27.0 Oct 19, 2025
@renovate renovate bot force-pushed the renovate/pyo3-0.x branch 2 times, most recently from 6adacad to 3918cc1 Compare November 9, 2025 14:10
@renovate renovate bot force-pushed the renovate/pyo3-0.x branch from 3918cc1 to 26f1b2e Compare November 20, 2025 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant