From: dieter at handshake.de (Dieter Maurer)
Date: 21 Apr 1999 20:32:58 +0000
Subject: Python 1.5.1/2 library incompatibilities
Message-ID: <x7hfq967et.fsf@lindm.dm>
Content-Length: 1334
X-UID: 384                                                  

Neither can a Python 1.5.1 interpreter use a 1.5.2 Python library
(it results in a "NameError: buffer" on import of "types.py")
nor can a 1.5.2 interpreter use a 1.5.1 library (this results
in failing to find the (new) built in exception "EnvironmentError";
the interpreter switches back to string based exceptions which causes
subsequent failure when the application uses class exceptions).

This was (for a short time) an issue for us.
We wanted to switch to Python 1.5.2;
we had, however, 1.5.1 interpreters embedded in
executables that could not all be replaced
immediately. Installing Python 1.5.2 the standard way broke the old
executables (because the 1.5.1 library was overwritten)
while installing the new libraries in "/usr/local/lib/python1.5.2"
let the new interpreter find the old modules.

We solved the problem by changing the way, our local
Python interpreter finds the library: it now uses
the full version number to find its library rather than
the base version number, only. This allows us, to
have Python libraries with different version levels
(e.g. 1.5.1 and 1.5.2) in the same "prefix" location.

We could also have installed Python 1.5.2 with a different
"prefix". However, this had led to a duplication of
"site-python" or the use of an explicite PYTHONPATH.
Both was considered unsatisfactory.


- Dieter




