Skip to content

Add rst/sphinx ".. deprecated::" directive to docs in Deprecating Code guidance #58208

Closed as not planned

Description

@ScriptAutomate

Description
Deprecating code, be it functions and args/options, should involve including something similar to the following within their respective function docstrings:

.. deprecated:: 3002,3001.1
    This function is deprecated. Please use ``new_function()`` instead.

This adds .. deprecated:: Sphinx / rst directives, which render into something like this, using salt.netapi.rest_cherrypy docs as an example, for the expire_responses option:

Deprecated since version 2016.11.9,2017.7.3,2018.3.0: The "expire_responses" configuration setting, which corresponds to the timeout_monitor setting in CherryPy, is no longer supported in CherryPy versions >= 12.0.0.

Source code of above example:

expire_responses : True
Whether to check for and kill HTTP responses that have exceeded the
default timeout.
.. deprecated:: 2016.11.9,2017.7.3,2018.3.0
The "expire_responses" configuration setting, which corresponds
to the ``timeout_monitor`` setting in CherryPy, is no longer
supported in CherryPy versions >= 12.0.0.

The docs need to be updated here:

Additional context

Include examples, and provide best practice for function deprecation vs. arg/option deprecations, perhaps?

Activity

  1. added
    documentation
    doc-rework
    on Aug 14, 2020
  2. added this to the Approved milestone on Aug 17, 2020
  3. 42 remaining items

  4. added
    severity-medium
    on Mar 21, 2022
  5. dwoz commented on Oct 15, 2026

    @dwoz
    Contributor

    Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.

    Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.

    If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.

  6. dwoz commented on Oct 17, 2026

    @dwoz
    Contributor

    Reopening — there is an open PR tracking a fix for this: #69549.

  7. reopened this on Oct 17, 2026
  8. dwoz commented on Oct 28, 2026

    @dwoz
    Contributor

    Closing — consolidated into #70585. The checkbox for this item is in the appropriate theme section of that tracker. Please pick up the sub-item there.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Deprecationdoc-reworkdocumentationseverity-mediumtime-estimate-long-term

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions