| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Thanks for the contribution.
Please also check whether there are other parts of the documentation that may need an update: https://matplotlib.org/stable/search.html?q=MPLCONFIGDIR
Sorry, something went wrong.
|
Thanks for the review @timhoffm! I've addressed both suggestions: switched to pathlib for mkdir and added an explicit assertion for the expected configdir path. |
Sorry, something went wrong.
| # Clear cached values | ||
| matplotlib.get_configdir.cache_clear() | ||
| matplotlib.get_cachedir.cache_clear() |
There was a problem hiding this comment.
This does not work. But why do you need it? You run get_configdir() in a separate subprocess.
Sorry, something went wrong.
|
What is the path for back compatibility? We do not want to break users that have config they are relying on reading without warning and allow users to switch version of mpl without having to duplicate their config. |
Sorry, something went wrong.
|
Thanks @timhoffm and @tacaswell for the feedback. Changes made:
|
Sorry, something went wrong.
|
This compatibility looks reasonable to me. We can later decide whether we want to actively push towards the new location. |
Sorry, something went wrong.
|
The fallback logic all looks correct to me, but could you please add a test for the case where %USERPROFILE%.matplotlib already exists? That wouldn't otherwise be exercised in CI, and I don't think too many of us on the dev team are on windows to verify that the migration is working. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks like you need to rebase to main, but otherwise this looks good to me. Thanks for putting it together!
Sorry, something went wrong.
|
Actually it looks like CI was unhappy for some other reason. Please rebase or re-push to kick off the tests again, and I'll merge after they pass. |
Sorry, something went wrong.
|
There's a script issue in the step "Filter C coverage". |
Sorry, something went wrong.
|
@VedantMadane Can you please squash this to one commit? I agree with @QuLogic there is a bunch of thrashing on tests.yml that is added and then removed. |
Sorry, something went wrong.
|
@tacaswell if everything else is ok, can't we just squash-merge? |
Sorry, something went wrong.
|
Technically yes. Either way I would like some clarity from @VedantMadane about what the (undone) changes were trying to do. |
Sorry, something went wrong.
@tacaswell some test for other other operating system was failing. I worked on Windows specific functionality and was unsure how it could affect other OS' tests. I looked around other PRs to find if this was a problem with the test itself or something I did which was inadvertently affecting those. I was experimenting with things I could do to get the tests to pass. These were the changes that I later reverted. |
Sorry, something went wrong.
On Windows, the default configuration and cache directories now use %LOCALAPPDATA%\matplotlib instead of %USERPROFILE%\.matplotlib, following Windows application data storage conventions. This PR adds backwards compatibility by checking if %USERPROFILE%\.matplotlib already exists before using the new location. Closes matplotlib#20779
|
Thanks @VedantMadane! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again. |
Sorry, something went wrong.
PR: matplotlib#30975 Issue: matplotlib#20779 Base commit: b83305e Changed lines: 85
| Back | FazBrowse Home | New Git URL |
Summary
On Windows, the default configuration and cache directories now use %LOCALAPPDATA%\matplotlib instead of %USERPROFILE%\.matplotlib, following Windows application data storage conventions.
This addresses the issue where matplotlib was placing its config folder directly in the user's home directory (%USERPROFILE%), which is not the recommended location on Windows.
Changes
References
Closes #20779