New versions breaking extensions, etc.
Cameron Laird
claird at lairds.us
Mon Dec 13 16:08:03 EST 2004
In article <mailman.7514.1102742911.5135.python-list at python.org>,
Nick Coghlan <ncoghlan at email.com> wrote:
>Jive wrote:
>> Can someone explain to me why Python 2.4 on MS Windows has these backward
>> compatibility problems? What am I missing?
>
>The problem is the Python C/API. At the moment, it exposes things
>directly (like
>data structures) that may change size between major version releases. The other
>issue is that the interpreter and the extensions may be linked to different
>versions of the Microsoft runtime.
>
>This is a solvable problem, but it would require:
> 1. Major additions to the C/API - a "Python Major Version Agnostic" API that
>hides all data structures behind opaque pointers, never passes file descriptors
>between the interpreter and the extension and never gets Python to
>delete memory
>allocated by the extension (or vice-versa)
> 2. Rewriting extensions to use the new API functions instead of the current
>major version specific ones.
>
>Such an API is likely to be both harder to work with and slower, simply due to
>the limitations of C.
>
>To this date, no-one has cared enough about the problem to put in the effort
>required to make the C API version agnostic. Given that the API almost always
.
.
.
Tcl went through this epiphany a few years, and has largely,
though not exclusively, committed to use of the once-more-
redirected API called Stubs <URL: http://wiki.tcl.tk/stubs >.
Some Tcl-ers are orgasmic about the wonders of Stubs, some
ignore it, a few don't like it, and most, perhaps, aren't
even aware of its existence. Performance doesn't appear to
be much of an issue, though.
More information about the Python-list
mailing list