Add rst/sphinx ".. deprecated::" directive to docs in Deprecating Code guidance
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
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_monitorsetting in CherryPy, is no longer supported in CherryPy versions >= 12.0.0.
Source code of above example:
The docs need to be updated here:
Additional context
Include examples, and provide best practice for function deprecation vs. arg/option deprecations, perhaps?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with doc/topics/development/deprecations.rst and compare its current guidance with the linked salt.netapi.rest_cherrypy example in app.py lines 109-117. Update the documentation to explain the .. deprecated:: directive, include examples, and distinguish function deprecation from argument or option deprecation; the documentation should clearly describe the recommended practice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100