New issue
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
Warn if a temporary config/cache dir must be created. #15933
Conversation
a19d9c5
to
5837012
Compare
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.
Would be good to have a test that the warning is being thrown, which I guess is possible by setting 'MPLCONFIGDIR' to a path that can't be made
5837012
to
9d2d096
Compare
Ah, good catch re: testability, didn't think of that possibility, done. |
9d2d096
to
095a60c
Compare
a23d4be
to
0cb2ae1
Compare
looks like chmod() doesn't work that easily on Windows (https://docs.python.org/3/library/os.html#os.chmod); possibly fixable but I'm going to claim that a non-writable home directory is sufficiently uncommon on Windows that we can skip the test there (and in any case the actual functionality should still work there). |
@dstansby good to go? |
Paying the cost of regen'ing the font cache on every import seems a bit silly when one can just set MPLCONFIGDIR to a persistent directory. Moreover the tmpdir approach is brittle against forking; this is fixable but somewhat complex to do.
rebased |
0cb2ae1
to
694d69e
Compare
Paying the cost of regen'ing the font cache on every import seems a bit
silly when one can just set MPLCONFIGDIR to a persistent directory.
Moreover the tmpdir approach is brittle against forking; this is fixable
but somewhat complex to do.
Closes #15911, see also #832 (see discussions in both of them).
Edit: also closes #16677.
PR Summary
PR Checklist