Title: Avoid recursion for subclasses of str that are also "PathLike" in to_filehandle() by Nodd · Pull Request #11307 · matplotlib/matplotlib · GitHub
Open Graph Title: Avoid recursion for subclasses of str that are also "PathLike" in to_filehandle() by Nodd · Pull Request #11307 · matplotlib/matplotlib
X Title: Avoid recursion for subclasses of str that are also "PathLike" in to_filehandle() by Nodd · Pull Request #11307 · matplotlib/matplotlib
Description: This is the case for path.py for example. Fixes gh-11306 PR Summary If the path to savefig is both a subclass of str and a PathLike object, to_filehandle() creates an infinite recursion. The PR simplifies the code while avoiding this corner case. PR Checklist Has Pytest style unit tests Code is PEP 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
Open Graph Description: This is the case for path.py for example. Fixes gh-11306 PR Summary If the path to savefig is both a subclass of str and a PathLike object, to_filehandle() creates an infinite recursion. The PR sim...
X Description: This is the case for path.py for example. Fixes gh-11306 PR Summary If the path to savefig is both a subclass of str and a PathLike object, to_filehandle() creates an infinite recursion. The PR sim...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/11307
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:aaf4a3a7-93a2-c25c-59bd-c7ee34488db6 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BED6:2E80A1:1785D08:2220B31:6A562615 |
| html-safe-nonce | 21ff57adf8c229dac6c1521bc655e2ff33a196ced176a261dadd64fa00c71dd5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUQ2OjJFODBBMToxNzg1RDA4OjIyMjBCMzE6NkE1NjI2MTUiLCJ2aXNpdG9yX2lkIjoiOTcxNDI0MjMyOTM1NjYzMTI2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f5a2b4da7e98bc3fd2cd340acea0f1d78314a8ae6f8a90778f75c7bffefdd82a |
| hovercard-subject-tag | pull_request:190526577 |
| 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/11307/files |
| twitter:image | https://avatars.githubusercontent.com/u/506348?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/506348?s=400&v=4 |
| og:image:alt | This is the case for path.py for example. Fixes gh-11306 PR Summary If the path to savefig is both a subclass of str and a PathLike object, to_filehandle() creates an infinite recursion. The PR sim... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | eeb71977be324ce2bc7c4afd597296b8e3527d8922ad94632edd7a7296f8031b |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3e7957744c8a44d05ff1e464dc5d119e60b98fae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width