[Python-3000] Simplifying pickle for Py3k
Guido van Rossum
guido at python.org
Wed Oct 3 20:29:18 CEST 2007
I think it's essential to be able to *read* pickles generated by older
Python versions. But for writing I'm okay with only writing protocol 2
(which Python 2.x also understands) and only supporting the modern
APIs for customizing pickle writing.
I don't think classic class instances are necessarily unpicklable in
3.0 -- they will just show up as instances of the corresponding
new-style classes.
--Guido
On 10/3/07, Neil Schemenauer <nas at arctrix.com> wrote:
> I guess the library overhaul hasn't really started it but it would
> be nice if the pickle module could get some work. Today I'm trying
> to efficiently store a class using pickle and the documentation is
> making my head hurt. I don't think the documentation itself is the
> problem, just the fact that the rules are so complicated.
>
> 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.
>
> Neil
>
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list