[Python-Dev] importing .pyc-files generated by Python 1.5.2 in Python 1.6. Why not?

Peter Funk pf@artcom-gmbh.de
Tue, 23 May 2000 17:23:48 +0200 (MEST)


Fred, 
Thank you for your quick response.

Fred L. Drake:
> Peter,
>   In theory, perhaps it could; I don't know if the extra work is worth it,
> however.
[...]
>   Do you have reason to suspect that either case is sufficiently common to
> complicate the .pyc loader, or is there another reason that I've missed
> (very possible, I admit)?

Well, currently we (our company) deliver no source code to our
customers.  I don't want to discuss this policy and the reasoning
behind here.  But this situation may also apply to other commercial
software vendors using Python.

During late 2000 there may be several customers out there running
Python 1.6 and others still running Python 1.5.2.  So we will have
several choices to deal with this situation:
   1. Supply two different binary distribution packages: 
      one containing 1.5.2 .pyc files and one containing 1.6 .pyc files.
      This will introduce some new logistic problems.
   2. Upgrade to Python 1.6 at each customer site at once. 
      This will be difficult.
   3. Patch the 1.6 unmarshaller to support loading 1.5.2 .pyc files
      and supply our own patched Python distribution.
      (and this would also be "carrying owls to Athen" for Linux systems)
    [I don't know whether this ^^^^^^^^^^^^^^^^^^^^^^ careless translated 
      german idiom makes any sense in english ;-) ]
      I personally don't like this.
   4. Change our policy and distribute also the .py sources.  Beside the
      difficulty to convince the management about this one, this also
      introduces new technical "challenges".  The Unix text files have to be
      converted from LF lineends to CR lineends or MacPython wouldn't be 
      able to parse the files.  So the mac source distributions
      must be build from a different directory tree.

No choice looks very attractive.  Adding a '|| (magic == 0x994e)' or 
some such somewhere in the 1.6 unmarshaller should do the trick.
But I don't want to submit a patch, if God^H^HGuido thinks, this isn't
worth the effort. <wink>

Regards, Peter
-- 
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen)