[Python-Dev] Marshal bug in 2.1?

Christian Tismer tismer@tismer.com
Sat, 02 Jun 2001 11:49:35 +0200

Thomas Wouters wrote:
> On Fri, Jun 01, 2001 at 09:01:38PM +0200, M.-A. Lemburg wrote:
> > Yes, not suprisingly though... AFAIK the pyc format changed
> > in every single version between 1.5.2 and 2.1.
> Worse, it's changed several times between each release :)

But I didn't use .pyc at all, just a marshalled code object.
There are no version headers or such.
The same object worked in fact for Py 1.5.2 and 2.0, but no
longer with 2.1 .
I debugged the unmarshalling and saw what happened:
The new code objects with their new scoping features were
the problem. The new structures were simply added, and there
is no way to skip these for older code objects, since there
isn't any info.
Some option for marshal to umarshal old-style code objects
would ave helped.
But then, I'm not sure if the opcodes are still assigned
the same way in 2.1, or if there was some movement? This would
kill it anyway.

ciao - chris

(now looking for another cheap way to do something invisible in
 Python without installing *anything* )

Christian Tismer             :^)   <mailto:tismer@tismer.com>
Mission Impossible 5oftware  :     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/