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
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Cercare test_c_subclass_of_heap_ctype_with_tpdealloc_decrefs_once e test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once, quindi ispezionare il codice C di supporto utilizzato da questi test. Eseguire il refactoring dei test e del supporto C in modo che verifichino che gli scenari non causino crash invece di controllare i conteggi dei riferimenti; eseguire i test interessati per confermare questo comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c, python
- Ambito
- testing
- Tipo di issue
- Refactoring
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100