Issue 2917: merge pickle and cPickle in 3.0 (original) (raw)

Created on 2008-05-19 19:59 by brett.cannon, last changed 2022-04-11 14:56 by admin. 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
2022-04-11 14:56:34 admin set github: 47166
2008-06-13 02:50:24 alexandre.vassalotti set status: open -> closedmessages: +
2008-06-12 18:20:04 alexandre.vassalotti set files: + fix_pickle_int64.diffmessages: +
2008-06-12 03:08:05 benjamin.peterson set status: closed -> opennosy: + benjamin.petersonmessages: + priority: release blocker -> critical
2008-06-11 23:07:45 alexandre.vassalotti unlink issue2775 dependencies
2008-06-11 23:06:49 alexandre.vassalotti set status: open -> closedresolution: acceptedmessages: +
2008-06-11 21:55:55 alexandre.vassalotti set files: + add-cpickle-2.patchmessages: +
2008-06-10 00:55:54 alexandre.vassalotti set files: + add-cpickle-1.patchmessages: +
2008-06-10 00:47:05 alexandre.vassalotti set files: + changeset-2.diff
2008-06-04 19:28:08 alexandre.vassalotti set files: + changeset-1.diffkeywords: + patchmessages: +
2008-06-04 12:31:14 giampaolo.rodola set nosy: + giampaolo.rodola
2008-06-02 05:14:35 alexandre.vassalotti set files: + _pickle.cmessages: +
2008-06-01 16:39:03 kbk set nosy: + kbk
2008-05-19 20:02:29 brett.cannon link issue2775 dependencies
2008-05-19 19:59:21 brett.cannon create