Skip to content

DOC: Any reason to continue using ..note vs ..deprecated? #7059

Closed

Description

@par2

In the numpdoc guideline, I notice the .. note:: directive is used to mark deprecation warnings in docstrings. However, Sphinx appears to have a .. deprecated:: directive. Should the current use be updated or is there are reason to keep .. note:: as the standard?

Activity

  1. seberg commented on Jan 19, 2016

    @seberg
    Member

    Probably just habit, where ever it originally came from. Changing sounds good to me, pull requests very welcome!

  2. rgommers commented on Jan 19, 2016

    @rgommers
    Member

    That is outdated, the current practice is to decorate a function with np.deprecate. We should probably just change the doc to match reality.

  3. njsmith commented on Jan 19, 2016

    @njsmith
    Member

    That said, np.deprecate possibly should use some sort of admonition
    directive to make its message more visible...

    On Tue, Jan 19, 2016 at 12:54 PM, Ralf Gommers [email protected]
    wrote:

    That is outdated, the current practice is to decorate a function with
    np.deprecate. We should probably just change the doc to match reality.

    —
    Reply to this email directly or view it on GitHub
    #7059 (comment).

    Nathaniel J. Smith -- https://vorpus.org http://vorpus.org

  4. rgommers commented on Jan 19, 2016

    @rgommers
    Member

    that might be good. maybe .. deprecated:: indeed, assuming that that works for Sphinx >=1.2.1 (I've never used it).

  5. sameshl commented on Jul 16, 2019

    @sameshl
    Contributor

    @seberg Is this still a problem. I would like to work on it. As I understand I will have to change all instances of ..note:: directive used for deprecation to ..deprecated:: in the numpy docs?

  6. mattip commented on Jul 16, 2019

    @mattip
    Member

    Correct. Are there many left? They should now be .. deprecated:: <version>

  7. sameshl commented on Jul 16, 2019

    @sameshl
    Contributor

    I checked and found only 2 instances but I am not completely sure if I need to change it for the first one, so you could help me out. They are:

    1. doctests : bool, optional
      .. note:: Not supported
    2. .. note::
      This function is deprecated in NumPy 1.9 to avoid confusion with
      `numpy.linalg.matrix_rank`. The ``ndim`` attribute or function
      should be used instead.
  8. mattip commented on Jul 16, 2019

    @mattip
    Member

    The first one is not a deprecation. The second one (np.rank) is. In fact perhaps the correct thing to do with this is to either remove the function entirely (it has been deprecated since v1.9 five years ago) or give up the deprecation and remove the deprecation note and warning.

  9. sameshl commented on Jul 17, 2019

    @sameshl
    Contributor

    I think as np.rank has been deprecated for more than 5 years now it would make more sense to remove it entirely. I could do that.

  10. mattip commented on Aug 18, 2019

    @mattip
    Member

    Closing. There are no more .. note directives that should be .. deprecate. Please reopen (or just issue a PR) if I am mistaken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions