-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Allow savefig to save SVGs on FIPS enabled systems #18192 #18193
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable approach. Is this injected into the .svg files? If so it would be good to add a quick note to doc/api/next_api_changes/behavior
to say that the contents will be slightly different, just in case there is anybody comparing the hashes of matplotlib generated .svg files.
Ok. I can update that and add it to the pull request.
…On Thu, Aug 6, 2020 at 5:20 PM David Stansby ***@***.***> wrote:
***@***.**** commented on this pull request.
Seems like a reasonable approach. Is this injected into the .svg files? If
so it would be good to add a quick note to
doc/api/next_api_changes/behavior to say that the contents will be
slightly different, just in case there is anybody comparing the hashes of
matplotlib generated .svg files.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18193 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJTWIZER3MDYG477B3Y6KDR7MNCRANCNFSM4PWSKEPA>
.
|
Alright I've added a file to the |
bf4b626
to
950302d
Compare
950302d
to
47a0430
Compare
I re-wrote the behavior change note to no longer reference the private method. I was also previously getting an error from the circleci doc tests that I think was from the warnings Sphinx gave about my references to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fine to me. I don't know that it really needs an API change note - the origin of the hash is just an implementation detail of the unique ID, and its not like the user needs to know that. But, I guess it doesn't hurt.
Thanks @daytonb! |
It's been a pleasure! |
PR Summary
This pull request resolves #18192.
If you use a FIPS (Federal Information Processing Standards) enabled system, then you cannot use
plt.savefig
to save an image in SVG format. This is because theRenderSVG._make_id
method takes the first 10 characters of ahashlib.md5
digest of entries in the SVG as the ID for entries in the SVG file.The Python docs for hashlib includes the following note:
PR Checklist
- Not sure if this is applicable to my change
- Not a major feature