Enforce the use of `deprecated-removed` in docs

未关闭
#92,564 12 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
领域
documentation

调研方向

首先,在 .rst 文件中重新运行针对 deprecated::deprecated-removed:: 的 grep 计数,然后查看 #92308 中的相关工作。该 issue 的检查清单表明,要完成这项工作,需要设置移除版本、考虑自动化,并决定是否将较旧的指令标记为弃用。

由索引模型根据 Issue 内容生成。

描述

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
主要语言
Python
星标
77.2k
派生
36k
平均合并
1 天 9 小时
30 天内合并 PR
558

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

python/cpython 的其他 Issue

查看 python/cpython 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。