#5985: [with spkg, needs review] cPickle: adds support for class pickling
customization
----------------------------------------------+-----------------------------
Reporter: nthiery | Owner: nthiery
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-4.1.2
Component: misc | Keywords: cPickle, pickling
classes
Work_issues: | Author: Craig Citro,
Nicolas M. Thiéry
Reviewer: Craig Citro, Nicolas M. Thiéry | Merged:
----------------------------------------------+-----------------------------
Changes (by newvalueoldvalue):
* priority: major => critical
* reviewer: => Craig Citro, Nicolas M. Thiéry
* milestone: sage-4.1.3 => sage-4.1.2
* author: => Craig Citro, Nicolas M. Thiéry
Old description:
> The first patch imports the vanilla cPickle.c and test_cpickle.py
> from python 2.5.2.p9 as sage.misc.cPickle, and updates accordingly the
> cPickle imports throughout the sage library.
>
> The second patch makes a very small modification to cPickle to allow
> for customizing how class are pickled via metaclasses.
>
> See discussions on:
> -
> http://groups.google.com/group/comp.lang.python/browse_thread/thread/66c282afc04aa39c/
> - http://groups.google.com/group/sage-
> devel/browse_thread/thread/583048dc7d373d6a/
>
> Thanks to Mike, Burcin, and Carl for suggestions on how to handle this.
New description:
Original implementation:
The first patch imports the vanilla cPickle.c and test_cpickle.py
from python 2.5.2.p9 as sage.misc.cPickle, and updates accordingly the
cPickle imports throughout the sage library.
The second patch makes a very small modification to cPickle to allow
for customizing how class are pickled via metaclasses.
Final implementation: adds the second patch to the python spkg
See discussions on:
-
http://groups.google.com/group/comp.lang.python/browse_thread/thread/66c282afc04aa39c/
- http://groups.google.com/group/sage-
devel/browse_thread/thread/583048dc7d373d6a/
Thanks to Mike, Burcin, and Carl for suggestions on how to handle this.
--
Comment:
Replying to [comment:17 craigcitro]:
> I'm uploading a new python spkg, which is the same as the previous one I
posted, but based on the most recent python spkg in Sage. It's here:
>
> http://sage.math.washington.edu/home/craigcitro/python-2.6.2.p4.spkg
>
> This fixes the issue by patching the files in our python spkg instead of
importing and using our own copy of `cPickle`. It also makes the
corresponding changes to `pickle`.
Sounds good to me! Positive review, up to someone double checking the new
patch I attached which imports the test file from the original version of
the patch.
Carl, Craig, Robert, please do it soon! William is ok integrating this in
4.1.2 (see IRC).
I set back the release to 4.1.2
For the author / reviewer, I don't know exactly what to do since I wrote
the first version, Craig reviewed it, wrote the second version which I
reviewed :-) Please set whatever you feel appropriate
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5985#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---