Document the workflow for deprecating something in CPython.
まだ誰も着手していません。
- #1469 @Lincoln-developer による — マージされずにクローズ
- 主要言語
- Python
- スター
- 2.1k
- フォーク
- 1k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 12
説明
Describe the enhancement or feature you'd like
Document the workflow on how to deprecate something in CPython.
Deprecating something in Python involves raising deprecation warning and then actually removing the code some time later (at least 2 release cycles). We don't have this process documented clearly.
Describe alternatives you've considered
Currently this is undocumented process, and each of us has to just figure it out somehow.
Additional context
Discussed on Discord core-workflow-and-bots channel, and now opening a ticket based on the discussions.
Basic process:
- An issue was opened calling for deprecation of something
- We deprecate the code by adding warnings.deprecated (or warnings._deprecated)
- Document the deprecation. Needs a Porting doc (how?)
- The issue can be closed after the code for adding deprecation has been merged. It doesn't need to stay open for 2+ more years.
- Add the deprecation to the
pending-removal-in....rstfile - At the scheduled removal year, open a new issue for the removal
- Finally remove the code
Other info:
- Some deprecations don't have set removal date.
- There are also deprecated-removed Sphinx role to help advertise the removal dates.
- How to decide whether Removal/Deprecation is the right solution?
- search the usage, search on GitHub, grep, check PyPI projects to get an idea of the widespread usage
- when searching, look not just if people are using it, but how they're using it. Document the use case for the porting notes
- Is there a template for deprecation warning message?
- Should have documentation about how to port/replace it (porting notes)
- Users are encouraged to give feedback about deprecation by filing an issue
Note there is an open proposal for extending the removal of deprecated code to 5 years instead of 2.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、この issue で提案されているワークフロー、Porting ドキュメント、および deprecated-removed Sphinx ロールを含む pending-removal-in....rst ファイルを確認します。完了した作業では、非推奨化の決定、警告と移植に関するガイダンス、削除時期、フィードバックプロセス、および削除日が固定されていない非推奨項目の扱いを文書化する必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100