Clarify `warnings.deprecated` public API
オープン
まだ誰も着手していません。
docs
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Documentation
The current docs only specify that it sets the __deprecated__ attribute on the deprecated item.
Pydantic relies on its full API: the fact that it’s a class, and that its instances have all passed parameters in attributes: deprecated(**kw).__dict__ == kw basically.
Two questions:
- Is that safe or might
deprecatedget e.g. refactored into a function at some point? - Can we subclass it and add parameters? Will type checkers understand this and still mark a
@our_deprecated_subclass(...) def ...as deprecated? See https://github.com/python/typing/issues/2256
maybe related to #138165
Linked PRs
- gh-153879
- gh-154487
- gh-154488
- gh-154489
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
warnings.deprecated の現在のドキュメントから始め、リンクされている PR 153879、154487、154488、154489 を関連する issue 138165 と併せて読んでください。公開クラス、インスタンス属性、サブクラス化の動作、型チェッカーの想定をドキュメント化するか、合意された回答を記録すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100