-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Saving pickles from the default UI #3819
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
Comments
I am against this. Pickles are not really meant for this for both technical and security reasons. They can be used to run malicious code in a way you have no chance to audit. Getting users used to the idea of loading pickles from others is not a good idea. They rely on internal details of mpl object we think are private and can change on a bug fix release. Supporting pickles as the default serialization would basically fix the current object structure and greatly constrain future work. What we really need is proper serialization which is on the radar. In the meantime, the recommendation is to us the script you used to generate the figure as the serialization. |
What about enabling this only when verbose-debug is set? This would make the issues you've mentioned reasonably clear. |
I am with Thomas on this one as a general rule, but, perhaps this could be On Thu, Nov 20, 2014 at 12:46 PM, Antony Lee notifications@github.com
|
In that case I would advocate putting all of your plotting in to functions ax = plt.gca() # or where ever you want to get it from
for fun, d, s in my_serialization:
fun(ax, d, s) This is probably a more stable serialization anyway as now you can upgrade You could probably even do one better and only have to serialize a This of course might be a major refactor on your end... On Thu, Nov 20, 2014, 12:46 Antony Lee notifications@github.com wrote:
|
The requirement for a major refactor on my side (well, not so major in fact), and the fact that now the saved figures would become dependent on a specific version of my program, are exactly the issues there. Regarding the refactor, if this was to be implemented on the matplotlib side of things, I guess all we need is to add an entry in Regarding the version pinning, I would say that matplotlib is way more stable than anything I'll ever write, and it is much easier for me to write down "use matplotlib==1.4 to be load this figure" (at worst I need to set up a virtualenv) than "check out my code at commit g1234567 to load this figure". |
It would be nice if it was possible to save figures as pickles using the save button of the default UI toolbar.
The text was updated successfully, but these errors were encountered: