Skip to content

Commit a65a2f1

Browse files
committed
[3.14] gh-144277: Fix usage of free-threaded terminology in the documentation (GH-144333)
(cherry picked from commit 3a0e183) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
1 parent 06f9c8c commit a65a2f1

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

Doc/c-api/object.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,10 @@ Object Protocol
667667
668668
:c:func:`PyUnstable_EnableTryIncRef` must have been called
669669
earlier on *obj* or this function may spuriously return ``0`` in the
670-
:term:`free threading` build.
670+
:term:`free-threaded build`.
671671
672672
This function is logically equivalent to the following C code, except that
673-
it behaves atomically in the :term:`free threading` build::
673+
it behaves atomically in the :term:`free-threaded build`::
674674
675675
if (Py_REFCNT(op) > 0) {
676676
Py_INCREF(op);
@@ -747,10 +747,10 @@ Object Protocol
747747
On GIL-enabled builds, this function is equivalent to
748748
:c:expr:`Py_REFCNT(op) == 1`.
749749
750-
On a :term:`free threaded <free threading>` build, this checks if *op*'s
750+
On a :term:`free-threaded build`, this checks if *op*'s
751751
:term:`reference count` is equal to one and additionally checks if *op*
752752
is only used by this thread. :c:expr:`Py_REFCNT(op) == 1` is **not**
753-
thread-safe on free threaded builds; prefer this function.
753+
thread-safe on free-threaded builds; prefer this function.
754754
755755
The caller must hold an :term:`attached thread state`, despite the fact
756756
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/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
@@ -394,7 +394,7 @@ General Options
394394
.. option:: --disable-gil
395395

396396
Enables support for running Python without the :term:`global interpreter
397-
lock` (GIL): free threading build.
397+
lock` (GIL): :term:`free-threaded build`.
398398

399399
Defines the ``Py_GIL_DISABLED`` macro and adds ``"t"`` to
400400
:data:`sys.abiflags`.

0 commit comments

Comments
 (0)