NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #444 most downloaded on crates.io
Bindings to Python interpreter
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
15 versions withdrawn
withdrawn after publishing
9 years old
115 releases · first in 2017
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 #1811One column per quarter.
Add 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. #1319Fix reference count bug in implementation of From > for PyObject, a regression introduced in PyO3 0.12. #1297
From<Py<T>> for PyObject, a regression introduced in PyO3 0.12. #1297Fix support for Rust versions 1.39 to 1.44, broken by an incorrect internal update to paste 1.0 which was done in PyO3 0.12.2. #1234
Add support for keyword-only arguments without default values in #[pyfunction]. #1209
Fix building for a 32-bit Python on 64-bit Windows with a 64-bit Rust toolchain. #1179
Rename exception types from e.g. RuntimeError to PyRuntimeError. The old names continue to exist but are deprecated.
Py_FinalizeEx, PyOS_getsig, and PyOS_setsig. #1021PyString::to_str for accessing PyString as &str. #1023Python::with_gil for executing a closure with the Python GIL. #1037PyAny::downcast. #1050Debug for PyIterator. #1051PyBytes::new_with and PyByteArray::new_with for initialising bytes and bytearray objects using a closure. #1074#[derive(FromPyObject)] macro for enums and structs. #1065Py::as_ref and Py::into_ref for converting Py<T> to &T. #1098Result types other than PyResult from #[pyfunction], #[pymethod] and #[pyproto] functions. #1106.ToPyObject, IntoPy, and FromPyObject for hashbrown's HashMap and HashSet types (requires the hashbrown feature). #1114#[pyfunction(pass_module)] and #[pyfn(pass_module)] to pass the module object as the first function argument. #1143PyModule::add_function and PyModule::add_submodule as typed alternatives to PyModule::add_wrapped. #1143PyCFunction and PyFunction types. #1163RuntimeError to PyRuntimeError. The old names continue to exist but are deprecated.&T or Py<T>, just like other Python-native types.PyException::py_err to PyException::new_err.PyUnicodeDecodeErr::new_err to PyUnicodeDecodeErr::new.PyStopIteration::stop_iteration.T: Send for the return value T of Python::allow_threads. #1036PYTHON_SYS_EXECUTABLE to PYO3_PYTHON. The old name will continue to work (undocumented) but will be removed in a future release. #1039unsafe from signature of PyType::as_type_ptr. #1047PyIterator::from_object to PyResult<PyIterator> (was Result<PyIterator, PyDowncastError>). #1051IntoPy is no longer implied by FromPy. #1063PyObject to be a type alias for Py<PyAny>. #1063PyErr to be compatible with the std::error::Error trait: #1067 #1115
Display, Error, Send and Sync for PyErr and PyErrArguments.PyErr::instance for accessing PyErr as &PyBaseException.PyErr's fields are now an implementation detail. The equivalent values can be accessed with PyErr::ptype, PyErr::pvalue and PyErr::ptraceback.PyErr::print and PyErr::print_and_set_sys_last_vars to &self (was self).PyErrValue, PyErr::from_value, PyErr::into_normalized, and PyErr::normalize.PyException::into.Into<PyResult<T>> for PyErr and PyException.#[pyproto] to return NotImplemented if Python should try a reversed operation. #1072PyModule::add to impl IntoPy<PyObject> (was impl ToPyObject). #1124PyErr APIs; see the "changed" section above. #1024 #1067 #1115PyString::to_string (use new PyString::to_str). #1023PyString::as_bytes. #1023Python::register_any. #1023GILGuard::acquire from the public API. Use Python::acquire_gil or Python::with_gil. #1036FromPy trait. #1063AsPyRef trait. #1098Py_SetProgramName and Py_SetPythonHome to take *const arguments (was *mut). #1021FromPyObject for num_bigint::BigInt for Python objects with an __index__ method. #1027_PyLong_AsByteArray to take *mut c_uchar argument (was *const c_uchar). #1029#[pyclass(dict, unsendable)]. #1058 #1059&Self as an argument type for functions in a #[pymethods] block. #1071#[pyproto] implementations. #1093extension-module feature. #1095+ operator not trying __radd__ when both __add__ and __radd__ are defined in PyNumberProtocol (and similar for all other reversible operators). #1107Update parking_lot dependency to 0.11. #1010
Support stable versions of Rust (>=1.39). #969
PyObject_AsFileDescriptor. #938PyByteArray::data, PyByteArray::as_bytes, and PyByteArray::as_bytes_mut. #967GILOnceCell to use in situations where lazy_static or once_cell can deadlock. #975Py::borrow, Py::borrow_mut, Py::try_borrow, and Py::try_borrow_mut for accessing #[pyclass] values. #976IterNextOutput and IterANextOutput for returning from __next__ / __anext__. #997#[pyo3(get)] attribute. (Remove the hidden API GetPropertyValue.) #934Py_Finalize at exit to flush buffers, etc. #943Send bound for #[pyclass]. #966Python argument to most methods on PyObject and Py<T> to ensure GIL safety. #970PyTypeObject::type_object - now takes Python argument and returns &PyType. #970PyTuple::slice and PyTuple::split_from from Py<PyTuple> to &PyTuple. #970PyTuple::as_slice to &[&PyAny]. #971PyTypeInfo::type_object to type_object_raw, and add Python argument. #975num-complex optional dependency from 0.2 to 0.3. #977num-bigint optional dependency from 0.2 to 0.3. #978#[pyproto] is re-implemented without specialization. #961PyClassAlloc::alloc is renamed to PyClassAlloc::new. #990#[pyproto] methods can now have return value T or PyResult<T> (previously only PyResult<T> was supported). #996#[pyproto] methods can now skip annotating the return type if it is (). #998ManagedPyRef (unused, and needs specialization) #930None to Option<T> argument #[pyfunction] with a default value. #936PyClass.__new__'s not respecting subclasses when inherited by a Python class. #990Option<T> from #[pyproto] methods. #996PyRef<Self> and PyRefMut<Self> to #[getter] and #[setter] methods. #999Fix deadlock in Python::acquire_gil after dropping a PyObject or Py . #924
Python::acquire_gil after dropping a PyObject or Py<T>. #924Add FFI definition _PyDict_NewPresized. #849
_PyDict_NewPresized. #849IntoPy<PyObject> for HashSet and BTreeSet. #864PyAny::dir method. #886macros feature (enabled by default). #897#[classattr] on functions in #[pymethods]. #905Clone for PyObject and Py<T>. #908Deref<Target = PyAny> for all builtin types. (PyList, PyTuple, PyDict etc.) #911Deref<Target = PyAny> for PyCell<T>. #911#[classattr] support for associated constants in #[pymethods]. #914PanicException. #797PyObject and Py<T> reference counts to decrement immediately upon drop when the GIL is held. #851PyIterProtocol methods to use either PyRef or PyRefMut as the receiver type. #856FromPyObject for Py<T> to apply to a wider range of T, including all T: PyClass. #880ObjectProtocol trait to the PyAny struct. #911#![feature(specialization)] in crates depending on PyO3. #917PyMethodsProtocol trait. #889num-traits dependency. #895ObjectProtocol trait. #911PyAny::None. Users should use Python::None instead. #911*ProtocolImpl traits. #917__radd__ and other __r*__ methods as implementations for Python mathematical operators. #839&'static references to Python objects as arguments to #[pyfunction] and #[pymethods]. #869AsPyRef::as_ref. #876#[pyo3(get)] attribute on Py<T> fields. #880PyList::get_item returning borrowed objects when it was not safe to do so. #890Python::acquire_gil calls creating dangling references. #893Python::allow_threads. #912FromPyObject implementations for HashSet and BTreeSet. #842
Error messages for #[pyclass]. #826
PyCell, which has RefCell-like features. #770
PyCell, which has RefCell-like features. #770PyClass, PyLayout, PyClassInitializer. #683IntoIterator for PySet and PyFrozenSet. #716FromPyObject is now automatically implemented for T: Clone pyclasses. #730#[pyo3(get)] and #[pyo3(set)] will now use the Rust doc-comment from the field for the Python property. #755#[setter] functions may now take an argument of Pyo3::Python. #760PyTypeInfo::BaseLayout and PyClass::BaseNativeType. #770PyDowncastImpl. #770FromPyObject and IntoPy<PyObject> traits for arrays (up to 32). #778migration.md and types.md in the guide. #795, #802ffi::{_PyBytes_Resize, _PyDict_Next, _PyDict_Contains, _PyDict_GetDictPtr}. #820#[new] does not take PyRawObject and can return Self. #683FromPyObject for &T and &mut T are no longer specializable. Implement PyTryFrom for your type to control the behavior of FromPyObject::extract for your types. #713IntoPy<U> for T where U: FromPy<T> is no longer specializable. Control the behavior of this via the implementation of FromPy. #713parking_lot::Mutex instead of spin::Mutex. #7341.42.0-nightly 2020-01-21. #761PyRef and PyRefMut are renewed for PyCell. #770PyAny is now on the top level module and prelude. #816PyRawObject. #683PyNoArgsFunction. #741initialize_type. To set the module name for a #[pyclass], use the module argument to the macro. #751AsPyRef::as_mut/with/with_mut/into_py/into_mut_py. #770PyTryFrom::try_from_mut/try_from_mut_exact/try_from_mut_unchecked. #770Python::mut_from_owned_ptr/mut_from_borrowed_ptr. #770ObjectProtocol::get_base/get_mut_base. #770#[pyo3(set)]. #745PyObject with #[pyo3(get)]. #760#[pymethods] used in conjunction with #[cfg]. #769"*" in a #[pyfunction()] argument list incorrectly accepting any number of positional arguments (use args = "*" when this behavior is desired). #792PyModule::dict. #809DESCRIPTION is not null-terminated. #822Nothing published for this version
Implemented FromPyObject for HashMap and BTreeMap
FromPyObject for HashMap and BTreeMap#[name = "foo"] attribute for #[pyfunction] and in #[pymethods]. #692Support for #[text_signature] attribute. #675
#[text_signature] attribute. #675Now all &Py~ types have !Send bound. #655
FFI compatibility for PEP 590 Vectorcall. #641
PyString::as_bytes. #639
and PyString::to_string_lossy #642.__contains__ and __iter__ from PyMappingProtocol. #644Conversion between num-bigint and Python int. #608
module argument to pyclass macro. #499
module argument to pyclass macro. #499py_run! macro #512PyBytes can now be indexed just like Vec<u8>IntoPy<PyObject> for PyRef and PyRefMut.gc parameter for pyclass (e.g. #[pyclass(gc)]) without implementing the class::PyGCProtocol trait is now a compile-time error. Failing to implement this trait could lead to segfaults. #532PyByteArray::data has been replaced with PyDataArray::to_vec because returning a &[u8] is unsound. (See this comment for a great write-up for why that was unsound)mashup with paste.GILPool gained a Python marker to prevent it from being misused to release Python objects without the GIL held.IntoPyObject was replaced with IntoPy<PyObject>#[pyclass(subclass)] is hidden a unsound-subclass feature because it's causing segmentation faults.PyPy support by omerbenamram in #393
PyModule generate an index of its members (__all__ list).slf: PyRef<T> for pyclass(#419)pymethodsmarshal module. #460Python::run returns PyResult<()> instead of PyResult<&PyAny>.#[getter] and #[setter] can now omit wrapping the
result type in PyResult if they don't raise exceptions.type_object::PyTypeObject has been marked unsafe because breaking the contract type_object::PyTypeObject::init_type can lead to UB.PySequenceProtocol implementation in #423.#[getter] method.pymethods crashing on doc comments containing double quotes.PySet::new and PyFrozenSet::new now return PyResult<&Py[Frozen]Set>; exceptions are raised if
the items are not hashable.venv on Windows.PyTuple::new now returns &PyTuple instead of Py<PyTuple>.*args and **kwargs
tuple/dict now doesn't contain arguments that are otherwise assigned to parameters.Nothing published for this version
Currently, #341 causes cargo test to fail with weird linking errors when the extension-module feature is activated. For now you can work around this b
cargo test to fail with weird linking errors when the extension-module feature is activated. For now you can work around this by making the extension-module feature optional and running the tests with cargo test --no-default-features:[dependencies.pyo3]
version = "0.6.0"
[features]
extension-module = ["pyo3/extension-module"]
default = ["extension-module"]
wrap_pymodule! macro similar to the existing wrap_pyfunction! macro. Only available on python 3PyRef and PyRefMut types, which allow to differentiate between an instance of a rust struct on the rust heap and an instance that is embedded inside a python object. By kngwyu in #335FromPy<T> and IntoPy<T> which are equivalent to From<T> and Into<T> except that they require a gil token.ManagedPyRef, which should eventually replace ToBorrowedObject.PyObjectRef to PyAny in #388add_function to add_wrapped as it now also supports modules.#[pymodinit] to #[pymodule]py.init(|| value) becomes Py::new(value)py.init_ref(|| value) becomes PyRef::new(value)py.init_mut(|| value) becomes PyRefMut::new(value).PyRawObject::init is now infallible, e.g. it returns () instead of PyResult<()>.py_exception! to create_exception! and refactored the error macros.wrap_function! to wrap_pyfunction!#[prop(get, set)] to #[pyo3(get, set)]#[pyfunction] now supports the same arguments as #[pyfn()]crate::types::exceptions moved to crate::exceptionsIntoPyTuple with IntoPy<Py<PyTuple>>.IntoPyPointer and ToPyPointer moved into the crate root.class::CompareOp moved into class::basic::CompareOpPyList::{sort, reverse} by chr1sj0nes in #357 and #358typeob module to type_objectPyToken was removed due to unsoundness (See #94).PyObjectAllocNoArgs. Just use an empty tuplePyObjectWithGIL. PyNativeType is sufficient now that PyToken is removed.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix memory leak in ArrayList by kngwyu #316
Fix indeterministic segfaults when creating many objects by kngwyu in #281
Yanked
Yanked
PyDict::from_sequence, equivalent to dict([(key, val), ...])
#[pyclass] objects can now be returned from rust functionsPyComplex by kngwyu in #226PyDict::from_sequence, equivalent to dict([(key, val), ...])datetime standard library types: PyDate, PyTime, PyDateTime, PyTzInfo, PyDelta with associated ffi types, by pganssle #200.PyString, PyUnicode, and PyBytes now have an as_bytes method that returns &[u8].PyObjectProtocol::get_type_ptr by ijl in #242pyo3::types instead.py_err instead of new, as they return PyErr and not Self.as_mut and friends take and &mut self instead of &selfObjectProtocol::call now takes an Option<&PyDict> for the kwargs instead of an IntoPyDictPointer.IntoPyDictPointer was replace by IntoPyDict which doesn't convert PyDict itself anymore and returns a PyDict instead of *mut PyObject.PyTuple::new now takes an IntoIterator instead of a slicePyTypeObject into PyTypeObject without the create method and PyTypeCreate with requires PyObjectAlloc<Self> + PyTypeInfo + Sized.cargo edition --fix which prefixed path with crate:: for rust 2018async to pyasync as async will be a keyword in the 2018 edition.NonNull<*mut PyObject> for Py and PyObject by ijl #260PyString, PyUnicode, and PyBytes no longer have a data method
(replaced by as_bytes) and PyStringData has been removed.__class__ by kngwyu #263Nothing published for this version
Nothing published for this version
Nothing published for this version
PyTryFrom's error is always to PyDowncastError
PyDowncastErroruse_extern_macros was stabilizedRustfmt all the things :heavy_check_mark:
Replaced concat_idents with mashup
concat_idents with mashupFixed scoping bug in pyobject_native_type that would break rust-numpy
A few internal macros became part of the public api (#155, #186)
proc_macro has been stabilized on nightly (rust-lang/rust#52081). This means that we can remove the proc_macro feature, but now we need the use_extern_macros from the 2018 edition instead.py and live in the prelude. This means you can use #[pyclass], #[pymethods], #[pyproto], #[pyfunction] and #[pymodinit] directly, at least after a use pyo3::prelude::*. They were also moved into a module called proc_macro. You shouldn't use #[pyo3::proc_macro::pyclass] or other longer paths in attributes because proc_macro_path_invoc isn't going to be stabilized soon.base option in the pyclass macro to extends.#[pymodinit] uses the function name as module name, unless the name is overridden with #[pymodinit(name)]Fix nightly breakage with proc_macro_path
Fix compatibility with TryFrom trait #137
Embedded CPython 3.7b1 crashes on initialization #110
Allow to get mutable ref from PyObject #106
RefFromPyObject traitFromPyObject for Py<T>Rustup to 1.23.0-nightly 2017-11-07
c_char usage #93Rustup to 1.22.0-nightly 2017-09-30
Fix rustc const_fn nightly breakage
Added self.__dict__ support #68
self.__dict__ support #68pyo3::prelude module #70Iterator support for PyTuple, PyList, PyDict #75PyErr implementation. Drop py parameter from constructor.[Unreleased]: https://github.com/pyo3/pyo3/compare/v0.29.2...HEAD [0.29.1]: https://github.com/pyo3/pyo3/compare/v0.29.1...v0.29.2 [0.29.1]: https://g
Your coding agent can read these notes before it upgrades. Set up the MCP server →