[Python-Dev] For review: PEP 307 - Extensions to the pickle protocol
Guido van Rossum
guido@python.org
Fri, 07 Feb 2003 13:33:23 -0500
I'm assuming a fair number of people have been following this already
in the checkins list; I think it's ready for review on python-dev:
http://www.python.org/peps/pep-0307.html
Quoting the introduction:
Pickling new-style objects in Python 2.2 is done somewhat clumsily
and causes pickle size to bloat compared to classic class
instances. This PEP documents a new pickle protocol in Python 2.3
that takes care of this and many other pickle issues.
There are two sides to specifying a new pickle protocol: the byte
stream constituting pickled data must be specified, and the
interface between objects and the pickling and unpickling engines
must be specified. This PEP focuses on API issues, although it
may occasionally touch on byte stream format details to motivate a
choice. The pickle byte stream format is documented formally by
the standard library module pickletools.py (already checked into
CVS for Python 2.3).
This PEP attempts to fully document the interface between pickled
objects and the pickling process, highlighting additions by
specifying "new in this PEP". (The interface to invoke pickling
or unpickling is not covered fully, except for the changes to the
API for specifying the pickling protocol to picklers.)
Please don't pass this on to c.l.py or python-list yet until we've
gathered feedback from python-dev!
--Guido van Rossum (home page: http://www.python.org/~guido/)