[issue14166] private dispatch table for picklers

2012-03-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've replaced occurrences of "pickle.Pickler" with "self.pickler_class" in the tests. Otherwise, the patch looks perfect and I've now committed it. Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed __

[issue14166] private dispatch table for picklers

2012-03-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset f7a9a10ae0c0 by Antoine Pitrou in branch 'default': Issue #14166: Pickler objects now have an optional `dispatch_table` attribute which allows to set custom per-pickler reduction functions. http://hg.python.org/cpython/rev/f7a9a10ae0c0 --

[issue14166] private dispatch table for picklers

2012-03-04 Thread sbt
sbt added the comment: Updated patch with docs. -- Added file: http://bugs.python.org/file24729/pickle_dispatch.patch ___ Python tracker ___

[issue14166] private dispatch table for picklers

2012-03-04 Thread sbt
sbt added the comment: > I don't understand the following code: > ... > since self.dispatch_table is a property returning > self._dispatch_table. Did you mean type(self).dispatch_table? More or less. That code was a botched attempt to match the behaviour of the C implementation. The C imple

[issue14166] private dispatch table for picklers

2012-03-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: That looks like a good idea. I don't understand the following code: +try: +self._dispatch_table = self.dispatch_table +except AttributeError: +self._dispatch_table = dispatch_table ... since self.dispatch_table is a prop

[issue14166] private dispatch table for picklers

2012-03-01 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14166] private dispatch table for picklers

2012-03-01 Thread sbt
New submission from sbt : Currently the only documented way to have customised pickling for a type is to register a reduction function with the global dispatch table managed by the copyreg module. But such global changes are liable to disrupt other code which uses pickling. Multiprocessing d