| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| ``rcParams._get("backend")`` | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| ``rcParams._get("backend")`` is deprecated. Instead, use the public API | ||
| ``matplotlib.get_backend(auto_select=False)`` to retrieve the current | ||
| backend without triggering backend resolution. This API is available since | ||
| Matplotlib 3.10. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -712,6 +712,14 @@ def _get(self, key): | |
|
|
||
| :meta public: | ||
| """ | ||
| if key == "backend": | ||
| _api.warn_deprecated( | ||
| "rcParams._get('backend') is deprecated since Matplotlib 3.11. " | ||
| "Use matplotlib.get_backend(auto_select=False) instead, which is " | ||
| "available since Matplotlib 3.10.", | ||
| ) | ||
| # TODO: When removing this, also remove the suppression context in | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityWhat is "this"? The comment is in an odd spot to decide if it's the if, the warning, or the whole method.
Sorry, something went wrong.
All reactions
|
||
| # RcParams.copy | ||
| return dict.__getitem__(self, key) | ||
|
|
||
| def _update_raw(self, other_params): | ||
| Expand Down Expand Up | @@ -813,8 +821,11 @@ def find_all(self, pattern): | |
| def copy(self): | ||
| """Copy this RcParams instance.""" | ||
| rccopy = self.__class__() | ||
| for k in self: # Skip deprecations and revalidation. | ||
| rccopy._set(k, self._get(k)) | ||
| with _api.suppress_matplotlib_deprecation_warning(): | ||
| # the suppression context is specifically for _get("backend"). This | ||
| # can be removed again, when "backend" is not a valid rcParam anymore. | ||
| for k in self: # Skip deprecations and revalidation. | ||
| rccopy._set(k, self._get(k)) | ||
| return rccopy | ||
|
|
||
|
|
||
| Expand Down Expand Up | @@ -1278,23 +1289,14 @@ def get_backend(*, auto_select=True): | |
|
|
||
| .. versionadded:: 3.10 | ||
|
|
||
| .. admonition:: Provisional | ||
|
|
||
| The *auto_select* flag is provisional. It may be changed or removed | ||
| without prior warning. | ||
|
|
||
| See Also | ||
| -------- | ||
| matplotlib.use | ||
| """ | ||
| if auto_select: | ||
| return rcParams['backend'] | ||
| else: | ||
| backend = rcParams._get('backend') | ||
| if backend is rcsetup._auto_backend_sentinel: | ||
| return None | ||
| else: | ||
| return backend | ||
| return rcParams._get_backend_or_none() | ||
|
|
||
|
|
||
| def interactive(b): | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe first arg is since, not the full message.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityPlease bump to 3.12 as well.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.