Skip to content
Merged
10 changes: 5 additions & 5 deletions Doc/howto/free-threading-python.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
.. _freethreading-python-howto:

**********************************************
Python experimental support for free threading
Python support for free threading
**********************************************

Starting with the 3.13 release, CPython has experimental support for a build of
Starting with the 3.13 release, CPython has support for a build of
Python called :term:`free threading` where the :term:`global interpreter lock`
(GIL) is disabled. Free-threaded execution allows for full utilization of the
available processing power by running threads in parallel on available CPU cores.
While not all software will benefit from this automatically, programs
designed with threading in mind will run faster on multi-core hardware.

**The free-threaded mode is experimental** and work is ongoing to improve it:
expect some bugs and a substantial single-threaded performance hit.
The free-threaded mode is working and continues to be improved:
expect some bugs and a substantial performance hit in single-threaded workloads.

This document describes the implications of free threading
for Python code. See :ref:`freethreading-extensions-howto` for information on
Expand Down Expand Up @@ -43,7 +43,7 @@ Identifying free-threaded Python
================================

To check if the current interpreter supports free-threading, :option:`python -VV <-V>`
and :data:`sys.version` contain "experimental free-threading build".
and :data:`sys.version` contain "free-threading build".
The new :func:`sys._is_gil_enabled` function can be used to check whether
the GIL is actually disabled in the running process.

Expand Down
2 changes: 1 addition & 1 deletion Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ def _sys_version(sys_version=None):
# CPython
cpython_sys_version_parser = re.compile(
r'([\w.+]+)\s*' # "version<space>"
r'(?:experimental free-threading build\s+)?' # "free-threading-build<space>"
r'(?:free-threading build\s+)?' # "free-threading-build<space>"
r'\(#?([^,]+)' # "(#buildno"
r'(?:,\s*([\w ]*)' # ", builddate"
r'(?:,\s*([\w :]*))?)?\)\s*' # ", buildtime)<space>"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove "experimental" tag from the CPython free-threading.
2 changes: 1 addition & 1 deletion Python/getversion.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void _Py_InitVersion(void)
}
initialized = 1;
#ifdef Py_GIL_DISABLED
const char *buildinfo_format = "%.80s experimental free-threading build (%.80s) %.80s";
const char *buildinfo_format = "%.80s free-threading build (%.80s) %.80s";
#else
const char *buildinfo_format = "%.80s (%.80s) %.80s";
#endif
Expand Down
4 changes: 2 additions & 2 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ ABI_THREAD=""
# --disable-gil
AC_MSG_CHECKING([for --disable-gil])
AC_ARG_ENABLE([gil],
[AS_HELP_STRING([--disable-gil], [enable experimental support for running without the GIL (default is no)])],
[AS_HELP_STRING([--disable-gil], [enable support for running without the GIL (default is no)])],
[AS_VAR_IF([enable_gil], [yes], [disable_gil=no], [disable_gil=yes])], [disable_gil=no]
)
AC_MSG_RESULT([$disable_gil])
Expand Down
Loading