Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #127881

Open
mpage opened this issue Dec 12, 2024 · 0 comments
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@mpage
Copy link
Contributor

mpage commented Dec 12, 2024

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

@mpage mpage added type-feature A feature request or enhancement tests Tests in the Lib/test dir labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant