[Python-Dev] What version is an extension module binary compatible with (original) (raw)

Miro Hrončok mhroncok at redhat.com
Tue Mar 28 07:24:55 EDT 2017


Hi,

as per [0], ABI of the C API is generally not stable and the binary compatibility may break between versions. It is hard from the text to know whether it talks about minor versions (such as 3.6 vs 3.5) or patch versions (such as 3.6.1 vs 3.6.0).

In Fedora we currently only keep track about the minor version dependency. I.e. an RPM package with a Python module depends on Python 3.6, not specifically on Python 3.6.1.

However, recently we found an issue with this approach [1]: an extension module built against Python 3.6.1 cannot be run on Python 3.6.0, because it uses a macro that, in 3.6.1, uses the new PySlice_AdjustIndices function.

I'd like some clarification on what ABI compatibility we can expect.

It would be nice to say this explicitly in the docs ([0] or another suitable place).

[0] https://docs.python.org/3/c-api/stable.html [1] https://bugzilla.redhat.com/show_bug.cgi?id=1435135

Thanks for clarification, On behalf of the Fedora Python SIG, Miro Hrončok

Phone: +420777974800 IRC: mhroncok



More information about the Python-Dev mailing list