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

Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
11 commits
Select commitHold shift + click to select a range
c07f6d6
gh-144161: Clarify additional immortalization in free-threaded build
HernaniSamuelJan 23, 2026
2381777
Add notes to sys.intern and PyUnicode_InternInPlace about immortal st…
HernaniSamuelJan 24, 2026
60877e6
Address review comments: emphasize 'are' and rephrase to avoid duplic…
HernaniSamuelJan 24, 2026
8615a75
Docs: address review feedback on interned string immortality
HernaniSamuelJan 24, 2026
bd1935f
gh-144161: fix glossary term 'free-threaded'
HernaniSamuelJan 24, 2026
d261c91
Remove :term: reference from 'free-threaded' (not in glossary)
HernaniSamuelJan 24, 2026
6f221be
Docs: reference free threading glossary term correctly
HernaniSamuelJan 25, 2026
6f18666
gh-144161: wrap free threading note to 80 columns
HernaniSamuelJan 26, 2026
9aef49e
gh-144161: remove trailing whitespace
HernaniSamuelJan 26, 2026
dcc823d
Docs: use hyphenated 'free-threaded' in term references
HernaniSamuelJan 27, 2026
47632d1
docs: use 'free threaded' without hyphen for consistency
HernaniSamuelJan 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletionDoc/c-api/unicode.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1750,9 +1750,13 @@ They all return ``NULL`` or ``-1`` if an exception occurs.
:c:expr:`PyUnicode_CheckExact(*p_unicode)` must be true. If it is not,
then -- as with any other error -- the argument is left unchanged.

Note thatinternedstringsare notimmortal.
Stringsinternedby this functionare not:term:`immortal`.
You must keep a reference to the result to benefit from interning.

.. note::
On the :term:`free threaded <free threading>` build,
all interned strings are :term:`immortal`.
This may change in the future.

.. c:function:: PyObject* PyUnicode_InternFromString(const char *str)

Expand Down
4 changes: 2 additions & 2 deletionsDoc/howto/free-threading-python.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -99,12 +99,12 @@ This section describes known limitations of the free-threaded CPython build.
Immortalization
---------------

In the free-threaded build,some objects are:term:`immortal`.
On the free-threaded build,more objects aremadeimmortal.
Immortal objects are not deallocated and have reference counts that are
never modified. This is done to avoid reference count contention that would
prevent efficient multi-threaded scaling.

As of the 3.14 release, immortalization is limited to:
As of the 3.14 release,this additionalimmortalization is limited to:

* Code constants: numeric literals, string literals, and tuple literals
composed of other constants.
Expand Down
4 changes: 4 additions & 0 deletionsDoc/library/sys.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1325,6 +1325,10 @@ always available. Unless explicitly noted otherwise, all variables are read-only
Interned strings are not :term:`immortal`; you must keep a reference to the
return value of :func:`intern` around to benefit from it.

.. note::
On the :term:`free threaded <free threading>` build,
all interned strings are :term:`immortal`.
This may change in the future.

.. function:: _is_gil_enabled()

Expand Down
Loading

[8]ページ先頭

©2009-2026 Movatter.jp