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?
Description
Deprecating code, be it functions and args/options, should involve including something similar to the following within their respective function docstrings:
This adds
.. deprecated::Sphinx / rst directives, which render into something like this, using salt.netapi.rest_cherrypy docs as an example, for theexpire_responsesoption:Source code of above example:
salt/salt/netapi/rest_cherrypy/app.py
Lines 109 to 117 in 1a5ce82
The docs need to be updated here:
Additional context
Include examples, and provide best practice for function deprecation vs. arg/option deprecations, perhaps?