Allow savefig to save SVGs on FIPS enabled systems #18192#18193
Allow savefig to save SVGs on FIPS enabled systems #18192#18193jkseppan merged 2 commits intomatplotlib:masterfrom
Conversation
dstansby
left a comment
There was a problem hiding this comment.
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 |
jklymak
left a comment
There was a problem hiding this comment.
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.savefigto save an image in SVG format. This is because theRenderSVG._make_idmethod takes the first 10 characters of ahashlib.md5digest 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