Skip to content

Commit 3d72871

Browse files
committed
Merge branch 'main' into tier-2-tos-caching
2 parents 45e1abd + 8dd8b5c commit 3d72871

Some content is hidden

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

55 files changed

+1816
-1036
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/email.header.rst

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,36 @@ The :mod:`email.header` module also provides the following convenient functions.
178178
Decode a message header value without converting the character set. The header
179179
value is in *header*.
180180

181-
This function returns a list of ``(decoded_string, charset)`` pairs containing
182-
each of the decoded parts of the header. *charset* is ``None`` for non-encoded
183-
parts of the header, otherwise a lower case string containing the name of the
184-
character set specified in the encoded string.
181+
For historical reasons, this function may return either:
185182

186-
Here's an example::
183+
1. A list of pairs containing each of the decoded parts of the header,
184+
``(decoded_bytes, charset)``, where *decoded_bytes* is always an instance of
185+
:class:`bytes`, and *charset* is either:
186+
187+
- A lower case string containing the name of the character set specified.
188+
189+
- ``None`` for non-encoded parts of the header.
190+
191+
2. A list of length 1 containing a pair ``(string, None)``, where
192+
*string* is always an instance of :class:`str`.
193+
194+
An :exc:`email.errors.HeaderParseError` may be raised when certain decoding
195+
errors occur (e.g. a base64 decoding exception).
196+
197+
Here are examples:
187198

188199
>>> from email.header import decode_header
189200
>>> decode_header('=?iso-8859-1?q?p=F6stal?=')
190201
[(b'p\xf6stal', 'iso-8859-1')]
202+
>>> decode_header('unencoded_string')
203+
[('unencoded_string', None)]
204+
>>> decode_header('bar =?utf-8?B?ZsOzbw==?=')
205+
[(b'bar ', None), (b'f\xc3\xb3o', 'utf-8')]
206+
207+
.. note::
208+
209+
This function exists for for backwards compatibility only. For
210+
new code, we recommend using :class:`email.headerregistry.HeaderRegistry`.
191211

192212

193213
.. function:: make_header(decoded_seq, maxlinelen=None, header_name=None, continuation_ws=' ')
@@ -203,3 +223,7 @@ The :mod:`email.header` module also provides the following convenient functions.
203223
:class:`Header` instance. Optional *maxlinelen*, *header_name*, and
204224
*continuation_ws* are as in the :class:`Header` constructor.
205225

226+
.. note::
227+
228+
This function exists for for backwards compatibility only, and is
229+
not recommended for use in new code.

Doc/library/sys.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,6 +1933,13 @@ always available. Unless explicitly noted otherwise, all variables are read-only
19331933
interpreter is pre-release (alpha, beta, or release candidate) then the
19341934
local and remote interpreters must be the same exact version.
19351935

1936+
.. audit-event:: remote_debugger_script script_path
1937+
1938+
When the script is executed in the remote process, an
1939+
:ref:`auditing event <auditing>`
1940+
``sys.remote_debugger_script`` is raised
1941+
with the path in the remote process.
1942+
19361943
.. availability:: Unix, Windows.
19371944
.. versionadded:: 3.14
19381945

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)