NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #447 most downloaded on crates.io
Proc macros for PyO3 package
Last release 1 months ago
05 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
68 releases · first in 2020
One column per quarter.
Add PyString::data to access the raw bytes stored in a Python string. #1794
PyString::data to access the raw bytes stored in a Python string. #1794AttributeError to avoid panic when calling del on a #[setter] defined class property. #1779PyGILState_Check and Py_tracefunc to the unlimited API. #1787_type field to PyStatus struct definition. #1791num-complex optional dependency to support interop with rust-numpy and ndarray when building with the MSRV of 1.41 #1799Python::run_code. #1806PyModule::from_code. #1810pyo3:: in pyo3::types::datetime which broke builds using -Z avoid-dev-deps #1811Add indexmap feature to add ToPyObject, IntoPy and FromPyObject implementations for indexmap::IndexMap. #1728
indexmap feature to add ToPyObject, IntoPy and FromPyObject implementations for indexmap::IndexMap. #1728pyo3_build_config::add_extension_module_link_args to use in build scripts to set linker arguments (for macOS). #1755Python::with_gil_unchecked unsafe variation of Python::with_gil to allow obtaining a Python in scenarios where Python::with_gil would fail. #1769PyErr::new no longer acquires the Python GIL internally. #1724cargo:rustc-cdylib-link-arg in its build script, as Cargo unintentionally allowed crates to pass linker args to downstream crates in this way. Projects supporting macOS may need to restore .cargo/config.toml files. #1755#[doc(hidden)] on structs and functions annotated with PyO3 macros. #1722#[pyfunction]s. #1726Py_Buffer on PyPy. #1737dictoffset on 32-bit Windows. #1475Py_DecodeLocale. The 2nd argument is now *mut Py_ssize_t instead of Py_ssize_t. #1766Implement IntoPy for &PathBuf and &OsString. #1712
Deprecate FFI definition PyCFunction_Call for Python 3.9 and up. #1425
num-bigint optional dependency to 0.4. #1481num-complex optional dependency to 0.4. #1482hashbrown optional dependency supported versions to include 0.11. #1496[T; N] to all N using const generics (on Rust 1.51 and up). #1128OsStr/ OsString and Python strings. #1379Path/ PathBuf and Python strings (and pathlib.Path objects). #1379 #1654#[pyo3(...)] attributes to control various PyO3 macro functionality:
PyCFunction_CheckExact for Python 3.9 and later. #1425Py_IS_TYPE. #1429_Py_InitializeMain. #1473cpython/import.h.#1475#[pyclass] macro. #1504PyDateTime_TimeZone_UTC. #1572#[pyclass(extends=Exception)]. #1591PyErr::cause and PyErr::set_cause. #1679cpython/pystate.h. #1687wrap_pyfunction! macro to pyo3::prelude. #1695#[pymethods] block per #[pyclass] by default, to remove the dependency on inventory. Add a multiple-pymethods feature to opt-in the original behavior and dependency on inventory. #1457PyTimeAccess::get_fold to return a bool instead of a u8. #1397PyCFunction_Call for Python 3.9 and up. #1425PyModule_GetFilename. #1425auto-initialize feature is no longer enabled by default. #1443PyCFunction::new and PyCFunction::new_with_keywords to take &'static str arguments rather than implicitly copying (and leaking) them. #1450PyModule::call, PyModule::call0, PyModule::call1 and PyModule::get. #1492PyBufferErrors raised from PyBuffer::copy_to_slice and PyBuffer::copy_from_slice. #1534-undefined and dynamic_lookup linker arguments on macOS with the extension-module feature. #1539#[pyproto] methods which are easier to implement as #[pymethods]: #1560
PyBasicProtocol::__bytes__ and PyBasicProtocol::__format__PyContextProtocol::__enter__ and PyContextProtocol::__exit__PyDescrProtocol::__delete__ and PyDescrProtocol::__set_name__PyMappingProtocol::__reversed__PyNumberProtocol::__complex__ and PyNumberProtocol::__round__PyAsyncProtocol::__aenter__ and PyAsyncProtocol::__aexit__#[pyo3(...)] options:
PyEval_InitThreads in #[pymodule] init code. #1630METH_FASTCALL argument passing convention, when possible, to improve #[pyfunction] and method performance.
#1619, #1660BaseException etc. #1426Python::is_instance, Python::is_subclass, Python::release, Python::xdecref, and Py::from_owned_ptr_or_panic. #1426PyTypeInfo:
PYO3_CROSS_INCLUDE_DIR environment variable and the associated C header parsing functionality. #1521raw_pycfunction! macro. #1619PyClassAlloc trait. #1657PyList::get_parked_item. #1664PyCFunction_ClearFreeList for Python 3.9 and later. #1425PYO3_CROSS_LIB_DIR environment variable no long required when compiling for x86-64 Python from macOS arm64 and reverse. #1428_PyEval_RequestCodeExtraIndex, which took an argument of the wrong type. #1429PyIndex_Check missing with the abi3 feature. #1436TypeError raised when keyword-only argument passed along with a positional argument in *args. #1440&PyTuple of *args in #[pyfunction]. #1440#[pymethods] inside macro expansions. #1505__doc__ in __all__ generated for #[pymodule]. #1509PYO3_CROSS family of environment variables are set. #1514EnvironmentError, IOError, and WindowsError on PyPy. #1533cargo check and cargo clippy in a Python virtualenv. #1557ffi::PyDateTimeAPI without the GIL. #1563FromPyObject implementations for u128 and i128. #1638#[pyclass(extends=PyDict)] leaking the dict contents on drop. #1657PyList::get_item with negative indices. #1668PyEval_SetProfile/PyEval_SetTrace to take Option<Py_tracefunc> parameters. #1692ToPyObject impl for HashSet to accept non-default hashers. #1702Lower minimum supported Rust version to 1.41. #1421
with_embedded_python_interpreter to initialize a Python interpreter, execute a closure, and finalize the interpreter. #1355serde feature which provides implementations of Serialize and Deserialize for Py<T>. #1366_PyCFunctionFastWithKeywords on Python 3.7 and up. #1384PyDateTime::new_with_fold method. #1398size_hint impls for {PyDict,PyList,PySet,PyTuple}Iterators. #1699prepare_freethreaded_python will no longer register an atexit handler to call Py_Finalize. This resolves a number of issues with incompatible C extensions causing crashes at finalization. #1355PyLayout::py_init, PyClassDict::clear_dict, and opt_to_pyobj safe, as they do not perform any unsafe operations. #1404r#raw_idents as argument names in pyfunctions. #1383PyFunction_GetCode (was incorrectly PyFunction_Code). #1387PyMarshal_WriteObjectToString and PyMarshal_ReadObjectFromString as available in limited API. #1387PyListObject and those from funcobject.h as requiring non-limited API. #1387Result usage in pyobject_native_type_base. #1402Deprecate FFI definitions PyEval_CallObjectWithKeywords, PyEval_CallObject, PyEval_CallFunction, PyEval_CallMethod when building for Python 3.9. #1338
#[pyclass(dict)] and #[pyclass(weakref)] with the abi3 feature on Python 3.9 and up. #1342PyOS_BeforeFork, PyOS_AfterFork_Parent, PyOS_AfterFork_Child for Python 3.7 and up. #1348auto-initialize feature to control whether PyO3 should automatically initialize an embedded Python interpreter. For compatibility this feature is enabled by default in PyO3 0.13.1, but is planned to become opt-in from PyO3 0.14.0. #1347PYO3_CROSS_INCLUDE_DIR. #1350PyEval_CallObjectWithKeywords, PyEval_CallObject, PyEval_CallFunction, PyEval_CallMethod when building for Python 3.9. #1338PyGetSetDef_DICT and PyGetSetDef_INIT which have never been in the Python API. #1341PyGen_NeedsFinalizing, PyImport_Cleanup (removed in 3.9), and PyOS_InitInterrupts (3.10). #1348PyOS_AfterFork for Python 3.7 and up. #1348PyCoro_Check, PyAsyncGen_Check, and PyCoroWrapper_Check, which have never been in the Python API (for the first two, it is possible to use PyCoro_CheckExact and PyAsyncGen_CheckExact instead; these are the actual functions provided by the Python API). #1348PyUnicode_FromUnicode, PyUnicode_AsUnicode and PyUnicode_AsUnicodeAndSize, which will be removed from 3.12 and up due to PEP 623. #1370PyFrame_ClearFreeList when building for Python 3.9. #1341_PyDict_Contains when building for Python 3.10. #1341PyGen_NeedsFinalizing and PyImport_Cleanup (for 3.9 and up), and PyOS_InitInterrupts (3.10). #1348Py_TRACE_REFS config setting automatically if Py_DEBUG is set on Python 3.8 and up. #1334#[deny(warnings)] attribute (and instead refuse warnings only in CI). #1340__module__ with #[pyclass]. #1343PyFrozenSet::empty to &PyFrozenSet (was incorrectly &PySet). #1351Py_INCREF on heap type objects on Python versions before 3.8. #1365Deprecate Python::is_instance, Python::is_subclass, Python::release, and Python::xdecref. #1292
pyo3cls and pyo3-derive-backend to pyo3-macros and pyo3-macros-backend respectively. #1317#[pyclass] types. See the migration guide for full details. #1152
abi3-py36, abi3-py37, abi3-py38 etc. to set the minimum Python version when using the limited API. #1263TypeError messages generated by pymethod wrappers. #1212PyEval_SetProfile and PyEval_SetTrace. #1255PyContext_New, etc). #1259PyAny::is_instance method. #1276char and PyString. #1282PyBuffer_SizeFromFormat, PyObject_LengthHint, PyObject_CallNoArgs, PyObject_CallOneArg, PyObject_CallMethodNoArgs, PyObject_CallMethodOneArg, PyObject_VectorcallDict, and PyObject_VectorcallMethod. #1287u128/i128 and PyLong for PyPy. #1310Python::version and Python::version_info to get the running interpreter version. #1322PyType::name from Cow<str> to PyResult<&str>. #1152#[pyclass(subclass)] is now required for subclassing from Rust (was previously just required for subclassing from Python). #1152PyIterator to be consistent with other native types: it is now used as &PyIterator instead of PyIterator<'a>. #1176PyDowncastError messages to be closer to Python's builtin error messages. #1212Debug and Display impls for PyException to be consistent with PyAny. #1275Debug impl of PyErr to output more helpful information (acquiring the GIL if necessary). #1275PyTypeInfo::is_instance and PyTypeInfo::is_exact_instance to PyTypeInfo::is_type_of and PyTypeInfo::is_exact_type_of. #1278PyAny::call0, Py::call0 and PyAny::call_method0 and Py::call_method0 on Python 3.9 and up. #1287#[pyclass(name = "MyClass")]. #1303Python::is_instance, Python::is_subclass, Python::release, and Python::xdecref. #1292PyUnicode_AsUnicodeCopy, PyUnicode_GetMax, _Py_CheckRecursionLimit, PyObject_AsCharBuffer, PyObject_AsReadBuffer, PyObject_CheckReadBuffer and PyObject_AsWriteBuffer, which will be removed in Python 3.10. #1217python3 feature. #1235PyCodeObject struct (co_posonlyargcount) - caused invalid access to other fields in Python >3.7. #1260x86_64-unknown-linux-musl target from x86_64-unknown-linux-gnu host. #1267#[text_signature] interacting badly with rust r#raw_identifiers. #1286PyObject_Vectorcall and PyVectorcall_Call. #1287#[new] methods. #1319Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →