Skip to content

PEP 803 – “abi3t”: Stable ABI for Free-Threaded Builds #98

@encukou

Description

@encukou

I've updated PEP 803 (“abi3t”: Stable ABI for Free-Threaded Builds) based on discussion that started in the previous issue.

Proposed API changes:

  • Users set Py_TARGET_ABI3T to build against abi3t, which is like abi3 but for free-threaded builds.

    Implementation-wise, setting Py_TARGET_ABI3T will set:

    • Py_LIMITED_API (to the same version, or minimum if the user defined both) and
    • _Py_OPAQUE_PYOBJECT, which hides some API.

    If both Py_LIMITED_API and Py_GIL_DISABLED are set, CPython headers set Py_TARGET_ABI3T automatically.

  • Py_mod_abi becomes mandatory if the new PyModExport_* hook is used

PyMutex/PyCriticalSection is left for a separate discussion. (Without locks, abi3t modules can work correctly but need Py_MOD_GIL_USED in practice.)

Should we recommend this to the SC?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions