Skip to content

Hard to reason about which functions are or are not part of the stable ABI #50

Open
@koubaa

Description

@koubaa

Functions are added to the stable ABI over time, and just given the C definition of a module, auditing to see what function calls are stable and what aren't is not trivial.

I think the core issue is that there is only one header that all functions are supposed to be defined in, which is Python.h

I think the stable ABI could be defined in another header, PythonABI.h,

where Python.h includes PythonABI.h for compatibility reasons.

Taking this further, we can have a PythonABI1.h, PythonABI2.h, PythonABI3.h, etc, and Python.h includes the latest one, while modules that want to target a specific ABI with long-term guarantees can directly pick one of these.

Now, to make sure you only use the stable ABI, or which stable ABI, you need only look at the include block at the top of the module.

I'm not sure how feasible this is, but I think it is worth doing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions