Make `test_c_subclass_of_heap_ctype_with_tpdealloc_decrefs_once` and `test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once` behavioral tests
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
Proposal:
The test_c_subclass_of_heap_ctype_with_tpdealloc_decrefs_once and test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once tests were added to verify that we don't decref a type object too many times when destroying an instance of the type in certain scenarios. The tests currently verify this by checking reference counts. This is sensitive to implementation details and likely to break in the future. To make this more robust, we'd like to refactor the tests and supporting C code to verify that we don't crash (a symptom of decrefing too many times).
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
test_c_subclass_of_heap_ctype_with_tpdealloc_decrefs_once と test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once を検索し、その後、これらのテストで使用されている補助 C コードを調査します。テストと C のサポートコードをリファクタリングし、参照カウントを確認するのではなく、シナリオがクラッシュしないことを検証するようにします。影響を受けるテストを実行して、この動作を確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- c, python
- 領域
- testing
- issue の種類
- リファクタリング
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100