Enforce the use of `deprecated-removed` in docs

Open
#92,564 12 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Domain
documentation

Research direction

Start by rerunning the documented grep counts for deprecated:: and deprecated-removed:: across the .rst files, then review the related work in #92308. The issue's checklist indicates that completion would require setting removal versions, considering automation, and deciding whether to deprecate the older directive.

Written by the indexing model from the issue text.

Description

3.10 3.11 3.12 3.9 (EOL) docs type-feature

In the docs we have two directives that can be used to document deprecations: deprecated and deprecated-removed.

I think we should always prefer the latter:

  • it will make it easier to track and document removals
  • it will give people a target, so they can plan around it

Even if the removal version gets postponed, it's better to postpone than to say that something is deprecated and then just remove it at an unspecified time in the future.

Currently deprecated is more commonly used:

$ grep -r 'deprecated::' --include=*.rst | wc -l
226
$ grep -r 'deprecated-removed::' --include=*.rst | wc -l
30
  • set removal version for deprecated features using deprecated-removed
  • automate the documentation of deprecations (see also #92308)
  • possibly deprecate the deprecated directive and replace it with deprecated-removed
Dominant language
Python
Stars
77.2k
Forks
36k
Avg merge
1d 9h
Merged PRs (30d)
558

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/cpython

All issues in python/cpython

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.