PyO3 v0.13.1 Release Notes

Release Date: 2021-01-10 // over 3 years ago
  • โž• Added

    • โž• Add support for #[pyclass(dict)] and #[pyclass(weakref)] with the abi3 feature on Python 3.9 and up. #1342
    • Add FFI definitions PyOS_BeforeFork, PyOS_AfterFork_Parent, PyOS_AfterFork_Child for Python 3.7 and up. #1348
    • โž• Add an auto-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. #1347
    • Add support for cross-compiling to Windows without needing PYO3_CROSS_INCLUDE_DIR. #1350

    ๐Ÿ—„ Deprecated

    • Deprecate FFI definitions PyEval_CallObjectWithKeywords, PyEval_CallObject, PyEval_CallFunction, PyEval_CallMethod when building for Python 3.9. #1338
    • Deprecate FFI definitions PyGetSetDef_DICT and PyGetSetDef_INIT which have never been in the Python API. #1341
    • Deprecate FFI definitions PyGen_NeedsFinalizing, PyImport_Cleanup (removed in 3.9), and PyOS_InitInterrupts (3.10). #1348
    • ๐Ÿ—„ Deprecate FFI definition PyOS_AfterFork for Python 3.7 and up. #1348
    • Deprecate FFI definitions PyCoro_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). #1348
    • Deprecate FFI definitions for PyUnicode_FromUnicode, PyUnicode_AsUnicode and PyUnicode_AsUnicodeAndSize, which will be removed from 3.12 and up due to PEP 613. #1370

    โœ‚ Removed

    • โœ‚ Remove FFI definition PyFrame_ClearFreeList when building for Python 3.9. #1341
    • Remove FFI definition _PyDict_Contains when building for Python 3.10. #1341
    • Remove FFI definitions PyGen_NeedsFinalizing and PyImport_Cleanup (for 3.9 and up), and PyOS_InitInterrupts (3.10). #1348

    ๐Ÿ›  Fixed

    • Stop including Py_TRACE_REFS config setting automatically if Py_DEBUG is set on Python 3.8 and up. #1334
    • โœ‚ Remove #[deny(warnings)] attribute (and instead refuse warnings only in CI). #1340
    • Fix deprecation warning for missing __module__ with #[pyclass]. #1343
    • Correct return type of PyFrozenSet::empty to &PyFrozenSet (was incorrectly &PySet). #1351
    • ๐Ÿ›  Fix missing Py_INCREF on heap type objects on Python versions before 3.8. #1365