[Python-Dev] Restricted API versioning

Christian Heimes lists at cheimes.de
Sun Jun 24 01:40:13 CEST 2012


Am 24.06.2012 01:11, schrieb Larry Hastings:
> On 06/23/2012 03:08 PM, "Martin v. Löwis" wrote:
>> On 23.06.2012 23:41, Antoine Pitrou wrote:
>>> Perhaps something more user-friendly than the hexversion?
>> Please propose something. I think the hexversion *is* user-friendly,
> 
> +1 to the idea, and specifically to using hexversion here.  

+1 for the general idea and for using Py_LIMITED_API. I still like my
idea of a simple macro based on Include/patchlevel.h, for example:

#define Py_API_VERSION(major, minor, micro) \
   (((major) << 24) | ((minor) << 16) | ((micro) << 8))

#if Py_LIMITED_API+0 >= Py_API_VERSION(3, 3, 0)
#endif


> (Though what will we do after Python 255.0?)

Luckily it's gonna take another 1500 years, or so. Our progenies could
rename Python to Circus ...


More information about the Python-Dev mailing list