[Patches] [ python-Patches-995766 ] Keyword argument support in cPickle

SourceForge.net noreply at sourceforge.net
Wed Jul 28 11:22:16 CEST 2004


Patches item #995766, was opened at 2004-07-22 08:25
Message generated for change (Comment added) made by ddorfman
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=995766&group_id=5470

Category: Modules
Group: None
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Dima Dorfman (ddorfman)
Assigned to: Nobody/Anonymous (nobody)
Summary: Keyword argument support in cPickle

Initial Comment:
Add keyword argument support to the "dump", "dumps", and 
"Pickler"
callables in the cPickle module. This provides better API
compatibility with the pure-Python pickle module. There are 
several
other differences, but this one is probably the most user-visible 
and
likely to be noticed. And it's easy to fix! The callables chosen are
those that take multiple arguments.

This patch addresses bug #888594


----------------------------------------------------------------------

>Comment By: Dima Dorfman (ddorfman)
Date: 2004-07-28 09:22

Message:
Logged In: YES 
user_id=908995

Thanks Martin. I submitted the documentation update as SF #999280, 
and this patch addressed bug #888594, which can now be closed.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-07-27 05:23

Message:
Logged In: YES 
user_id=21627

I see. Thanks for the patch; I have applied it as 

pickletester.py 1.57
NEWS 1.1056
cPickle.c 2.151


----------------------------------------------------------------------

Comment By: Dima Dorfman (ddorfman)
Date: 2004-07-26 13:18

Message:
Logged In: YES 
user_id=908995

The patch does what it claims to do--be more compatible with the 
pure-Python pickle module, which uses "obj" as the first argument. I noticed 
that when I made the change and should have mentioned it in the initial 
comment. I intend to submit a patch to the documentation to change the first 
argument to "obj". Although I think "object" is better, someone might be 
relying on the pure-Python using obj even though the documentation is wrong 
about that.

I see no reason to backport this to 2.3.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-07-26 12:16

Message:
Logged In: YES 
user_id=21627

The patch is incorrect: the first argument is called object.
Please also double-check consistency with the documentation.

I'm going to apply the revised version for 2.4 only, as this
is a subtle behaviour change. If you think it should be
backported to 2.3 as well, please indicate so.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=995766&group_id=5470


More information about the Patches mailing list