Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesburycolesbury commented May 9, 2024

Avoid immortalizing objects in tests that verify garbage collection of classes or modules.

This fixes test_ordered_dict and test_struct.

Avoid immortalizing objects in some tests that test behavior of collecting classes or modules. This fixes test_ordered_dict and test_struct.
@colesbury
Copy link
ContributorAuthor

cc @hroncok - I'll look at the other tests next, but this should be enough to fix the PGO build.

@hroncok
Copy link
Contributor

but this should be enough to fix the PGO build.

Indeed it is. Thanks.

Copy link
Contributor

@DinoVDinoV left a comment

Choose a reason for hiding this comment

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

LGTM!

@colesburycolesbury merged commit 1b1db2f into python:mainMay 9, 2024
@miss-islington-app
Copy link

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@colesburycolesbury deleted the gh-118846-pgo-tests branch May 9, 2024 20:06
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2024
Avoid immortalizing objects in tests that verify garbage collection of classes or modules. This fixes test_ordered_dict and test_struct. (cherry picked from commit 1b1db2f) Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app
Copy link

GH-118867 is a backport of this pull request to the 3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13 bugs and security fixes label May 9, 2024
colesbury added a commit that referenced this pull request May 9, 2024
…118867) Avoid immortalizing objects in tests that verify garbage collection of classes or modules. This fixes test_ordered_dict and test_struct. (cherry picked from commit 1b1db2f) Co-authored-by: Sam Gross <colesbury@gmail.com>
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 10, 2024
Avoid immortalizing objects in tests that verify garbage collection of classes or modules. This fixes test_ordered_dict and test_struct.
@JelleZijlstraJelleZijlstra mentioned this pull request May 28, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dirtopic-free-threading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@colesbury@hroncok@DinoV