Repository navigation
Conversation
7 tasks
7 tasks
Member
Author
|
Closing for #19603 |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Alternative to #19588, closes #19578
This simply makes
lib/matplotlib/mpl-data/matplotlibrcthe file under source control and soft-links back tomatplotlibrc.template.setup.pynow modifies the file in place if the backend needs to be edited.More detail:
Previously
matplotlibrc.templatewas changed in #15029 to be the canonical place to get the defaults for all the rcParams. However, these were read during__init__.pyfromlib/matplotlib/mpl-data/matplotlibrc.lib/matplotlib/mpl-data/matplotlibrcdoesn't exist in the repo, and only gets created whensetup.pyis called. We can't read the defaults frommatplotlbrc.templatebecause that file probably doesn't exist in most user installs.Aside from being somewhat rickety, the problem is that developers working from an editable install don't want to always call
setup.pyas it requires compiling the C extensions, and hence theirlib/matplotlib/mpl-data/matplotlibrccan get out of sync with the library.The solution here is to simply make
lib/matplotlib/mpl-data/matplotlibrcthe canonical source of the defaults, add it to version control, and softlink it tomatplotlib.template.setup.pycan changelib/matplotlib/mpl-data/matplotlibrcin-place (I think)See also:
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).