
Guido van Rossum wrote:
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 somewhat reluctant.
Be assured, I know the opcodes by heart. We only appended to the end of opcode space, there are no changes. But I can't tell about marshal. ciao - chris -- Christian Tismer :^) <mailto:tismer@appliedbiometrics.com> Applied Biometrics GmbH : Have a break! Take a ride on Python's Kaunstr. 26 : *Starship* http://starship.python.net 14163 Berlin : PGP key -> http://wwwkeys.pgp.net PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF where do you want to jump today? http://www.stackless.com