[Python-Dev] importing .pyc-files generated by Python 1.5.2 in Python 1.6. Why not?
Guido van Rossum
Wed, 24 May 2000 10:11:12 -0500
> 3. Patch the 1.6 unmarshaller to support loading 1.5.2 .pyc files
I agree that this is the correct solution.
> 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>
That's BDFL for you, thank you. ;-)
Before accepting the trivial patch, I would like to see some analysis
that shows that in fact all 1.5.2 .pyc files work correctly with 1.6.
This means you have to prove that (a) the 1.5.2 marshal format is a
subset of the 1.6 marshal format (easy enough probably) and (b) the
1.5.2 bytecode opcodes are a subset of the 1.6 bytecode opcodes. That
one seems a little trickier; I don't remember if we moved opcodes or
changed existing opcodes' semantics. You may be lucky, but it will
cause an extra constraint on the evolution of the bytecode, so I'm
--Guido van Rossum (home page: http://www.python.org/~guido/)