[Python-3000] Simplifying pickle for Py3k

Christian Heimes lists at cheimes.de
Wed Oct 3 23:52:10 CEST 2007


Neil Schemenauer wrote:
> I guess there are several different solutions:
> 
>     * Remove backwards compatible stuff from the code and the
>       documentation.  The downside is that old pickles could not be
>       loaded.  Perhaps that's not a huge issue since the removal of
>       old-style classes might already break old pickles.
> 
>     * Remove the backwards compatible stuff from the documentation
>       only.  The would help people using the language but would
>       still be a long term maintenance issue.
> 
>     * Leave the old code in but generate warnings when old pickle
>       mechanisms are used.  Eventually the old stuff could be
>       removed from the code.
> 
>     * Provide an "oldpickle" module the supports pre-3k pickles.
> 
> I think I like the warnings idea best.

Please keep in mind that we want people to move to Python 3.x. Pickles
are very important for a bunch of well known and large Python
applications like Zope2, Zope3, Mailman and probably many more. Zope's
ZODB makes heavy use of pickles. If you remove the support for old style
pickles from Python 2.x you also remove the migration path for a large
user base to Python 3.x.

I like to propose option (4b): Provide an oldpickle module which can
load old pickles and migrate an old pickle to a Python 3.x pickle. As
long as Python 3.0 can load and migrate old to new pickles I'm also for
option (1). The pickle module could use an emaciation.

Christian



More information about the Python-3000 mailing list