[Python-Dev] LSB: Binary compatibility (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 4 20:05:13 CET 2006


At the LSB meeting, Jeff Licquia asked whether Python could provide binary compatibility with previous versions by use of ELF symbol versioning. In ELF symbol versioning, you can have multiple definitions for the same symbol; clients (e.g. extension modules) would refer to a specific version. During static linking, the most recent (?) version of the symbol is coded into the client object.

With symbol versioning, you can change the implementation of a function and even its interface, and it will be compatible as long as you keep the original version around.

My first reaction is that this is difficult due to the usage of function-like macros. However, if we replaced those with C functions (perhaps has a compile-time choice), and if we would also hide the layout of structures, I think providing binary compatibility (with a certain baseline version, or multiple of these) would be possible.

Of course, several things need to be considered, e.g.

All in all, I think providing binary compatibility would be feasible, and should be attempted. What do you think?

Regards, Martin



More information about the Python-Dev mailing list