Title: Move required_interactive_framework to canvas class. by anntzer · Pull Request #14521 · matplotlib/matplotlib · GitHub
Open Graph Title: Move required_interactive_framework to canvas class. by anntzer · Pull Request #14521 · matplotlib/matplotlib
X Title: Move required_interactive_framework to canvas class. by anntzer · Pull Request #14521 · matplotlib/matplotlib
Description: In mpl 3.0, the required_interactive_framework attribute was added to backend modules. However, it is sometimes required to access it from a canvas instance (e.g. in _fix_ipython_backend2gui), but the pattern sys.modules[cls.__module__].required_interactive_framework is brittle (e.g. it is broken by third-party subclasses). Instead it makes more sense to put the attribute on the canvas class; one can easily and robustly go from the backend module to the canvas class by accessing the FigureCanvas attribute. xref https://gitter.im/matplotlib/matplotlib?at=5ced522cef853135c83ae7d6, #14426. Milestoned as 3.2 as the API is still quite new so the earlier we fix it, the better. PR Summary PR Checklist Has Pytest style unit tests Code is Flake 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: In mpl 3.0, the required_interactive_framework attribute was added to backend modules. However, it is sometimes required to access it from a canvas instance (e.g. in _fix_ipython_backend2gui), but...
X Description: In mpl 3.0, the required_interactive_framework attribute was added to backend modules. However, it is sometimes required to access it from a canvas instance (e.g. in _fix_ipython_backend2gui), but...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/14521
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:81e5aed7-cbf1-aaf1-e883-d33ff618aafe |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 90CE:179C7:5B273E:7BD221:6A569694 |
| html-safe-nonce | be8aa3c19376c0d56529a5a196a40fc19e4eaf526adfd8ae86ea01f8ea1a5042 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MENFOjE3OUM3OjVCMjczRTo3QkQyMjE6NkE1Njk2OTQiLCJ2aXNpdG9yX2lkIjoiNTcyMjY2OTM4OTY3MDk0NjQ1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e16484e8d223d39791133d446025c37a04c3f675166abbd852d1ccd53a4f8ad0 |
| hovercard-subject-tag | pull_request:286755211 |
| 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/14521/files |
| twitter:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| og:image:alt | In mpl 3.0, the required_interactive_framework attribute was added to backend modules. However, it is sometimes required to access it from a canvas instance (e.g. in _fix_ipython_backend2gui), but... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 647a25f437e2f54eccdd162bd007c8ae70f4235c4125dba0f4518747cc8b9615 |
| 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 | 05adb86a60ce3d701e556eded3ab26300ec6bcc4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width