[Python-Dev] Preventing 1.5 extensions crashing under 1.6/2.0 Python
Barry Scott
barry@scottb.demon.co.uk
Wed, 12 Jul 2000 21:30:45 +0100
> This is where we are now. I agree that we should not crash, but it seems
> to me you havent solved anything - individual .pyd authors needing to tell
> users about each individual .pyd isnt a solution.
At least if Python can detect that a .PYD is out of date you know
to ask for a newer .PYD or build it yourself. A crash is bad PR for
the .PYD and Python.
> > > You can already get the version string by
> > > looking at Py_GetVersion() -- this also answers the question of how a
> > > version is represented.
> >
> > True. And on Windows, there is a standard Version resource
> > string which gives the DLL version, and can be read without
> > loading the DLL. This string is referenced by the Wise (and
> > other) installers to decide whether a DLL is newer and should
> > be replaced.
>
> Im not sure how this helps us. Do you mean that "initfoo" should use the
> Windows resource/version APIs to determine if it can load?
As I pointed out you cannot use Py calls from a .PYD to find out
the version as the .PYD calls the function in the old PYTHON15.DLL
not the new one.
BArry