Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sergey-miryanov
Copy link
Contributor

@sergey-miryanov sergey-miryanov commented Jul 4, 2025

@sergey-miryanov
Copy link
Contributor Author

I believe this PR should skip news

Comment on lines +1201 to +1202
assert b"Instance weakref is not None" not in stderr
assert b"Type weakref is not Class" not in stderr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know the issue, but the "not in" assertions look unreliable. The test will pass forever once the strings are accidentally changed. Also, any reason not to use self.assert*()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants