Upgrading Python Breaks Extensions; Fix proposal

Guido van Rossum guido at python.org
Wed Aug 29 23:37:58 EDT 2001


Robin Becker <robin at jessikat.fsnet.co.uk> writes:

> In Tcl land, these problems caused the powers that be to implement their
> own indirection scheme. Effectively the extension is passed a pointer to
> a list of pointers. The extension indirects through them to get at the
> real api. They have various rules to make things work reasonably when
> pointers get added/subtracted to the real API. Seems to work quite well,
> but there's a fixed time and space penalty.

Hm, this looks a lot like the scheme that Windows already implements
for linking to DLLs, as long as you use the same DLL name.  So what
would the point be?

The problem with either scheme is that we can't *know* that a new DLL
won't break an existing extension -- each version introduces *some*
incompatible change.  Most extensions don't use the affected APIs, so
would be safe, but there's no way to know.  We could name the DLL
python2.dll, and hope for the best, but some extensions might dump
core.  We should then try to minimize this risk by never changing an
API -- but that's very hard.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list