Skip to content

Commit 16349f0

Browse files
authored
Merge branch 'main' into fix-127727
2 parents 33e26f6 + 7a468a1 commit 16349f0

211 files changed

Lines changed: 5163 additions & 3534 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.

.github/CODEOWNERS

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
.azure-pipelines/ @AA-Turner
6464

6565
# GitHub & related scripts
66-
.github/ @ezio-melotti @hugovk @AA-Turner @webknjaz
66+
.github/ @ezio-melotti @hugovk @AA-Turner @webknjaz @itamaro
6767
Tools/build/compute-changes.py @AA-Turner @hugovk @webknjaz
6868
Lib/test/test_tools/test_compute_changes.py @AA-Turner @hugovk @webknjaz
6969
Tools/build/verify_ensurepip_wheels.py @AA-Turner @pfmoore @pradyunsg
@@ -73,19 +73,19 @@ Tools/build/verify_ensurepip_wheels.py @AA-Turner @pfmoore @pradyunsg
7373
.ruff.toml @hugovk @AlexWaygood @AA-Turner
7474

7575
# Patchcheck
76-
Tools/patchcheck/ @AA-Turner
76+
Tools/patchcheck/ @AA-Turner @itamaro
7777

7878

7979
# ----------------------------------------------------------------------------
8080
# Build System
8181
# ----------------------------------------------------------------------------
8282

8383
# Autotools
84-
configure* @erlend-aasland @corona10 @AA-Turner @emmatyping
85-
Makefile.pre.in @erlend-aasland @AA-Turner @emmatyping
86-
Modules/makesetup @erlend-aasland @AA-Turner @emmatyping
87-
Modules/Setup* @erlend-aasland @AA-Turner @emmatyping
88-
Tools/build/regen-configure.sh @AA-Turner
84+
configure* @erlend-aasland @corona10 @AA-Turner @emmatyping @itamaro
85+
Makefile.pre.in @erlend-aasland @AA-Turner @emmatyping @itamaro
86+
Modules/makesetup @erlend-aasland @AA-Turner @emmatyping @itamaro
87+
Modules/Setup* @erlend-aasland @AA-Turner @emmatyping @itamaro
88+
Tools/build/regen-configure.sh @AA-Turner @itamaro
8989

9090
# generate-build-details
9191
Tools/build/generate-build-details.py @FFY00

.github/SECURITY.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
# Security Policy
22

3-
## Supported Versions
3+
Python [provides a security policy and threat model](https://devguide.python.org/security/policy/)
4+
in the Python Development Guide documenting what bugs are vulnerabilities,
5+
how to structure reports, and what versions of Python accept reports.
46

5-
The Python team applies security fixes according to the table
6-
in [the devguide](
7-
https://devguide.python.org/versions/#supported-versions
8-
).
7+
Python Security Response Team (PSRT) members
8+
balance security work against many other responsibilities. Please be thoughtful
9+
about the time and attention your report requires. Repeated failure to respect
10+
the security policy will result in future reports being rejected, or the
11+
reporter being banned from the ``python`` GitHub organization, regardless of
12+
technical merit.
913

1014
## Reporting a Vulnerability
1115

12-
Please read the guidelines on reporting security issues [on the
13-
official website](https://www.python.org/dev/security/) for
14-
instructions on how to report a security-related problem to
15-
the Python team responsibly.
16+
The [Python security policy](https://devguide.python.org/security/policy/)
17+
documents [how to submit a vulnerability report](https://devguide.python.org/security/policy/#how-to-submit-a-vulnerability-report)
18+
using GitHub Security Advisories. Please read the security policy
19+
prior to filing a vulnerability report, especially the section on [what information to
20+
include and exclude](https://devguide.python.org/security/policy/#what-to-include-and-how-to-structure-a-vulnerability-report)
21+
in vulnerability reports. Following the security policy means the PSRT can
22+
quickly and efficiently triage your report, not following the security policy
23+
will only delay triaging your report.
1624

17-
To reach the response team, email `security at python dot org`.

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/exceptions.rst

Lines changed: 3 additions & 3 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
@@ -1038,7 +1038,7 @@ Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types requ
10381038
special recursion handling. In addition to protecting the stack,
10391039
:c:member:`~PyTypeObject.tp_repr` also needs to track objects to prevent cycles. The
10401040
following two functions facilitate this functionality. Effectively,
1041-
these are the C equivalent to :func:`reprlib.recursive_repr`.
1041+
these are the C equivalent to :deco:`reprlib.recursive_repr`.
10421042
10431043
.. c:function:: int Py_ReprEnter(PyObject *object)
10441044
@@ -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/interp-lifecycle.rst

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
104104

105105
Set by the :option:`-b` option.
106106

107-
.. deprecated-removed:: 3.12 3.15
107+
.. deprecated-removed:: 3.12 3.16
108108

109109

110110
.. c:var:: int Py_DebugFlag
@@ -119,7 +119,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
119119
Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment
120120
variable.
121121

122-
.. deprecated-removed:: 3.12 3.15
122+
.. deprecated-removed:: 3.12 3.16
123123

124124

125125
.. c:var:: int Py_DontWriteBytecodeFlag
@@ -134,7 +134,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
134134
Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE`
135135
environment variable.
136136

137-
.. deprecated-removed:: 3.12 3.15
137+
.. deprecated-removed:: 3.12 3.16
138138

139139

140140
.. c:var:: int Py_FrozenFlag
@@ -145,7 +145,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
145145

146146
Private flag used by ``_freeze_module`` and ``frozenmain`` programs.
147147

148-
.. deprecated-removed:: 3.12 3.15
148+
.. deprecated-removed:: 3.12 3.16
149149

150150

151151
.. c:var:: int Py_HashRandomizationFlag
@@ -161,7 +161,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
161161
If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment
162162
variable to initialize the secret hash seed.
163163

164-
.. deprecated-removed:: 3.12 3.15
164+
.. deprecated-removed:: 3.12 3.16
165165

166166

167167
.. c:var:: int Py_IgnoreEnvironmentFlag
@@ -175,7 +175,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
175175

176176
Set by the :option:`-E` and :option:`-I` options.
177177

178-
.. deprecated-removed:: 3.12 3.15
178+
.. deprecated-removed:: 3.12 3.16
179179

180180

181181
.. c:var:: int Py_InspectFlag
@@ -191,7 +191,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
191191
Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment
192192
variable.
193193

194-
.. deprecated-removed:: 3.12 3.15
194+
.. deprecated-removed:: 3.12 3.16
195195

196196

197197
.. c:var:: int Py_InteractiveFlag
@@ -202,7 +202,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
202202

203203
Set by the :option:`-i` option.
204204

205-
.. deprecated-removed:: 3.12 3.15
205+
.. deprecated-removed:: 3.12 3.16
206206

207207

208208
.. c:var:: int Py_IsolatedFlag
@@ -218,7 +218,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
218218

219219
.. versionadded:: 3.4
220220

221-
.. deprecated-removed:: 3.12 3.15
221+
.. deprecated-removed:: 3.12 3.16
222222

223223

224224
.. c:var:: int Py_LegacyWindowsFSEncodingFlag
@@ -238,7 +238,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
238238

239239
.. availability:: Windows.
240240

241-
.. deprecated-removed:: 3.12 3.15
241+
.. deprecated-removed:: 3.12 3.16
242242

243243

244244
.. c:var:: int Py_LegacyWindowsStdioFlag
@@ -257,7 +257,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
257257

258258
.. availability:: Windows.
259259

260-
.. deprecated-removed:: 3.12 3.15
260+
.. deprecated-removed:: 3.12 3.16
261261

262262

263263
.. c:var:: int Py_NoSiteFlag
@@ -273,7 +273,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
273273

274274
Set by the :option:`-S` option.
275275

276-
.. deprecated-removed:: 3.12 3.15
276+
.. deprecated-removed:: 3.12 3.16
277277

278278

279279
.. c:var:: int Py_NoUserSiteDirectory
@@ -288,7 +288,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
288288
Set by the :option:`-s` and :option:`-I` options, and the
289289
:envvar:`PYTHONNOUSERSITE` environment variable.
290290

291-
.. deprecated-removed:: 3.12 3.15
291+
.. deprecated-removed:: 3.12 3.16
292292

293293

294294
.. c:var:: int Py_OptimizeFlag
@@ -300,7 +300,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
300300
Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment
301301
variable.
302302

303-
.. deprecated-removed:: 3.12 3.15
303+
.. deprecated-removed:: 3.12 3.16
304304

305305

306306
.. c:var:: int Py_QuietFlag
@@ -315,7 +315,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
315315

316316
.. versionadded:: 3.2
317317

318-
.. deprecated-removed:: 3.12 3.15
318+
.. deprecated-removed:: 3.12 3.16
319319

320320

321321
.. c:var:: int Py_UnbufferedStdioFlag
@@ -329,7 +329,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
329329
Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED`
330330
environment variable.
331331

332-
.. deprecated-removed:: 3.12 3.15
332+
.. deprecated-removed:: 3.12 3.16
333333

334334

335335
.. c:var:: int Py_VerboseFlag
@@ -346,7 +346,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
346346
Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment
347347
variable.
348348

349-
.. deprecated-removed:: 3.12 3.15
349+
.. deprecated-removed:: 3.12 3.16
350350

351351

352352
Initializing and finalizing the interpreter
@@ -804,7 +804,7 @@ Process-wide parameters
804804
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
805805
:c:expr:`wchar_t*` string.
806806
807-
.. deprecated-removed:: 3.11 3.15
807+
.. deprecated-removed:: 3.11 3.16
808808
809809
810810
.. c:function:: const char* Py_GetVersion()
@@ -929,7 +929,7 @@ Process-wide parameters
929929
930930
.. versionadded:: 3.1.3
931931
932-
.. deprecated-removed:: 3.11 3.15
932+
.. deprecated-removed:: 3.11 3.16
933933
934934
935935
.. c:function:: void PySys_SetArgv(int argc, wchar_t **argv)
@@ -950,7 +950,7 @@ Process-wide parameters
950950
951951
.. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`.
952952
953-
.. deprecated-removed:: 3.11 3.15
953+
.. deprecated-removed:: 3.11 3.16
954954
955955
956956
.. c:function:: void Py_SetPythonHome(const wchar_t *home)
@@ -971,4 +971,4 @@ Process-wide parameters
971971
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
972972
:c:expr:`wchar_t*` string.
973973
974-
.. deprecated-removed:: 3.11 3.15
974+
.. deprecated-removed:: 3.11 3.16

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/structures.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ method.
454454
455455
The method will be passed the type object as the first parameter rather
456456
than an instance of the type. This is used to create *class methods*,
457-
similar to what is created when using the :func:`classmethod` built-in
458-
function.
457+
similar to what is created when using the :deco:`classmethod` built-in
458+
decorator.
459459
460460
461461
.. c:macro:: METH_STATIC
@@ -464,7 +464,7 @@ method.
464464
465465
The method will be passed ``NULL`` as the first parameter rather than an
466466
instance of the type. This is used to create *static methods*, similar to
467-
what is created when using the :func:`staticmethod` built-in function.
467+
what is created when using the :deco:`staticmethod` built-in decorator.
468468
469469
One other constant controls whether a method is loaded in place of another
470470
definition with the same method name.

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/c-api/unicode.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ The following API is deprecated.
19531953
whether you selected a "narrow" or "wide" Unicode version of Python at
19541954
build time.
19551955
1956-
.. deprecated-removed:: 3.13 3.15
1956+
.. deprecated-removed:: 3.13 3.16
19571957
19581958
19591959
.. c:function:: int PyUnicode_READY(PyObject *unicode)

0 commit comments

Comments
 (0)