Skip to content

gh-134248 test_getallocatedblocks pre-check to ignore immortalized strings #134871

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

tpburns
Copy link
Contributor

@tpburns tpburns commented May 29, 2025

When sanity checking against gettotalrefcount we exclude the blocks for immortalized strings since their references are not tracked/reported. This now matches refleak.py's book-keeping using the same functions.

As such, the current state of the PR is that the check is never skipped - to be be adjusted as needed given CI results and/or feedback.

…zed strings

When sanity checking against gettotalrefcount we exclude the blocks for
immortalized strings since their references are not tracked/reported. This
now matches refleak.py's book-keeping using the same functions.
@python-cla-bot
Copy link

python-cla-bot bot commented May 29, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented May 29, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. It makes sense to use sys.getunicodeinternedsize() here.

@vstinner vstinner merged commit 54ca559 into python:main Jun 3, 2025
48 checks passed
@vstinner vstinner added the needs backport to 3.14 bugs and security fixes label Jun 3, 2025
@miss-islington-app
Copy link

Thanks @tpburns for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 3, 2025
…zed strings (pythonGH-134871)

When sanity checking against gettotalrefcount(), we exclude the blocks for
immortalized strings since their references are not tracked/reported. This
now matches refleak.py's book-keeping using the same functions.
(cherry picked from commit 54ca559)

Co-authored-by: tpburns <trevorpburns@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 3, 2025

GH-135095 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jun 3, 2025
@vstinner
Copy link
Member

vstinner commented Jun 3, 2025

Merged, thank you.

vstinner pushed a commit that referenced this pull request Jun 3, 2025
…ized strings (GH-134871) (#135095)

gh-134248 test_getallocatedblocks pre-check to ignore immortalized strings (GH-134871)

When sanity checking against gettotalrefcount(), we exclude the blocks for
immortalized strings since their references are not tracked/reported. This
now matches refleak.py's book-keeping using the same functions.
(cherry picked from commit 54ca559)

Co-authored-by: tpburns <trevorpburns@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants