[issue3385] cPickle to pickle conversion in py3k missing methods

Alexandre Vassalotti report at bugs.python.org
Mon Jun 28 23:16:41 CEST 2010


Alexandre Vassalotti <alexandre at peadrop.com> added the comment:

> Do I understand correctly that the issue is that python
> Pickler class has dispatch attribute but C Pickler does
> not?

Yes.

> The add_dispatch_check-0.patch patch does not seem
> to add class attribute, it adds an instance attribute
> instead.

I know. That's why I said it was a preliminary patch. :-) Also, see msg71159 about the class vs instance attribute issue.

There's a lot of code out there that do crazy things with pickle's dispatch dictionary. For now, it is best if we leave the method names alone. If people wants to keep doing their funky stuff with pickle, then we can point them to pickle._Pickler and pickle._Unpickler, which will always point to the Python implementations.

That said, I do not believe it's a good idea to add the dispatch attribute to _pickle anymore. But, I acknowledge there is a need for overriding the pickling mechanism for specific types. We should find a clean way to support this.

I am closing this issue as "won't fix".

----------
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3385>
_______________________________________


More information about the Python-bugs-list mailing list