[Python-Dev] Restricted API versioning (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Sun Jun 24 00:08:35 CEST 2012
- Previous message: [Python-Dev] Restricted API versioning
- Next message: [Python-Dev] Restricted API versioning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 23.06.2012 23:41, Antoine Pitrou wrote:
On Sat, 23 Jun 2012 23:31:07 +0200 "Martin v. Löwis" <martin at v.loewis.de> wrote:
I've been thinking about extensions to the stable ABI. On the one hand, introducing new API can cause extension modules not to run on older Python versions. On the other hand, the new API may well be stable in itself, i.e. remain available for all coming 3.x versions.
As a compromise, I propose that such API can be added, but extension authors must explicitly opt into using it. To define their desired target Python versions, they need to set PyLIMITEDAPI to the hexversion of the first Python release they want to support. Perhaps something more user-friendly than the hexversion?
Please propose something. I think the hexversion is user-friendly, since it allows easy comparisons (Py_LIMITED_API+0 >= 0x03030000). Users that run into missing symbols will, after inspection of the header file, easily know what to do.
We could require a second macro, but users will already have to define Py_LIMITED_API, so not making them define a second macro is also more friendly.
Plus, with the hexversion, we can add stuff to a bugfix release, such a annoying omissions (e.g. the omission of the _SizeT functions, which I missed since I didn't compile the headers with PY_SSIZE_T_CLEAN when generating the function list).
Regards, Martin
- Previous message: [Python-Dev] Restricted API versioning
- Next message: [Python-Dev] Restricted API versioning
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]