FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MNT: Remove internal usage of the 'backend' key in rcParams by timhoffm · Pull Request #32495 · matplotlib/matplotlib · GitHub

Repository navigation

MNT: Remove internal usage of the 'backend' key in rcParams - #32495

Draft
timhoffm wants to merge 1 commit into
matplotlib:mainfrom
timhoffm:rcparams-remove-backend-key-usage
Draft

timhoffm wants to merge 1 commit into
matplotlib:mainfrom
timhoffm:rcparams-remove-backend-key-usage

Conversation

timhoffm commented Oct 17, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

PR summary

Working towards #31791.

This removes most internal usages of the 'backend' key (some usage in tests is still in place because I have to decide there whether we still want to test the key API).

It's conceptually a schematic replacement

  • rcParams._get('backend') -> rcParams._backend - obtain raw backend value
  • x = rcParams['backend'] -> x = rcParams._get_backend_resolved() - obtain resoved backend
  • rcParams['backend'] = x -> rcParams._backend = x - store the value. Note that this write had no specific logic attatched. It's only be used to store the new backend value.

Note: There have been some places writing rcParamsDefault['backend'] and rcParamsOrig['backend']. These were needed to synchronize and persist backend information even after resetting rcParams. That's not needed anymore and thus removed now that the backend information only exists once as class attribute on RcParams.

Note2: In theory it would even be better to use RcParams._backend rather than access via instance rcParams._backend backend. I've not done that for now, because it would complicate the PR. We may do this in a followup.

AI Disclosure

No AI.

PR quality check

  • Use an expressive title, e.g. "Fix title font property precedence"
  • New and changed code is tested
  • N/A Plotting related features are demonstrated in an example
  • N/A New features and API changes have release notes
  • N/A Documentation complies with general and docstring guidelines

timhoffm force-pushed the rcparams-remove-backend-key-usage branch 3 times, most recently from 271de55 to 9409506 Compare October 17, 2026 08:36
timhoffm marked this pull request as draft October 18, 2026 02:29
timhoffm force-pushed the rcparams-remove-backend-key-usage branch from 9409506 to 16b40f1 Compare October 18, 2026 20:17

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL