classification
Title: merge pickle and cPickle in 3.0
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: alexandre.vassalotti Nosy List: alexandre.vassalotti, benjamin.peterson, brett.cannon, giampaolo.rodola, kbk
Priority: critical Keywords: patch

Created on 2008-05-19 19:59 by brett.cannon, last changed 2008-06-13 02:50 by alexandre.vassalotti. This issue is now closed.

Files
File name Uploaded Description Edit
_pickle.c alexandre.vassalotti, 2008-06-02 05:14
changeset-1.diff alexandre.vassalotti, 2008-06-04 19:27
changeset-2.diff alexandre.vassalotti, 2008-06-10 00:46
add-cpickle-1.patch alexandre.vassalotti, 2008-06-10 00:55
add-cpickle-2.patch alexandre.vassalotti, 2008-06-11 21:55
fix_pickle_int64.diff alexandre.vassalotti, 2008-06-12 18:20
Messages (9)
msg67071 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2008-05-19 19:59
cPickle should be gone in 3.0 and pickle should have an accelerated 
version behind it, when available.

Alexandre has been working on this (might even be checked in), so 
assigning to him to help track for PEP 3108 work.
msg67629 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2008-06-02 05:14
Here is the fully reviewed and shiny C optimized pickle module. :-)

Note, I am only posting the _pickle.c source code for now. I still need
to work out a few details out. For example, there is a few methods that
needs to be exposed in the public API -- i.e., Unpickler.find_class()
and Pickler.save_reduce(). Also, instantiate() needs to reworked to
match the one in pickle.py. Anyway, I am now pretty confident that I
will have the time to finalize these details before the beta.
msg67695 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2008-06-04 19:27
Here is a diff against the previously posted _pickle.c module. The
module is pretty much done now. I fixed find_class() to be a proper
method and move the initialization code of Pickler/Unpickler into the
tp_init slot to allow proper subclassing.

The only things I didn't do is make save_reduce() public (since it would
be useless) and fix instantiate() to be exactly the same as in pickle.py
(since I have no idea how to cleanly inject a __class__ attribute into a
pre-build empty class from C).

With the beta postponed, I will probably add some optimizations to the
module and update the stdlib documentation.
msg67882 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2008-06-10 00:55
Here is the full patch that adds the _pickle module. I would like to
commit it as soon another developer tests it and (hopefully) reviews it.

A documentation patch is coming as well. However since I don't want to
block the release just for documentation patch, I will post it as a
separate issue.
msg68027 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2008-06-11 21:55
I updated the patch to use the new module framework.
msg68034 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2008-06-11 23:06
Committed in r64152.
msg68049 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-06-12 03:08
I'm sorry. I had to revert this.
msg68071 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2008-06-12 18:20
Okay, I fixed _pickle's integers unpickling on 64bit platforms. Here is
the patch.
msg68119 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2008-06-13 02:50
Restored _pickle in r64180.
History
Date User Action Args
2008-06-13 02:50:24alexandre.vassalottisetstatus: open -> closed
messages: + msg68119
2008-06-12 18:20:04alexandre.vassalottisetfiles: + fix_pickle_int64.diff
messages: + msg68071
2008-06-12 03:08:05benjamin.petersonsetstatus: closed -> open
nosy: + benjamin.peterson
messages: + msg68049
priority: release blocker -> critical
2008-06-11 23:07:45alexandre.vassalottiunlinkissue2775 dependencies
2008-06-11 23:06:49alexandre.vassalottisetstatus: open -> closed
resolution: accepted
messages: + msg68034
2008-06-11 21:55:55alexandre.vassalottisetfiles: + add-cpickle-2.patch
messages: + msg68027
2008-06-10 00:55:54alexandre.vassalottisetfiles: + add-cpickle-1.patch
messages: + msg67882
2008-06-10 00:47:05alexandre.vassalottisetfiles: + changeset-2.diff
2008-06-04 19:28:08alexandre.vassalottisetfiles: + changeset-1.diff
keywords: + patch
messages: + msg67695
2008-06-04 12:31:14giampaolo.rodolasetnosy: + giampaolo.rodola
2008-06-02 05:14:35alexandre.vassalottisetfiles: + _pickle.c
messages: + msg67629
2008-06-01 16:39:03kbksetnosy: + kbk
2008-05-19 20:02:29brett.cannonlinkissue2775 dependencies
2008-05-19 19:59:21brett.cannoncreate