Skip to content

gh-162092: Fix test_check_interned() of test_capi - #162099

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:interned
Nov 16, 2026
Merged

vstinner merged 2 commits into
python:mainfrom
vstinner:interned

Conversation

@vstinner

@vstinner vstinner commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Fix fresh_string() for Free Threaded build to make sure that the string is not interned.

Fix fresh_string() for Free Threaded build to make sure that the
string is not  interned.

Co-authored-by: Maik Schulze <maik.schulze.cv@googlemail.com>
@vstinner

Copy link
Copy Markdown
Member Author

Without this change, test_check_interned() failed when running #162092 (comment).

With this change, it no longer fails.

@vstinner

vstinner commented Nov 16, 2026 •

Copy link
Copy Markdown
Member Author

@maikschulze: Can you double check that the change fix your issue?

@maikschulze maikschulze left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, it fixes it, thanks!. fresh_string() is the better place.

A small typo in the new comment: "the string in interned" should be "the string is interned".

Comment thread Lib/test/test_capi/test_unicode.py Resolved
@vstinner
vstinner enabled auto-merge (squash) November 16, 2026 15:22
@vstinner

Copy link
Copy Markdown
Member Author

Yes, it fixes it, thanks!. fresh_string() is the better place.

Thanks for testing.

A small typo in the new comment: "the string in interned" should be "the string is interned".

Oops, fixed!

@vstinner
vstinner merged commit f4c13c8 into python:main Nov 16, 2026
51 checks passed
@vstinner
vstinner deleted the interned branch November 16, 2026 16:03
@miss-islington-app

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Nov 16, 2026

Copy link
Copy Markdown

GH-162118 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Nov 16, 2026
@bedevere-app

bedevere-app Bot commented Nov 16, 2026

Copy link
Copy Markdown

GH-162119 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 Nov 16, 2026
vstinner added a commit that referenced this pull request Nov 16, 2026
…162118)

gh-162092: Fix test_check_interned() of test_capi (GH-162099)

Fix fresh_string() for Free Threaded build to make sure that the
string is not  interned.
(cherry picked from commit f4c13c8)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Maik Schulze <maik.schulze.cv@googlemail.com>
vstinner added a commit that referenced this pull request Nov 16, 2026
…162119)

gh-162092: Fix test_check_interned() of test_capi (GH-162099)

Fix fresh_string() for Free Threaded build to make sure that the
string is not  interned.
(cherry picked from commit f4c13c8)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Maik Schulze <maik.schulze.cv@googlemail.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.

2 participants