Skip to content

chore(deps): Bump pyo3 from 0.25.1 to 0.29.0 in the cargo group across 1 directory - #49

Merged
mrecachinas merged 3 commits into
masterfrom
dependabot/cargo/cargo-2682d3e42d
Jun 13, 2026
Merged

chore(deps): Bump pyo3 from 0.25.1 to 0.29.0 in the cargo group across 1 directory#49
mrecachinas merged 3 commits into
masterfrom
dependabot/cargo/cargo-2682d3e42d

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 12, 2026

Copy link
Copy Markdown
Contributor

Bumps the cargo group with 1 update in the / directory: pyo3.

Updates pyo3 from 0.25.1 to 0.29.0

Release notes

Sourced from pyo3's releases.

PyO3 0.29.0

This release is a relatively large release with improvements across many areas of PyO3's API.

Build and packaging changes

This release brings full support for Python 3.15 beta. We encourage downstream projects to begin testing and distributing Python 3.15 beta wheels so that the ecosystem can prepare for the 3.15 final release later in the year.

Alongside Python 3.15 support comes support for its new "abi3t" stable ABI which supports both free-threaded and gil-enabled Python builds. For projects distributing stable ABI wheels, we recommend distributing (for each OS/architecture) an abi3 wheel built for your minimum supported Python version, a 3.14t version-specific wheel for free-threaded Python 3.14, and an abi3t wheel to support Python 3.15 (and future versions).

Support for Python 3.7 has been dropped. Support for Python 3.13t, the first experimental free-threaded release of CPython, has also been dropped. 3.14t (and soon 3.15t) is more stable, performant, and the starting point for CPython's own declaration of "support" for the free-threaded build.

The PyO3 build process (via the pyo3-build-config crate) has been adjusted to reduce the cost of rebuilds when the environment used to detect the Python interpreter changes; pyo3-build-config and pyo3-macros will no longer be rebuilt in such cases (although pyo3-ffi and crates downstream of it still will be rebuilt). As a consequence the pyo3_build_config APIs now require crates to have a direct dependency on pyo3 or pyo3-ffi. We hope to continue to reduce rebuild frequency and cost in a future PyO3 release.

Security updates

With the recent boom in AI-assisted security scanning, PyO3 has inevitably had several correctness issues exposed by AI-assisted scanning.

In particular, PyO3 0.29 fixes two security vulnerabilities we will be releasing to the RustSec Advisory Database imminently:

  • Missing Sync bound on PyCFunction::new_closure closures
  • Possible out of bounds read in BoundTupleIterator::nth_back and BoundListIterator::nth_back

Any code using the above APIs is advised to update as soon as possible.

This release also contains several other minor breaking changes to close soundness holes uncovered by AI-assisted scanning. Our assessment as maintainers was that, excluding the two vulnerability cases listed above, these correctness issues would likely have crashed immediately upon user testing rather than leading to attacker-exploitable pathways. We nevertheless wanted to see them closed without the usual deprecation cycle. These cases are noted in the migration guide.

Other major themes in this release

New in this release is a CLI in pyo3-introspection to generate type stubs along with the experimental-inspect feature. Downstream, maturin has also gained support to generate type stubs using the feature. The feature is reaching a point where substantial amount of type stubs can be generated automatically. We would like to encourage users to begin using this feature and helping us find what functionality is missing, with a hope we can declare its API stable given sufficient feedback.

A substantial amount of effort has been invested in pyo3-ffi as part of the process of extending it with 3.15's new APIs. There have been many missing APIs from older Python versions added. There have also been a number of fixes to incorrect definitions (these are breaking changes, but also necessary for correctness); we hope there will be far fewer such cases in the future due to more comprehensive checking added to PyO3's CI. Finally, many private CPython APIs (those with _Py underscore-named prefix) have been removed from pyo3-ffi's public API.

In closing

There are also many other incremental improvements, bug fixes and smaller features; full detail can be found in the CHANGELOG.

Please consult the migration guide for help upgrading.

Thank you to everyone who contributed code, documentation, design ideas, bug reports, and feedback. The following contributors' commits are included in this release:

@​Alc-Alc @​alex @​anuraaga @​BD103 @​bschoenmaeckers @​Cheukting @​chirizxc @​ChristopherRabotin @​clin1234 @​codeguru42 @​davidhewitt

... (truncated)

Changelog

Sourced from pyo3's changelog.

[0.29.0] - 2026-06-11

Packaging

  • Support the new PEP 803 abi3t ABI with new abi3t and abi3t-py315 features. #5807
  • pyo3-macros-backend no longer depends on pyo3-build-config. #5809
  • Drop support for Python 3.13t (3.14t and above continue to be supported; CPython declared free-threading supported starting with Python 3.14). #5865
  • Drop support for Python 3.7. #5912
  • Extend range of supported versions of hashbrown optional dependency to include version 0.17. #5973
  • Support Python 3.15.0b1. #6014
  • pyo3-ffi is now no_std. #6022

Added

  • Add PyErr::set_traceback to set the traceback of an exception object. #5349
  • Add PyUnicodeDecodeError::new_err_from_utf8 to create a PyErr from a str::Utf8Error. #5668
  • experimental-inspect: implement INPUT_TYPE and OUTPUT_TYPE on optional third-party crate conversions. #5770
  • experimental-inspect: include doc comments in generated stubs. #5782
  • Add pyo3_build_config::PythonAbi, pyo3_build_config::PythonAbiKind, pyo3_build_config::PythonAbiBuilder, pyo3_build_config::InterpreterConfig::target_abi, and pyo3_build_config::InterpreterConfigBuilder::target_abi. #5807
  • Add Borrowed::get as an equivalent to Bound::get and Py::get. #5849
  • Add PyFrame::new, PyTraceBack::new, and PyFrameMethods::line_number. #5857
  • Add PyUntypedBuffer::obj to retrieve the Python object owning the buffer. #5870
  • Add PyCapsule::new_with_value and PyCapsule::new_with_value_and_destructor. #5881
  • Add PyErr::set_context and PyErr::context. #5887
  • Add a small CLI to pyo3-introspection to generate stubs. #5904
  • Add Python::version_str. #5921
  • Add TryFrom<&Bound<T>> for PyRef<T>, PyRefMut<T>, PyClassGuard<T> and PyClassGuardMut<T>. #5922
  • Add From<&Bound<T>> for Bound<T> and Py<T> #5922
  • Add PyDictMethods::set_default and PyDictMethods::set_default_ref to allow atomically setting default values in a PyDict. #5955
  • add PyFrameMethods::outer|code|var|builtins|globals|locals. #5967
  • Add From conversions for PyErr from std::time::TryFromFloatSecsError, std::time::SystemTimeError, std::path::StripPrefixError, std::env::JoinPathsError, std::char::ParseCharError, and std::char::CharTryFromError. #6001
  • Add pyo3_build_config::InterpreterConfigBuilder. #6034
  • Add PyCapsule::import_pointer #6066
  • Add PyClassGuardMapMut. #6073
  • Expose PyListMethods::get_item_unchecked, PyTupleMethods::get_item_unchecked, and PyTupleMethods::get_borrowed_item_unchecked on abi3. #6075
  • Add PyClassGuardMapSuper. #6104
  • Add PyClassGuard and PyClassGuardMut to pyo3::prelude. #6112
  • Add Debug impls for PyClassGuard and PyClassGuardMut. #6112
  • Enable extending PyDateTime, PyDate, PyTime, PyDelta and PyTzInfo on abi3 with python 3.12+. #6115
  • Expose PyFunction available on abi3. #6117
  • FFI definitions:
    • Added FFI definitions PyUnstable_Object_IsUniquelyReferenced, PyUnstable_Object_IsUniquelyReferencedTemporary, PyUnstable_EnableTryIncref, and PyUnstable_TryIncref. #5828
    • Add FFI definitions ffi::PyErr_GetHandledException and ffi::PyErr_SetHandledException. #5887
    • Add FFI definition Py_HASH_SIPHASH13. #5891
    • Add FFI definition PyStructSequence_UnnamedField constant on Python 3.9 and up (or 3.11 with abi3 features). #5892
    • Add FFI definitions PyUnstable_InterpreterFrame_GetCode, PyUnstable_InterpreterFrame_GetLasti, PyUnstable_InterpreterFrame_GetLine, and PyUnstable_ExecutableKinds. #5932
    • Add FFI definitions PyMarshal_WriteLongToFile, PyMarshal_WriteObjectToFile, PyMarshal_ReadLongFromFile, PyMarshal_ReadShortFromFile, PyMarshal_ReadObjectFromFile, and PyMarshal_ReadLastObjectFromFile. #5934
    • Add FFI definitions PyObject_GetAIter, PyAIter_Check, PyMapping_HasKeyWithError, PyMapping_HasKeyStringWithError, PyMapping_GetOptionalItem, PyMapping_GetOptionalItemString, PySequence_ITEM, PySequence_Fast_GET_SIZE, PySequence_Fast_GET_ITEM, and PySequence_Fast_ITEMS. #5942
    • Add FFI definition compat::PyObject_HasAttrWithError. #5944
    • Add FFI definitions PyDict_SetDefault, PyDict_SetDefaultRef, PyDict_ContainsString, PyDict_Pop, PyDict_PopString, PyDict_ClearWatcher, PyDict_Watch, PyDict_Unwatch, and PyFrozenDict_New. #5947

... (truncated)

Commits
  • 0f90242 release: 0.29.0 (#6107)
  • cd128ed doc: mention abi3t, python3t.dll, and abi3t_compat folder in FAQ (#6124)
  • 7e2ef18 Avoid type checks in methods where CPython already guarantees the received ty...
  • f930199 docs: additional detail in migration guide for 0.29 (#6123)
  • 91ab0d1 Enable Windows abi3t tests (#6106)
  • fe0fdd5 add PyLong* API (3.14+) (#6016)
  • f41b1df Hang when reattaching after detach during shutdown (#6085)
  • 5ae66a8 Fix double import on RustPython (#6122)
  • ad4a510 PyFunction: enable some extra tests with abi3 (#6118)
  • c79ac0e ci: Add test for minimum supported debug build of Python (#5852)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps the cargo group with 1 update in the / directory: [pyo3](https://github.com/pyo3/pyo3).


Updates `pyo3` from 0.25.1 to 0.29.0
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md)
- [Commits](PyO3/pyo3@v0.25.1...v0.29.0)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-version: 0.29.0
  dependency-type: direct:production
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 12, 2026
@mrecachinas

Copy link
Copy Markdown
Owner

@copilot Fix failing CI checks.

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@copilot Fix failing CI checks.

Fixed in commit fix: replace deprecated py.allow_threads() with py.detach() for pyo3 0.29.

The CI failures were caused by pyo3 0.26 renaming Python::allow_threads to Python::detach (keeping the old name as a deprecated alias), then pyo3 0.29 removing all APIs deprecated in 0.26/0.27. I replaced all 6 occurrences of py.allow_threads(...) with py.detach(...) in src/python.rs.

Copilot AI requested a review from mrecachinas June 12, 2026 22:20
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown

📊 Benchmark Comparison Results

Status Benchmark Base PR Delta
check_bytes_arrays_first_within_dist[16384 elems,s=64,mid] 0.0336ms 0.0643ms 91.5% slower
check_bytes_arrays_first_within_dist[16384 elems,s=64,end] 0.0676ms 0.1283ms 89.8% slower
check_bytes_arrays_all_within_dist[16384 elems,s=64,mid] 0.0488ms 0.0852ms 74.4% slower
check_bytes_arrays_all_within_dist[16384 elems,s=64,at 0] 0.0485ms 0.0843ms 73.7% slower
check_bytes_arrays_all_within_dist[16384 elems,s=64,end] 0.0493ms 0.0840ms 70.5% slower
check_bytes_arrays_best_within_dist[16384 elems,s=64,at 0] 0.0596ms 0.0969ms 62.5% slower
check_bytes_arrays_best_within_dist[16384 elems,s=64,end] 0.0598ms 0.0958ms 60.2% slower
check_bytes_arrays_best_within_dist[16384 elems,s=64,mid] 0.0601ms 0.0958ms 59.6% slower
check_bytes_arrays_best_within_dist[ 512 elems,s=16,mid] 0.0037ms 0.0049ms 35.0% slower
check_bytes_arrays_best_within_dist[ 512 elems,s=16,end] 0.0035ms 0.0046ms 33.9% slower
check_bytes_arrays_first_within_dist[ 512 elems,s=16,end] 0.0031ms 0.0041ms 32.9% slower
check_bytes_arrays_best_within_dist[ 1024 elems,s=32,end] 0.0075ms 0.0099ms 31.7% slower
check_bytes_arrays_best_within_dist[ 1024 elems,s=32,mid] 0.0075ms 0.0099ms 31.7% slower
check_bytes_arrays_best_within_dist[ 1024 elems,s=32,at 0] 0.0075ms 0.0098ms 31.6% slower
⚠️ check_bytes_arrays_first_within_dist[ 1024 elems,s=32,mid] 0.0036ms 0.0046ms 29.4% slower
⚠️ check_bytes_arrays_first_within_dist[ 1024 elems,s=32,end] 0.0069ms 0.0089ms 28.6% slower
⚠️ check_bytes_arrays_all_within_dist[ 1024 elems,s=32,at 0] 0.0067ms 0.0083ms 24.7% slower
⚠️ check_bytes_arrays_all_within_dist[ 1024 elems,s=32,end] 0.0067ms 0.0084ms 24.7% slower
⚠️ check_bytes_arrays_all_within_dist[ 1024 elems,s=32,mid] 0.0067ms 0.0084ms 24.7% slower
➖ 26 benchmarks within noise (click to expand)
Benchmark Base PR Delta
check_bytes_arrays_all_within_dist[ 512 elems,s=16,at 0] 0.0032ms 0.0039ms 21.9% slower
check_bytes_arrays_all_within_dist[ 512 elems,s=16,end] 0.0032ms 0.0039ms 21.8% slower
check_bytes_arrays_all_within_dist[ 512 elems,s=16,mid] 0.0032ms 0.0039ms 23.4% slower
check_bytes_arrays_best_within_dist[ 512 elems,s=16,at 0] 0.0039ms 0.0053ms 35.8% slower
check_bytes_arrays_first_within_dist[ 512 elems,s=16,at 0] 0.0001ms 0.0002ms 45.1% slower
check_bytes_arrays_first_within_dist[ 512 elems,s=16,mid] 0.0016ms 0.0022ms 32.2% slower
check_bytes_arrays_first_within_dist[ 1024 elems,s=32,at 0] 0.0001ms 0.0002ms 49.8% slower
check_bytes_arrays_first_within_dist[16384 elems,s=64,at 0] 0.0001ms 0.0002ms 46.1% slower
check_bytes_within_dist[127 bytes,d=500] 0.0001ms 0.0002ms 56.5% slower
check_bytes_within_dist[16 bytes,d=0] 0.0001ms 0.0002ms 42.7% slower
check_bytes_within_dist[64 bytes,d=100] 0.0001ms 0.0002ms 39.1% slower
hex_within_dist 0.0001ms 0.0001ms 21.5% slower
hd_bytes[1000-diff] 0.0001ms 0.0002ms 50.5% slower
hd_bytes[1000-same] 0.0001ms 0.0002ms 50.3% slower
hd_bytes[1024-diff] 0.0002ms 0.0002ms 14.8% faster
hd_bytes[1024-same] 0.0001ms 0.0001ms 36.2% slower
hd_bytes[3-diff] 0.0001ms 0.0001ms 31.5% slower
hd_bytes[3-same] 0.0001ms 0.0001ms 30.4% slower
hd_bytes[64-diff] 0.0001ms 0.0001ms 39.5% slower
hd_string[1000-diff] 0.0001ms 0.0002ms 49.7% slower
hd_string[1000-same] 0.0001ms 0.0002ms 33.6% slower
hd_string[1024-diff] 0.0001ms 0.0002ms 38.4% slower
hd_string[1024-same] 0.0001ms 0.0001ms 29.9% slower
hd_string[3-diff] 0.0001ms 0.0002ms 31.5% slower
hd_string[3-same] 0.0001ms 0.0001ms 20.7% slower
hd_string[64-diff] 0.0001ms 0.0001ms 17.3% slower

Legend: ✅ Faster (>5%) · ⚠️ Slower (5-30%) · ❌ Regression (>30%) · 🆕 New · 🗑️ Removed


This PR has severe performance regressions (>20% slower). Please investigate before merging.

@mrecachinas

Copy link
Copy Markdown
Owner

@copilot CI is failing still

pyo3 0.29 changed the TypeError message when passing an int where str
is expected:
- Old: "object cannot be interpreted as str"
- New: "'int' object is not an instance of 'str'"

Update the two failing test assertions to match the new message format.

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@copilot CI is failing still

Fixed in commit fix: update TypeError message assertions for pyo3 0.29 str type errors.

pyo3 0.29 changed the TypeError message when passing an int where a str is expected — from "object cannot be interpreted as str" to "'int' object is not an instance of 'str'". Updated the two failing test assertions to match the new format.

@mrecachinas
mrecachinas merged commit dbb6827 into master Jun 13, 2026
23 checks passed
@mrecachinas
mrecachinas deleted the dependabot/cargo/cargo-2682d3e42d branch June 13, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants