Skip to content

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

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

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions