Deprecate rcParams["datapath"] in favor of mpl.get_data_path().#16722
Deprecate rcParams["datapath"] in favor of mpl.get_data_path().#16722tacaswell merged 4 commits intomatplotlib:v3.2.xfrom
Conversation
The rcParam cannot be meaningfully set by the end user from their matplotlibrc or Python code. (This is a manual backport to 3.2.x.)
|
@tacaswell I don't think this will help if the user directly assigns to rcParams["datapath"]? |
|
It will not, but I thought the OP was loading it from a file? The other option is to add a flag to suppress checking the rcParams so it works no matter what. |
|
OK, I guess your solution works for that case... |
QuLogic
left a comment
There was a problem hiding this comment.
AFAICT, this correctly raises the deprecation warning and sets the path, but I have a couple questions.
Closes matplotlib#16678 This does a bit of jiggery-pokery to respect the datapath set in the users matplotlibrc. This is going to have an expedited deprecation cycle as we don't think end-users should be setting this rcparam.
5f62526 to
ecd95c4
Compare
Co-Authored-By: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
So this fixes the thing we broke for the OP but does not fully restore the functionality. I am 👍 on this being good enough, but open to the argument we should fully restore the rcparam functionality. |
|
@tacaswell's patch looks fine to me. |
tacaswell
left a comment
There was a problem hiding this comment.
despite my having written a bunch of this.
The rcParam cannot be meaningfully set by the end user from their
matplotlibrc or Python code.
(This is a manual backport to 3.2.x of #16417; see discussion there.)
PR Summary
PR Checklist