Upgrading Python Breaks Extensions; Fix proposal

Ignacio Vazquez-Abrams ignacio at openservices.net
Wed Aug 29 07:30:08 EDT 2001


On Wed, 29 Aug 2001, Robin Becker wrote:

> 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.

Oh man. Now THAT's bad...

> The windows problem comes because the name of the main Python dll is
> embedded in the extension. I've never been too sure exactly how linking
> takes place with win32, probably because the dll idea changed between
> traditional windows and win32.

The only real change is 32-bit ordinals versus 16-bit ordinals.

> One possible way to extend the life of an API compatible extension would
> be to use an intermediate stub proxy for the original python dll. So the
> extension
>
> X.pyd links to Python20.dll
>
> Python21.dll is issued along with a stub proxy for all of the 20 API
> points this is called naturally enough Python20.dll, but would really be
> an indirection vector.

No, because if a program depends on 2.0 working a certain way then it would
break anyways with 2.1, so we'd be back where we were.

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list