Title: Remove md5 usage to prevent issues on FIPS enabled systems (closes #29603) by martinky24 · Pull Request #29608 · matplotlib/matplotlib · GitHub
Open Graph Title: Remove md5 usage to prevent issues on FIPS enabled systems (closes #29603) by martinky24 · Pull Request #29608 · matplotlib/matplotlib
X Title: Remove md5 usage to prevent issues on FIPS enabled systems (closes #29603) by martinky24 · Pull Request #29608 · matplotlib/matplotlib
Description: PR summary If you use a FIPS (Federal Information Processing Standards) compliant Python install, then you cannot use pyplot.show to display a plot with plt.rcParams['text.usetex'] = True due to a hashlib.md5 call in texmanager.py. Instead of just fixing the one instance I ran into, I changed the other usages of hashlib.md5 in the codebase to nip those in the bud. Per https://docs.python.org/3/library/hashlib.html#hash-algorithms, note that sha256 is in hashlib.algorithms_guaranteed (while md5 might not be), so it seems like a reasonable drop-in-place replacement. Constructors for hash algorithms that are always present in this module are sha1(), sha224(), sha256(), sha384(), sha512(), sha3_224(), sha3_256(), sha3_384(), sha3_512(), shake_128(), shake_256(), blake2b(), and blake2s(). md5() is normally available as well, though it may be missing or blocked if you are using a rare “FIPS compliant” build of Python. These correspond to algorithms_guaranteed. I think that these changes should be entirely transparent to end-users (unless they're on FIPS-enabled systems) and are merely implementation details, and thus do not require documentation changes. Correct me if this understanding is incorrect. PR checklist "closes #29603" is in the body of the PR description to link the related issue [N/A] new and changed code is tested Not sure if this applies quite as heavily, I'd consider all tests passing after to be sufficient. [N/A] Plotting related features are demonstrated in an example [N/A] New Features and API Changes are noted with a directive and release note Documentation complies with general and docstring guidelines
Open Graph Description: PR summary If you use a FIPS (Federal Information Processing Standards) compliant Python install, then you cannot use pyplot.show to display a plot with plt.rcParams['text.usetex'] = True ...
X Description: PR summary If you use a FIPS (Federal Information Processing Standards) compliant Python install, then you cannot use pyplot.show to display a plot with plt.rcParams['text.usetex']...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/29608
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:24492347-2935-409f-c325-f9051b426c9b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D330:221685:BD2F9B:FB38CC:6A519122 |
| html-safe-nonce | 8abcb4880b41f12d66ab220fd8ca0fce90774181e3469a7c0a81217ee1e9532f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzMwOjIyMTY4NTpCRDJGOUI6RkIzOENDOjZBNTE5MTIyIiwidmlzaXRvcl9pZCI6IjcyODk5OTkwNTU4NzQyNjUzNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 38fb19b8a15f6eea383b08c6443550886d8bacdaa249a36f8a4f94000dc414c8 |
| hovercard-subject-tag | pull_request:2330125398 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/pull/29608/files |
| twitter:image | https://avatars.githubusercontent.com/u/35645434?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/35645434?s=400&v=4 |
| og:image:alt | PR summary If you use a FIPS (Federal Information Processing Standards) compliant Python install, then you cannot use pyplot.show to display a plot with plt.rcParams['text.usetex'] = True ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width