Skip to content

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Nov 4, 2018

PR Summary

This PR moves the deprecation note, that is generated by @deprecated from the top of the docstring to the bottom.

The issue with the top position is that the first line should contain a description of the function. This place is currently taken over by the deprecation note. Tools that extract a summary sentence with thus pick up the note, e.g. autosummary:

grafik

All deprecated elements that I've checked have quite a short docstring so that there's no significant change in visibility of the deprecation note in the rendered HTML docs.

Before:
grafik

After:
grafik

Copy link
Member

@ImportanceOfBeingErnest ImportanceOfBeingErnest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Although it might also be useful to see if a function is deprecated already within the list of functions.
Might there be a solution to this?

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a clear improvement. @ImportanceOfBeingErnest I'll let you open a new issue regarding your comment :) (which is reasonable, but perhaps that's the kind of things that should go to sphinx.ext.autosummary?)

@anntzer anntzer merged commit 2f796c4 into matplotlib:master Nov 4, 2018
@anntzer anntzer added this to the v3.1 milestone Nov 4, 2018
@timhoffm timhoffm deleted the move-deprecation-message-down branch November 4, 2018 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants