[Python-Dev] PEP 384 (stable api) question

Oscar Benjamin oscar.j.benjamin at gmail.com
Thu Nov 7 14:53:57 CET 2013


On 7 November 2013 12:44, Thomas Heller <theller at ctypes.org> wrote:
> PEP 384 describes the stable Python api, available when
> Py_LIMITED_API is defined.
>
> However, there are some (small) changes in the function prototypes
> available, one example is (in Python 3.3):
>  PyObject* PyObject_CallFunction(PyObject *callable, char *format, ...)
>
> which changed in Python 3.4 to 'const char *format' for the
> third argument.
>
> I know that this is only a subtle difference, but in my case it gives
> compiler warnings when I compile my stuff (my stuff is a little bit
> special, I have to admit, but anyway).
>
> I thought that the stable API would keep exactly the same across
> releases - is this expectation wrong or is this a bug?

I think you're confusing API with ABI. PEP 384 describes a stable ABI.
This means that an extension module can be *binary* compatible with
several different Python versions without needing to be recompiled for
each particular CPython release. I don't think the change you refer to
breaks binary compatibility.


Oscar


More information about the Python-Dev mailing list