[Python-Dev] Make the stable API-ABI usable

Nick Coghlan ncoghlan at gmail.com
Sat Nov 18 08:50:01 EST 2017


On 18 November 2017 at 11:05, Victor Stinner <victor.stinner at gmail.com> wrote:
> Hi,
>
> tl; dr I propose to extend the existing "stable API" to make it almost
> as complete as the current API. For example, add back
> PyTuple_GET_ITEM() to be stable API, but it becomes a function call
> rather than a macro. The final question is if it's not too late to
> iterate on an implementation of this idea for Python 3.7? Knowing that
> the stable API doesn't affect the "current API" at all, since the "new
> C API" (extended stable API) would only be accessible using an
> *opt-in* flag.

I'm -1 on expanding the stable API/ABI in 3.7 (especially without a
PEP), but I'm +1 on refactoring the way we maintain it, with a view to
expanding it (with function calls substituting in for the macros in
Py_LIMITED_API mode) in 3.8.

This isn't an urgent change, but the strict backwards compatibility
policy means it's one where we'll be stuck with any mistakes we make
for a long time. (Proper use of symbol versioning might offer a
subsequent escape clause, but that introduces its own cross-platform
compatibility problems).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list