PyO3 v0.13.2 Release Notes

Release Date: 2021-02-12 // about 3 years ago
  • Packaging

    • ๐Ÿ‘ Lower minimum supported Rust version to 1.41. #1421

    โž• Added

    • Add unsafe API with_embedded_python_interpreter to initalize a Python interpreter, execute a closure, and finalize the interpreter. #1355
    • โž• Add serde feature which provides implementations of Serialize and Deserialize for Py<T>. #1366
    • โž• Add FFI definition _PyCFunctionFastWithKeywords on Python 3.7 and up. #1384
    • Add PyDateTime::new_with_fold() method. #1398
    • โž• Add size_hint impls for {PyDict,PyList,PySet,PyTuple}Iterators. #1699

    ๐Ÿ”„ Changed

    • prepare_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. #1355
    • Mark PyLayout::py_init, PyClassDict::clear_dict, and opt_to_pyobj safe, as they do not perform any unsafe operations. #1404

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix support for using r#raw_idents as argument names in pyfunctions. #1383
    • Fix typo in FFI definition for PyFunction_GetCode (was incorrectly PyFunction_Code). #1387
    • Fix FFI definitions PyMarshal_WriteObjectToString and PyMarshal_ReadObjectFromString as available in limited API. #1387
    • ๐Ÿ›  Fix FFI definitions PyListObject and those from funcobject.h as requiring non-limited API. #1387
    • Fix unqualified Result usage in pyobject_native_type_base. #1402
    • ๐Ÿ›  Fix build on systems where the default Python encoding is not UTF-8. #1405
    • ๐Ÿ›  Fix build on mingw / MSYS2. #1423