Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Improve deprecation documentation. Closes #7643 #7646
Conversation
NelleV
changed the title from
Improve deprecation documentation. Closes #7643 to [MRG+1] Improve deprecation documentation. Closes #7643
Dec 20, 2016
NelleV
added this to the
2.0 (style change major release)
milestone
Dec 20, 2016
|
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. |
tacaswell
merged commit c34ddc4
into matplotlib:master
Dec 20, 2016
tacaswell
added a commit
that referenced
this pull request
Dec 20, 2016
|
|
tacaswell |
4f0d2ee
|
|
Thanks @ngoldbaum ! backported to v2.x as 4f0d2ee |
|
See also #7651. |
ngoldbaum commentedDec 20, 2016
This improves the deprecation warnings printed by
axes.holdandplt.holdand adds a mention of the deprecation of thespectralcolormap to the API changes document.