[Python-3000] Does anyone remember the Red Hat 1.5->2.x fiasco?

Stephen J. Turnbull stephen at xemacs.org
Tue Feb 5 01:04:47 CET 2008


Neal Becker writes:

 > Would be even nicer if python could say: require python_version >=
 > x.y or some such.

The starting point of this discussion was that Python 3 proves this to
be impossible.  The app cannot be sure at write time that no Python
released in the future will make the app illegal.

The sensible thing for the app to say is "I require <named API>" and
the sensible reply for the python executable is one of "Yo! I can do
that!" or "Take this note over to X.Y, and he'll take care of it for
you" or "sorry, I dunno nobody that can do that for ya."

A way to implement this would be for apps to use #!/usr/bin/pythonX.Y
shebangs, and for Python W.Z to install a link pythonX.Y -> pythonW.Z
if (a) pythonX.Y isn't already a real file and (b) W.Z does provide
the full X.Y API.  Crude, but it can be done *now* *without* support
from the Python language itself.  It would take care of breaks in
backward compatibility nicely.  Eg, 3.0 simply wouldn't install any
python2.X -> python3.0 links.  (Yes, I know users won't retrofit, and
it's even worse for the distros.  But that's true of any scheme like
this.)

Dunno if this can be applied to Windows, unfortunately.


More information about the Python-3000 mailing list