Add tests for setting and deleting attributes defined in C
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
CPython defines 375 attributes with PyMemberDef and PyGetSetDef (excluding the _test* modules), but the test suite never assigns to 187 of them and never deletes 332 of them.
Deletion in particular is almost untested, although it is a separate code path: the setter is called with NULL, and an implementation which does not expect this crashes or leaves the object in a broken state.
Three bugs found this way are gh-156099, gh-156100 and gh-156101; gh-152817 is another one.
The following PR adds writing and deleting tests for each writable attribute.
Linked PRs
- gh-156107
- gh-156184
- gh-156191
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、PyMemberDef と PyGetSetDef で定義された属性に対する CPython のテストカバレッジを見つけます。書き込み可能な属性が現在どのように代入・削除されているかを確認し、報告されている不足箇所と既存のテストを使って、各書き込み可能な属性をカバーします。すべての書き込み可能な属性について、クラッシュや壊れたオブジェクトなしに代入と削除がテストされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, python
- 領域
- testing-qa
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 20/100