Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-144161: Clarify additional immortalization in free-threaded build#144176

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@HernaniSamuel
Copy link

@HernaniSamuelHernaniSamuel commentedJan 23, 2026
edited by github-actionsbot
Loading

Clarify that the objects listed in the free-threading HOWTO are additional immortalizations specific to the free-threaded build.

This addresses the inconsistency reported in#144161, wheresys.intern() documentation states that interned strings are not immortal, while the free-threading HOWTO suggested otherwise. Both are correct for their respective contexts (default vs. free-threaded builds).

Changes follow the suggestion by@Prometheus3375 in the issue discussion.


📚 Documentation preview 📚:https://cpython-previews--144176.org.readthedocs.build/

…buildClarify that the objects listed in the free-threading HOWTO areadditional immortalizations specific to the free-threaded build.This addresses the inconsistency with sys.intern() documentation,which describes the default (mortal) behavior.
@python-cla-bot
Copy link

python-cla-botbot commentedJan 23, 2026
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

Copy link
Contributor

@sharktidesharktide left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

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

I think it would make much more sense to just add a note tosys.intern andPyUnicode_InternInPlace saying that the free-threaded build makes all interned strings immortal.

Prometheus3375

This comment was marked as outdated.

You must keep a reference to the result to benefit from interning.
..note::
On the free-threaded build, all interned strings are:term:`immortal`.

Choose a reason for hiding this comment

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

Sorry I messed up the suggestion, the right term is "free threading":

Suggested change
On the free-threaded build, all interned strings are:term:`immortal`.
On the:term:`freethreaded <free threading>` build, all interned strings are:term:`immortal`.

Prometheus3375

This comment was marked as outdated.

@Prometheus3375

This comment was marked as outdated.

@ZeroIntensity
Copy link
Member

Phrase "free-threaded" is usually used with hyphen between the words, but in suggestion by ZeroIntensity it was left out.

"free threaded" is the more common spelling in the docs:

Prometheus3375 reacted with thumbs up emoji

@vstinner
Copy link
Member

"free threaded" is the more common spelling in the docs

I confirm. No hyphen should be used, see the issuegh-144277.

@Prometheus3375
Copy link
Contributor

In this PR preposition was changed from "in the free threaded build" to "on the free threaded build". I believe that "in" is more correct because it can be rephrased as "inside the free threaded build" unlike "on" version. Quick check with LLM also told me that, but perhaps I am missing something.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ZeroIntensityZeroIntensityZeroIntensity left review comments

+2 more reviewers

@Prometheus3375Prometheus3375Prometheus3375 left review comments

@sharktidesharktidesharktide left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

awaiting reviewdocsDocumentation in the Doc dirskip news

Projects

Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@HernaniSamuel@Prometheus3375@ZeroIntensity@vstinner@sharktide

[8]ページ先頭

©2009-2026 Movatter.jp