Library support for Python 3.x

Stefan Behnel stefan_ml at
Thu Jan 28 10:25:26 CET 2010

David Cournapeau, 28.01.2010 09:54:
> On Thu, Jan 28, 2010 at 5:40 PM, Stefan Behnel wrote:
>> That doesn't completely match my experience. It's true that there is no
>> guarantee that the ABI will stay compatible, but when you compile lxml
>> against Py2.4 on a 32bit machine, it will continue to import in Py2.5 and
>> (IIRC) Py2.6. It won't be as fast and it won't use some newer features, but
>> it will work. Don't remember my experience with 2.3, though.
> Importing fine is a very low expectation for ABI compatibility :)

Ok, I should have said "imports and runs its test suite successfully". I
just wanted to add a "works for me" to counter your rather pessimistic

> Since python does not make ABI guarantees between minor releases, you
> don't know whether some structures layouts are changed between
> versions, and in general, tracking crashes due to those is no fun. It
> really depends on how much you depend on the C API, but for something
> extensive like NumPy, I don't think it would ever work.

I wouldn't be so sure that NumPy is so much more "extensive" in C-API usage
than lxml.

> So yes, you could say "just try and if it crashes, check that it is
> not ABI-related". In practice, this is very poor engineering in my
> book...

Well, I don't know if there is any 'official' core developer statement
regarding ABI compatibility, but I know that Guido doesn't take it easy to
break it for a release. He tried pretty hard to keep it up for 2.5->2.6, at
least, even if he was aware that it would be futile for 2.x->3.x.


More information about the Python-list mailing list