Skip to content

Commit fdfffa0

Browse files
itamarometa-codesync[bot]
authored andcommitted
Sync pre-release CPython 3.15 branch from GitHub (2026-06-04)
Summary: Imported python/cpython `3.15.0b2+dev` from upstream rev [`c6d64cc`](https://www.github.com/python/cpython/commit/c6d64cc60df359a45522ded4fca9076837678836) (committed 2026-06-04 14:10:30+00:00). # Commit Info - Base: (`3.15.0b1+`) - [`848ba18`](https://www.github.com/python/cpython/commit/848ba18bcd31335051e0d085b5ef8eee49e35511) (commit date: 2026-06-02 02:11:51+00:00) - Imported: (`3.15.0b2+dev`) - [`c6d64cc`](https://www.github.com/python/cpython/commit/c6d64cc60df359a45522ded4fca9076837678836) (commit date: 2026-06-04 14:10:30+00:00) # Noteworthy file changes - Low-signal files (11 added, 73 removed) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GD74kSOjX4eP7BEHABMkliO_vfMDbr0LAAAz Reviewed By: fried Differential Revision: D107544947 fbshipit-source-id: fa59f79ce030fd4047166ef35a9630272f5051bb
1 parent 9ca32c7 commit fdfffa0

185 files changed

Lines changed: 2504 additions & 559 deletions

File tree

Some content is hidden

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

Doc/bugs.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ It can be sometimes faster to fix bugs yourself and contribute patches to
1212
Python as it streamlines the process and involves fewer people. Learn how to
1313
:ref:`contribute <contributing-to-python>`.
1414

15+
16+
.. _reporting-documentation-bugs:
17+
1518
Documentation bugs
1619
==================
1720

Doc/c-api/complex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ rather than dereferencing them through pointers.
130130
131131
Please note, that these functions are :term:`soft deprecated` since Python
132132
3.15. Avoid using this API in a new code to do complex arithmetic: either use
133-
the `Number Protocol <number>`_ API or use native complex types, like
133+
the :ref:`Number Protocol <number>` API or use native complex types, like
134134
:c:expr:`double complex`.
135135
136136

Doc/c-api/exceptions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ an error value).
412412
413413
.. c:function:: int PyErr_WarnFormat(PyObject *category, Py_ssize_t stack_level, const char *format, ...)
414414
415-
Function similar to :c:func:`PyErr_WarnEx`, but use
415+
Function similar to :c:func:`PyErr_WarnEx`, but uses
416416
:c:func:`PyUnicode_FromFormat` to format the warning message. *format* is
417417
an ASCII-encoded string.
418418
@@ -1392,7 +1392,7 @@ Tracebacks
13921392
13931393
This function will return ``NULL`` on success, or an error message on error.
13941394
1395-
This function is meant to debug debug situations such as segfaults, fatal
1395+
This function is meant to debug situations such as segfaults, fatal
13961396
errors, and similar. It calls :c:func:`PyUnstable_DumpTraceback` for each
13971397
thread. It only writes the tracebacks of the first *max_threads* threads,
13981398
further output is truncated with the line ``...``. If *max_threads* is 0, the

Doc/c-api/perfmaps.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,43 @@ Note that holding an :term:`attached thread state` is not required for these API
4949
This is called by the runtime itself during interpreter shut-down. In
5050
general, there shouldn't be a reason to explicitly call this, except to
5151
handle specific scenarios such as forking.
52+
53+
.. c:function:: int PyUnstable_CopyPerfMapFile(const char *parent_filename)
54+
55+
Open the ``/tmp/perf-$pid.map`` file and append the content of *parent_filename*
56+
to it.
57+
58+
This function is available on all platforms but only generates output on platforms
59+
that support perf maps (currently only Linux). On other platforms, it does nothing.
60+
61+
.. versionadded:: 3.13
62+
63+
.. c:function:: int PyUnstable_PerfTrampoline_CompileCode(PyCodeObject *code)
64+
65+
Compile the given code object using the current perf trampoline.
66+
67+
The "current" trampoline is the one set by the runtime or the most recent
68+
:c:func:`PyUnstable_PerfTrampoline_SetPersistAfterFork` call.
69+
70+
If no trampoline is set, falls back to normal compilation (no perf map entry).
71+
72+
:param code: The code object to compile.
73+
:return: 0 on success, -1 on failure.
74+
75+
.. versionadded:: 3.13
76+
77+
.. c:function:: int PyUnstable_PerfTrampoline_SetPersistAfterFork(int enable)
78+
79+
Set whether the perf trampoline should persist after a fork.
80+
81+
* If ``enable`` is true (non-zero): perf map file remains open/valid post-fork.
82+
Child process inherits all existing perf map entries.
83+
* If ``enable`` is false (zero): perf map closes post-fork.
84+
Child process gets empty perf map.
85+
86+
Default: false (clears on fork).
87+
88+
:param enable: 1 to enable, 0 to disable.
89+
:return: 0 on success, -1 on failure.
90+
91+
.. versionadded:: 3.13

Doc/c-api/slots.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Definition slots
77

88
To define :ref:`module objects <moduleobjects>` and
99
:ref:`classes <creating-heap-types>` using the C API, you may use
10-
an array of *slots* -- essentally, key-value pairs that describe features
10+
an array of *slots* -- essentially, key-value pairs that describe features
1111
of the object to create.
1212
This decouples the data from the structures used at runtime, allowing CPython
13-
-- and other Python C API implementations -- to update the stuctures without
13+
-- and other Python C API implementations -- to update the structures without
1414
breaking backwards compatibility.
1515

1616
This section documents slots in general.

Doc/c-api/synchronization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ are not available.
238238
.. c:function:: void PyCriticalSection_BeginMutex(PyCriticalSection *c, PyMutex *m);
239239
void PyCriticalSection2_BeginMutex(PyCriticalSection2 *c, PyMutex *m1, PyMutex *m2);
240240
241-
.. (These need to be in a separate section without a Stable ABI anotation.)
241+
.. (These need to be in a separate section without a Stable ABI annotation.)
242242
243243
To be used only as in the macro expansions
244244
listed :ref:`earlier in this section <critical-section-macros>`.

Doc/c-api/typehints.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ two types exist -- :ref:`GenericAlias <types-genericalias>` and
3131
static PyMethodDef my_obj_methods[] = {
3232
// Other methods.
3333
...
34-
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"}
34+
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "my_obj is generic over its contained type"}
3535
...
3636
}
3737

Doc/conf.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88

99
import os
1010
import sys
11-
from importlib import import_module
1211
from importlib.util import find_spec
1312

1413
# Make our custom extensions available to Sphinx
1514
sys.path.append(os.path.abspath('tools/extensions'))
1615
sys.path.append(os.path.abspath('includes'))
1716

18-
# Python specific content from Doc/Tools/extensions/pyspecific.py
19-
from pyspecific import SOURCE_URI
17+
from patchlevel import get_header_version_info, get_version_info
2018

2119
# General configuration
2220
# ---------------------
@@ -78,7 +76,7 @@
7876
# We look for the Include/patchlevel.h file in the current Python source tree
7977
# and replace the values accordingly.
8078
# See Doc/tools/extensions/patchlevel.py
81-
version, release = import_module('patchlevel').get_version_info()
79+
version, release = get_version_info()
8280

8381
rst_epilog = f"""
8482
.. |python_version_literal| replace:: ``Python {version}``
@@ -557,16 +555,20 @@
557555
r'https://unix.org/version2/whatsnew/lp64_wp.html',
558556
]
559557

558+
560559
# Options for sphinx.ext.extlinks
561560
# -------------------------------
562561

562+
v = get_header_version_info()
563+
branch = "main" if v.releaselevel == "alpha" else f"{v.major}.{v.minor}"
564+
563565
# This config is a dictionary of external sites,
564566
# mapping unique short aliases to a base URL and a prefix.
565567
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
566568
extlinks = {
567569
"oss-fuzz": ("https://issues.oss-fuzz.com/issues/%s", "#%s"),
568570
"pypi": ("https://pypi.org/project/%s/", "%s"),
569-
"source": (SOURCE_URI, "%s"),
571+
"source": (f"https://github.com/python/cpython/tree/{branch}/%s", "%s"),
570572
}
571573
extlinks_detect_hardcoded_links = True
572574

Doc/data/stable_abi.dat

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/extending/first-extension-module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Then, create ``meson.build`` containing the following:
164164
165165
.. note::
166166

167-
See `meson-python documentation <meson-python>`_ for details on
167+
See the `meson-python documentation <meson-python_>`_ for details on
168168
configuration.
169169

170170
Now, build install the *project in the current directory* (``.``) via ``pip``:

0 commit comments

Comments
 (0)