[issue3385] cPickle to pickle conversion in py3k missing methods

2010-06-28 Thread Alexandre Vassalotti
Alexandre Vassalotti 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 kno

[issue3385] cPickle to pickle conversion in py3k missing methods

2010-06-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Do I understand correctly that the issue is that python Pickler class has dispatch attribute but C Pickler does not? The add_dispatch_check-0.patch patch does not seem to add class attribute, it adds an instance attribute instead. I also noticed that

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-08-18 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Yeah, the old Pickler and Unpickler classes are available by design (to allow testing both implementation). You could subclass _Pickler as a temporary fix for this issue. ___ Python tracker <[EMAIL PR

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-08-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Maybe I missed something, but the (subclassable) python implementation of Pickler is still available with another name: from pickle import _Pickler as Pickler class ForkingPickler(Pickler): dispatch = Pickler.dispatch.copy() __

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-08-14 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I ran into a few problems while trying to fix this issue. First, does someone know how to add class attributes on extension types? It sounds like I will need either some tp_dict hacking or a Pickler subclass. Second, which methods of Pi

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-08-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I got a preliminary patch that adds the dispatch dictionary. However, the patch leaks and it doesn't expose the save_reduce() method (which is needed by ForkingPickler). -- keywords: +patch Added file: http://bugs.python.org/fil

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: A use case: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/572213 shows how code can use the Pickler.dispatch dict, but also some Pickler.save_xxx function which should be exposed as well. __

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-22 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Just in case you are wondering why I haven't submitted a patch yet, I want to let you know that my home computer is currently broken. So, I won't be able to work on this until I get my computer fixed (which unfortunately could take a

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-20 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-16 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: The omission of the dispatch dictionary was sort of intentional. But now, I think it would be a good idea to add it to _pickle.Pickler. I will write a patch ASAP. ___ Python tracker <[EMAIL PROTECTE

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-16 Thread Jesse Noller
New submission from Jesse Noller <[EMAIL PROTECTED]>: I was attempting the patch for issue3125 to py3k, and in it Amaury defines a new ForkingPickler: from pickle import Pickler class ForkingPickler(Pickler): dispatch = Pickler.dispatch.copy() This is also related to issue3350 I suspect. H