Skip to content

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

Merged
vstinner merged 1 commit into
python:mainfrom
tpburns:getallocatedblocksTestCorrection
Jun 3, 2025
Merged

gh-134248 test_getallocatedblocks pre-check to ignore immortalized strings#134871
vstinner merged 1 commit into
python:mainfrom
tpburns:getallocatedblocksTestCorrection

Conversation

@tpburns

@tpburnstpburns commented May 29, 2025

Copy link
Copy Markdown
Contributor

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

python-cla-botBot commented May 29, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

Copy link
Copy Markdown

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.

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

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:mainJun 3, 2025
@vstinnervstinner added the needs backport to 3.14 bugs and security fixes label Jun 3, 2025
@miss-islington-app

Copy link
Copy Markdown

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
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label Jun 3, 2025
@vstinner

Copy link
Copy Markdown
Member

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>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…zed strings (python#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.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…zed strings (python#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.
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
…zed strings (python#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.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tpburns@vstinner@ZeroIntensity