Bump pyo3 from 0.27.2 to 0.28.0
Type: Pull Request
State: Open
Association: Unknown
Comments: 4
(about 1 month ago)
(about 1 month ago)
dependencies rust
Bumps pyo3 from 0.27.2 to 0.28.0.
Release notes
Sourced from pyo3's releases.
PyO3 0.28.0
This release contains many improvements across PyO3's feature set:
- Proper support for
__init__methods for#[pyclass]types- Support for
#[deleter]s to complement the existing#[getter]and#[setter]attributes when implementing class "properties".- Support for subclassing many Python types with the
abi3feature (requires Python 3.12+).- A new
#[pyclass(new = "from_fields")]option to automatically define the constructor from the class fields.- Many corrections to FFI definitions (including removal of many private CPython methods)
- Many improvements to the
experimental-inspectfeature's functionality.The minimum supported Rust version has been increased to Rust 1.83.
This release also switches
#[pymodule]to use PEP 489 multi-phase initialization internally. This should have no immediate functional impact other than preparing PyO3 to support newer technologies such as Python subinterpreters.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:
@ABorgna@ahlinc@alex@altendky@bazaah@bschoenmaeckers@chirizxc@clin1234@davidhewitt@dependabot[bot]@freakboy3742@henryp3278@Icxolu@lazka@LilyFirefly@linkmauve@lmmx@lukaslueg@MatthieuDartiailh@MusicalNinjaDad@ngoldbaum@pkalivas@reaperhulk@RedKinda@SilasMarvin@SoroushMoosapour@stijndcl@tpoliaw@Tpt
Changelog
Sourced from pyo3's changelog.
[0.28.0] - 2026-02-01
Packaging
- Bump MSRV to Rust 1.83. #5531
- Bump minimum supported
quoteversion to 1.0.37. #5531- Bump supported GraalPy version to 25.0. #5542
- Drop
memoffsetdependency. #5545- Support for free-threaded Python is now opt-out rather than opt-in. #5564
- Bump
target-lexicondependency to 0.13.3. #5571- Drop
indocandunindentdependencies. #5608Added
- Add
__init__support in#[pymethods]. #4951- Expose
PySuperon PyPy, GraalPy and ABI3 #4951- Add
PyString::from_fmtandpy_format!macro. #5199- Add
#[pyclass(new = "from_fields")]option. #5421- Add
pyo3::buffer::PyUntypedBuffer, a type-erased form ofPyBuffer<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_refandPyBackedBytes::clone_refmethods. #5654- Add
PyCapsule::new_with_pointerandPyCapsule::new_with_pointer_and_destructorfor creating capsules with raw pointers. #5689- Add
#[deleter]attribute to implement property deleters in#[methods]. #5699- Add
IntoPyObjectandFromPyObjectimplementations foruuid::NonNilUuid. #5707- Add
PyBackedStr::as_strandPyBackedStr::as_py_strmethods. #5723- Add support for subclassing native types (
PyDict, exceptions, ...) when building for abi3 on Python 3.12+. #5733- Add support for subclassing
PyListwhen building for Python 3.12+. #5734- FFI definitions:
- Add FFI definitions
PyEval_GetFrameBuiltins,PyEval_GetFrameGlobalsandPyEval_GetFrameLocalson Python 3.13 and up. #5590- Add FFI definitions
PyObject_New,PyObject_NewVar,PyObject_GC_Resize,PyObject_GC_New, andPyObject_GC_NewVar. #5591- Added FFI definitions and an unsafe Rust API wrapping
Py_BEGIN_CRITICAL_SECTION_MUTEXandPy_BEGIN_CRITICAL_SECTION_MUTEX2. #5642- Add FFI definition
PyDict_GetItemStringRefon Python 3.13 and up. #5659- Add FFI definition
PyIter_NextItemon Python 3.14 and up, andcompat::PyIter_NextItemfor older versions. #5661- Add FFI definitions
PyThreadState_GetInterpreterandPyThreadState_GetIDon Python 3.9+,PyThreadState_EnterTracingandPyThreadState_LeaveTracingon Python 3.11+,PyThreadState_GetUncheckedon Python 3.13+, andcompat::PyThreadState_GetUnchecked. #5711- Add FFI definitions
PyImport_ImportModuleAttrandPyImport_ImportModuleAttrStringon Python 3.14+. #5737- Add FFI definitions for the
PyABIInfoandPyModExportAPIs available in Python 3.15. #5746experimental-inspect:Changed
- Call
sys.unraisablehookinstead ofPyErr_Printif panicking on null FFI pointer inBound,BorrowedandPyconstructors. #5496- Use PEP-489 multi-phase initialization for
#[pymodule]. #5525- Deprecate implicit by-value implementation of
FromPyObjectfor#[pyclass]. #5550- Deprecate
PyTypeInfo::NAMEandPyTypeInfo::MODULE. #5579
... (truncated)
Commits
f0c1523release: 0.28.0 (#5762)278b54dci: fix nightly warning ofPyClassObjectContentsprivacy (#5767)f622301addPyUntypedBuffer(#5458)aeeaf68Implementauto_newattribute for#[pyclass](#5421)5578141clean up error messages for Send / Sync requirements on#[pyclass](#5750)18aa0c2docs: fix some sections in the migration guide (#5763)8848c76ci: run benchmarks on free-threaded build (#5760)d7c050cFix missing return types in PyModExport API wrappers (#5764)45f9f62macros: rename PythonTypeHint into PyExpr (#5756)ae44f85netlify: try marking canonical URLs for all files (#5761)- 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)
Package Dependencies
Technical Details
| ID: | 13430097 |
| UUID: | 3886406921 |
| Node ID: | PR_kwDOCA8Bec7A8F7E |
| Host: | GitHub |
| Repository: | RustPython/RustPython |