[Distutils] Compatibility Tags and the Stable API

Donald Stufft donald at stufft.io
Fri Sep 9 07:15:06 EDT 2016


> On Sep 9, 2016, at 7:11 AM, Alex Grönholm <alex.gronholm at nextday.fi> wrote:
> 
> Am I understanding this correctly? Even though the limited API is supposed to work on all CPython versions supporting the numbered API, I cannot do the compiling using a newer version (say 3.5) or it won't work with older ones (3.3, 3.4)?

The Py_Limited_API can be either set to an on/off value (in which case it is effectively CPython>=3.2) or you can set it to the hex value of a specific version (in which case it is CPython>=thatversion). So you can compile a Py_Limited_API for older CPythons just fine, you’ll just need to appropriately set the Py_Limited_API value. The reason for this is so CPython can *add* new functions to the stable ABI (but not remove or modify in an ABI incompatible way). So if you use a new to the ABI function, you’ll need a newer minimum.

—
Donald Stufft



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160909/aec5c64a/attachment.html>


More information about the Distutils-SIG mailing list