Improve deprecation documentation. Closes #7643#7646
Improve deprecation documentation. Closes #7643#7646tacaswell merged 3 commits intomatplotlib:masterfrom
Conversation
|
LGTM. Thanks for the patch! |
|
My reading of the deprecation decorator code is that if you want to use your own message, you would normally include some format strings. At present I think your PR is discarding the version information. Actually, it looks to me like the underlying _generate_deprecation_message is broken by indentation errors, at the very least... It is not doing the substitutions it should if a message is given. |
|
@efiring There are two deprecation messages. Which one are you talking about? |
|
Both of them. Same problem. The first one could be helpful if it included the necessary format strings, and if the _generate_deprecation_message bug were fixed. The second one is pointless, providing less information than what it replaces. |
|
The deprecation messages don't strike me as being less informative. IMO, it is quite the opposite. |
|
@NelleV you are correct; given that the decorator replaces the default message with the one supplied as an argument, ignoring all other arguments, this PR does provide more information. I had an incorrect expectation of what the decorator would do in this case. (Nevertheless, it is broken in that it can't presently be used as intended, taking advantage of its arguments via format strings in the message). |
|
Yes, I noticed last night that the format string magic wasn't working. |
|
appveyor failure looks transient. |
DOC: Improve deprecation documentation (hold and spectral) Closes #7643
|
Thanks @ngoldbaum ! backported to v2.x as 4f0d2ee |
|
See also #7651. |
This improves the deprecation warnings printed by
axes.holdandplt.holdand adds a mention of the deprecation of thespectralcolormap to the API changes document.