[Python-Dev] Cloning threading.py using proccesses

"Martin v. Löwis" martin at v.loewis.de
Sun Oct 15 14:59:57 CEST 2006


Fredrik Lundh schrieb:
> but given that the format *has* been stable for many years, surely it 
> would make more sense to just codify that fact, rather than developing 
> Yet Another Serialization Format instead?

There have been minor changes over time, e.g. r26146 (gvanrossum)
introduced TYPE_TRUE and TYPE_FALSE, r36242 (loewis) introduced
TYPE_INTERNED and TYPE_STRINGREF, and r38266 (rhettinger) introduced
TYPE_SET and TYPE_FROZENSET.

With these changes, old dumps can load in new versions, but not vice
versa.

Furthermore, r27219 (nnorwitz) changed the co_argcount, co_nlocals,
co_stacksize, co_flags, and co_firstlineno fields from short to long;
unmarshalling from an old version would just crash/read garbage.

So how would you propose to deal with such changes in the future?

Regards,
Martin


More information about the Python-Dev mailing list