Bump pyo3 from 0.22.6 to 0.26.0
Type: Pull Request
State: Merged
Association: Contributor
Comments: 1
(4 months ago)
(4 months ago)
(4 months ago)
by timkpaine
part: dependencies lang: rust
Bumps pyo3 from 0.22.6 to 0.26.0.
Release notes
Sourced from pyo3's releases.
PyO3 0.26.0
This version solidifies support for Python 3.14 and free-threaded Python 3.14t. A number of PyO3 APIs have been renamed to reflect the fact the GIL is no longer a universal feature of all Python implementations. For example:
Python::with_gilis now known asPython::attachPython::allow_threadsis now known asPython::detachpyo3::prepare_freethreaded_pythonis now known asPython::initialize()The minimum supported Rust version has been increased to Rust 1.74.
An optional dependency on the
bytescrate has been added to allow support for convertingbytes::Bytesto / from Python.The
PyObjecttype alias forPy<PyAny>has also been deprecated; thePyandBoundsmart pointers have been the primary interface for all Python-facing types since PyO3 0.21 and thePyObjecttype alias had been a frequent source of confusion.There are also many other incremental improvements, bug fixes and smaller features.
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:
@ahlinc@alex@anilbey@bschoenmaeckers@Cheukting@codeguru42@davidhewitt@decathorpe@dependabot[bot]@drewkett@FlickerSoul@Icxolu@jder@jessekrubin@jjmarchewitz@kemingy@msimacek@musicinmybrain@ngoldbaum@Nnamdi-sys@nucccc@olp-cs@robsdedude@rrricharrrd@sxlijin@timfel@tonybaloney@Tpt@wxianxin@xushiyan@yogevm15
... (truncated)
Changelog
Sourced from pyo3's changelog.
[0.26.0] - 2025-08-29
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
bytesdependency to add conversions forbytes::Bytes. #5252- Publish new crate
pyo3-introspectionto pair with theexperimental-inspectfeature. #5300- The
PYO3_BUILD_EXTENSION_MODULEnow causes the same effect as theextension-modulefeature. 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
- 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. #5017experimental-inspect: add basic input type annotations. #5089- Add FFI function definitions for
PyFrameObjectfrom CPython 3.13. #5154experimental-inspect: tag modules created using#[pymodule]or#[pymodule_init]functions as incomplete. #5207experimental-inspect: add basic return type support. #5208- Add
PyCode::compileandPyCodeMethods::runto create and execute code objects. #5217- Add
PyOnceLocktype for thread-safe single-initialization. #5223- Add
PyClassGuard(Mut)pyclass holders. In the future they will replacePyRef(Mut). #5233experimental-inspect: allow annotations in#[pyo3(signature)]signature attribute. #5241- Implement
MutexExtfor parking_lot's/lock_apiReentrantMutex. #5258experimental-inspect: support class associated constants. #5272- Add
Bound::castfamily of functions superseding thePyAnyMethods::downcastfamily. #5289- Add FFI definitions
Py_VersionandPy_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). #5339- Add
Python::try_attach. #5342Changed
- Use
Py_TPFLAGS_DISALLOW_INSTANTIATIONinstead of a__new__which always fails for a#[pyclass]without a#[new]on Python 3.10 and up. #4568PyModule::from_codenow defaultsfile_nameto<string>if empty. #4777- Deprecate
PyString::from_objectin favour ofPyString::from_encoded_object. #5017- When building with
abi3for a Python version newer than pyo3 supports, automatically fall back to an abi3 build for the latest supported version. #5144- Change
is_instance_oftrait bound fromPyTypeInfotoPyTypeCheck. #5146- Many PyO3 proc macros now report multiple errors instead of only the first one. #5159
- Change
MutexExtreturn type to be an associated type. #5201- Use
PyCallArgsforPy::calland friends so they're equivalent to theirBoundcounterpart. #5206- Rename
Python::with_giltoPython::attach. #5209- Rename
Python::allow_threadstoPython::detach#5221- Deprecate
GILOnceCelltype in favour ofPyOnceLock. #5223- Rename
pyo3::prepare_freethreaded_pythontoPython::initialize. #5247- Convert
PyMemoryErrorinto/fromio::ErrorKind::OutOfMemory. #5256- Deprecate
GILProtected. #5285
... (truncated)
Commits
4502c2eci: fix release job token permissions (#5374)a43cf79release: 0.26.0 (#5367)f4d533fClarity and grammar fixes in free-threading guide (#5369)ed030a7fixes #5202 -- treat thePYO3_BUILD_EXTENSION_MODULEenv var the same as te...1775bafUse links to latest CPython stable release in docs (#5366)acaa2beUpdate free-threading docs for 0.26 (#5355)9cc0bb6fix "no constructor defined" messages on PyPy (#5329)9aa53f4Generate introspection for #[pyclass(eq, eq_int, ord, hash, str)] (#5338)a0c7d2cfixupPy::cast_bound(#5361)50b0193fix warning leaking out of test intest_methods(#5362)- Additional commits viewable in compare view
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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Pull Request Statistics
1
2
+13
-21
Package Dependencies
Technical Details
| ID: | 6145989 |
| UUID: | 2788632029 |
| Node ID: | PR_kwDOJy3j7s6mNyXd |
| Host: | GitHub |
| Repository: | python-project-templates/python-template-rust |
| Merge State: | Unknown |