-
-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add explain_pickle module; allow overriding class lookup for unpickling #5483
Comments
comment:1
I am not technically qualified to review this, patch it has been in the sage-combinat queue for a couple weeks, and has proven really useful! So +1 from Florent and myself. |
comment:2
Carl: Can you change the summary in case this patch is ready for review? I changed it so that this ticket is picked up by the right report. Cheers, Michael |
comment:3
Attachment: trac5483-explain-pickle-v2.patch.gz I finally managed to finish writing the doctests (and fixed a few bugs in the process). |
comment:4
The new file(s) should get added to the reference manual so that people actually can read about them ;). Cheers, Michael |
This comment has been minimized.
This comment has been minimized.
comment:5
I have been using this patch on a regular basis without any issue. It is extremely useful, and very well and thoroughly documented. The code itself is for the most part straightforward, yet pretty technical. I am about to attach a short patch fixing some ReST stuff, and adding explain_pickle to the reference manual as recommended by Michael. For all those reason, I would give my two thumbs up for a positive review. And for advertising this cool tool beyond the Sage world. William: what do you think? |
comment:6
Attachment: trac5483-explain-pickle-v2-review.patch.gz Oral comment by William: no reason not to integrate this. Positive Review. |
comment:7
I get the failure at http://sage.pastebin.com/m4bec1638 Carl, is it trivial? |
comment:8
This appears to be a difference in Python's repr(), possibly between Python 2.5.2 (from Sage 3.4.2 on my laptop, where I developed the patch) and Python 2.5.4 (from Sage 4.0 on sage.math). Python 2.5.2:
Python 2.5.4:
I don't have time to experiment further right now, but I would suggest changing the expected output to the new version, and if it's consistent across all the test platforms then chalk it up to a change in Python and call it good. |
comment:9
I fixed the doctest. Merged in 4.0.1.rc0. |
Author: Carl Witty |
Reviewer: Nicolas Thiery, William Stein |
Merged: 4.0.1.rc0 |
explain_pickle is an unpickler (intended to be totally compatible with the cPickle unpickler) that produces Sage source code, which can then be evaluated by sage_eval. This is useful to see exactly how the unpickle process works. For example:
I think the code works, but I'm not done writing documentation and doctests.
CC: @williamstein
Component: misc
Author: Carl Witty
Reviewer: Nicolas Thiery, William Stein
Merged: 4.0.1.rc0
Issue created by migration from https://trac.sagemath.org/ticket/5483
The text was updated successfully, but these errors were encountered: