[Python-bugs-list] [ python-Bugs-650739 ] Binary pickle format depends on marshal

noreply@sourceforge.net noreply@sourceforge.net
Mon, 09 Dec 2002 00:22:18 -0800


Bugs item #650739, was opened at 2002-12-09 00:22
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=650739&group_id=5470

Category: Python Library
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: L. Peter Deutsch (lpd)
Assigned to: Nobody/Anonymous (nobody)
Summary: Binary pickle format depends on marshal

Initial Comment:
The documentation of the pickle package (section
3.14.1) says "The pickle serialization format is
guaranteed to be backwards compatible across Python
releases."  While this is easy to verify for the
non-binary format, the binary format calls
marshal.dumps and marshal.loads in quite a few places,
and is thus subject to the statement in the same
paragraph that "The marshal serialization format is not
guaranteed to be portable across Python versions."

It appears that mdumps and mloads are only used for
converting integers to and from binary format. I
suggest that instead of invoking mdumps and mloads, the
pickle code include its own copies of these two simple
algorithms.

I haven't looked at cPickle, so I don't know whether it
calls the marshal code, or whether it implements the
algorithms itself. If the former, I suggest changing it
too to the latter.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=650739&group_id=5470