Skip to content

Commit f086fcb

Browse files
authored
Merge branch 'main' into gha-ubsan
2 parents 5767846 + 5f6ab92 commit f086fcb

File tree

73 files changed

+2539
-1239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2539
-1239
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Objects/type* @markshannon
3535
Objects/codeobject.c @markshannon
3636
Objects/frameobject.c @markshannon
3737
Objects/call.c @markshannon
38+
Objects/object.c @ZeroIntensity
3839
Python/ceval*.c @markshannon
3940
Python/ceval*.h @markshannon
4041
Python/codegen.c @markshannon @iritkatriel
@@ -66,8 +67,8 @@ Doc/_static/** @AA-Turner @hugovk
6667
Doc/tools/** @AA-Turner @hugovk
6768

6869
# runtime state/lifecycle
69-
**/*pylifecycle* @ericsnowcurrently
70-
**/*pystate* @ericsnowcurrently
70+
**/*pylifecycle* @ericsnowcurrently @ZeroIntensity
71+
**/*pystate* @ericsnowcurrently @ZeroIntensity
7172
**/*preconfig* @ericsnowcurrently
7273
**/*initconfig* @ericsnowcurrently
7374
**/*pathconfig* @ericsnowcurrently

Doc/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
rst_epilog = f"""
8080
.. |python_version_literal| replace:: ``Python {version}``
8181
.. |python_x_dot_y_literal| replace:: ``python{version}``
82+
.. |python_x_dot_y_t_literal| replace:: ``python{version}t``
83+
.. |python_x_dot_y_t_literal_config| replace:: ``python{version}t-config``
84+
.. |x_dot_y_b2_literal| replace:: ``{version}.0b2``
85+
.. |applications_python_version_literal| replace:: ``/Applications/Python {version}/``
8286
.. |usr_local_bin_python_x_dot_y_literal| replace:: ``/usr/local/bin/python{version}``
8387
8488
.. Apparently this how you hack together a formatted link:

Doc/howto/free-threading-extensions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
C API Extension Support for Free Threading
77
******************************************
88

9-
Starting with the 3.13 release, CPython has experimental support for running
10-
with the :term:`global interpreter lock` (GIL) disabled in a configuration
9+
Starting with the 3.13 release, CPython has support for running with
10+
the :term:`global interpreter lock` (GIL) disabled in a configuration
1111
called :term:`free threading`. This document describes how to adapt C API
1212
extensions to support free threading.
1313

Doc/howto/free-threading-python.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
.. _freethreading-python-howto:
22

3-
**********************************************
4-
Python experimental support for free threading
5-
**********************************************
3+
*********************************
4+
Python support for free threading
5+
*********************************
66

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

14-
**The free-threaded mode is experimental** and work is ongoing to improve it:
15-
expect some bugs and a substantial single-threaded performance hit.
14+
The free-threaded mode is working and continues to be improved, but
15+
there is some additional overhead in single-threaded workloads compared
16+
to the regular build. Additionally, third-party packages, in particular ones
17+
with an :term:`extension module`, may not be ready for use in a
18+
free-threaded build, and will re-enable the :term:`GIL`.
1619

1720
This document describes the implications of free threading
1821
for Python code. See :ref:`freethreading-extensions-howto` for information on
@@ -43,7 +46,7 @@ Identifying free-threaded Python
4346
================================
4447

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

Doc/library/ctypes.rst

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

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

888888
.. code-block:: pycon

Doc/library/dis.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,14 +1094,6 @@ iterations of the loop.
10941094
.. versionadded:: 3.14
10951095

10961096

1097-
.. opcode:: LOAD_CONST_IMMORTAL (consti)
1098-
1099-
Pushes ``co_consts[consti]`` onto the stack.
1100-
Can be used when the constant value is known to be immortal.
1101-
1102-
.. versionadded:: 3.14
1103-
1104-
11051097
.. opcode:: LOAD_NAME (namei)
11061098

11071099
Pushes the value associated with ``co_names[namei]`` onto the stack.

Doc/library/sqlite3.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,15 @@ Module constants
507507
Version number of the runtime SQLite library as a :class:`tuple` of
508508
:class:`integers <int>`.
509509

510+
.. data:: SQLITE_KEYWORDS
511+
512+
A :class:`tuple` containing all sqlite3 keywords.
513+
514+
This constant is only available if Python was compiled with SQLite
515+
3.24.0 or greater.
516+
517+
.. versionadded:: next
518+
510519
.. data:: threadsafety
511520

512521
Integer constant required by the DB-API 2.0, stating the level of thread

Doc/library/threading.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ CPU-bound tasks, as only one thread can execute Python bytecode at a time.
102102
Despite this, threads remain a useful tool for achieving concurrency in many
103103
scenarios.
104104

105-
As of Python 3.13, experimental :term:`free-threaded <free threading>` builds
105+
As of Python 3.13, :term:`free-threaded <free threading>` builds
106106
can disable the GIL, enabling true parallel execution of threads, but this
107107
feature is not available by default (see :pep:`703`).
108108

Doc/using/configure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ General Options
290290

291291
.. option:: --disable-gil
292292

293-
Enables **experimental** support for running Python without the
294-
:term:`global interpreter lock` (GIL): free threading build.
293+
Enables support for running Python without the :term:`global interpreter
294+
lock` (GIL): free threading build.
295295

296296
Defines the ``Py_GIL_DISABLED`` macro and adds ``"t"`` to
297297
:data:`sys.abiflags`.

0 commit comments

Comments
 (0)