[Python-Dev] Using PEP384 Stable ABI for the lzma extension module (original) (raw)

Amaury Forgeot d'Arc amauryfa at gmail.com
Tue Oct 4 18🔞27 CEST 2011


Hi,

Has someone already tried to really use Py_LIMITED_API for some "serious" extension module? I wanted to give it a try for the _lzma module (see issue 6715) because liblzma does not compile with Microsoft compilers; an alternative could be to use mingw to (pre)build _lzma.pyd, which would link with a static liblzma.a also compiled with mingw.

Mixing compilers in a Python process is one of the reasons of PEP384, so I added #define Py_LIMITED_API on top of the module, and "fixed" the issues one by one:

Now the module seems to work correctly and passes tests... at least on Linux in a standard environment. I will do other tests on Windows.

What do you think about using the stable ABI even in shipped extensions? Have you already used it somewhere else?

Cheers,

-- Amaury Forgeot d'Arc



More information about the Python-Dev mailing list