Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-135552: Add tests that check if weakref for tp_subclasses cleared after finalization#136304
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-135552: Add tests that check if weakref for tp_subclasses cleared after finalization#136304
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sergey-miryanov commentedJul 4, 2025
I believe this PR should skip news |
Uh oh!
There was an error while loading.Please reload this page.
nascheme commentedJul 8, 2025
This looks okay to me. Some suggested improvements. The new test might fit better into I don't think it's required to run these in a separate Python process. That makes the test run slower and it's not supposed to crash. Generally a separate process is used for the tests that exercise the interpreter shutdown logic and we are not testing that. So you could just do: I find the variable naming a bit esoteric. I would have just called them |
sergey-miryanov commentedJul 8, 2025
@nascheme Thanks for review! Fixed. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
sergey-miryanov commentedJul 8, 2025
@kumaraditya303 Thanks for review! |
Types are not treated specially, it only matters if the weakref has a callback or not.
25518f5 intopython:mainUh oh!
There was an error while loading.Please reload this page.
sergey-miryanov commentedAug 8, 2025
Thanks everyone! |
These are tests to ensure behaviour introduced bypythonGH-136189 is working as expected.Co-authored-by: Mikhail Borisov <43937008+fxeqxmulfx@users.noreply.github.com>Co-authored-by: Kumar Aditya <kumaraditya@python.org>Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Uh oh!
There was an error while loading.Please reload this page.
Tests for#136189