Skip to content

Commit 3a0e183

Browse files
gh-144277: Fix usage of free-threaded terminology in the documentation (GH-144333)
1 parent 1834741 commit 3a0e183

File tree

7 files changed

+19
-12
lines changed

7 files changed

+19
-12
lines changed

Doc/c-api/object.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,10 +711,10 @@ Object Protocol
711711
712712
:c:func:`PyUnstable_EnableTryIncRef` must have been called
713713
earlier on *obj* or this function may spuriously return ``0`` in the
714-
:term:`free threading` build.
714+
:term:`free-threaded build`.
715715
716716
This function is logically equivalent to the following C code, except that
717-
it behaves atomically in the :term:`free threading` build::
717+
it behaves atomically in the :term:`free-threaded build`::
718718
719719
if (Py_REFCNT(op) > 0) {
720720
Py_INCREF(op);
@@ -791,10 +791,10 @@ Object Protocol
791791
On GIL-enabled builds, this function is equivalent to
792792
:c:expr:`Py_REFCNT(op) == 1`.
793793
794-
On a :term:`free threaded <free threading>` build, this checks if *op*'s
794+
On a :term:`free-threaded build`, this checks if *op*'s
795795
:term:`reference count` is equal to one and additionally checks if *op*
796796
is only used by this thread. :c:expr:`Py_REFCNT(op) == 1` is **not**
797-
thread-safe on free threaded builds; prefer this function.
797+
thread-safe on free-threaded builds; prefer this function.
798798
799799
The caller must hold an :term:`attached thread state`, despite the fact
800800
that this function doesn't call into the Python interpreter. This function

Doc/c-api/refcounting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ of Python objects.
2525
2626
.. note::
2727
28-
On :term:`free threaded <free threading>` builds of Python, returning 1
28+
On :term:`free-threaded builds <free-threaded build>` of Python, returning 1
2929
isn't sufficient to determine if it's safe to treat *o* as having no
3030
access by other threads. Use :c:func:`PyUnstable_Object_IsUniquelyReferenced`
3131
for that instead.

Doc/glossary.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ Glossary
160160
On most builds of Python, having an attached thread state implies that the
161161
caller holds the :term:`GIL` for the current interpreter, so only
162162
one OS thread can have an attached thread state at a given moment. In
163-
:term:`free-threaded <free threading>` builds of Python, threads can concurrently
164-
hold an attached thread state, allowing for true parallelism of the bytecode
165-
interpreter.
163+
:term:`free-threaded builds <free-threaded build>` of Python, threads can
164+
concurrently hold an attached thread state, allowing for true parallelism of
165+
the bytecode interpreter.
166166

167167
attribute
168168
A value associated with an object which is usually referenced by name
@@ -580,6 +580,13 @@ Glossary
580580
the :term:`global interpreter lock` which allows only one thread to
581581
execute Python bytecode at a time. See :pep:`703`.
582582

583+
free-threaded build
584+
585+
A build of :term:`CPython` that supports :term:`free threading`,
586+
configured using the :option:`--disable-gil` option before compilation.
587+
588+
See :ref:`freethreading-python-howto`.
589+
583590
free variable
584591
Formally, as defined in the :ref:`language execution model <bind_names>`, a free
585592
variable is any variable used in a namespace which is not a local variable in that

Doc/library/ctypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ invalid non-\ ``NULL`` pointers would crash Python)::
896896
Thread safety without the GIL
897897
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
898898

899-
From Python 3.13 onward, the :term:`GIL` can be disabled on :term:`free threaded <free threading>` builds.
899+
From Python 3.13 onward, the :term:`GIL` can be disabled on the :term:`free-threaded build`.
900900
In ctypes, reads and writes to a single object concurrently is safe, but not across multiple objects:
901901

902902
.. code-block:: pycon

Doc/library/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ than raw I/O does.
720720
contains initial data.
721721

722722
Methods may be used from multiple threads without external locking in
723-
:term:`free threading` builds.
723+
:term:`free-threaded builds <free-threaded build>`.
724724

725725
:class:`BytesIO` provides or overrides these methods in addition to those
726726
from :class:`BufferedIOBase` and :class:`IOBase`:

Doc/library/site.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ For the head part, it uses ``sys.prefix`` and ``sys.exec_prefix``; empty heads
3434
are skipped. For the tail part, it uses the empty string and then
3535
:file:`lib/site-packages` (on Windows) or
3636
:file:`lib/python{X.Y[t]}/site-packages` (on Unix and macOS). (The
37-
optional suffix "t" indicates the :term:`free threading` build, and is
37+
optional suffix "t" indicates the :term:`free-threaded build`, and is
3838
appended if ``"t"`` is present in the :data:`sys.abiflags` constant.)
3939
For each
4040
of the distinct head-tail combinations, it sees if it refers to an existing

Doc/using/configure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ General Options
421421
:no-typesetting:
422422

423423
Enables support for running Python without the :term:`global interpreter
424-
lock` (GIL): free threading build.
424+
lock` (GIL): :term:`free-threaded build`.
425425

426426
Defines the ``Py_GIL_DISABLED`` macro and adds ``"t"`` to
427427
:data:`sys.abiflags`.

0 commit comments

Comments
 (0)