Skip to content

Commit 9b6cffe

Browse files
Merge branch 'main' into fix-argparse-string-like-help
2 parents bfc7f21 + ce916dc commit 9b6cffe

255 files changed

Lines changed: 6003 additions & 1628 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/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Security Policy
22

33
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,
4+
in the Python Developer's Guide documenting what bugs are vulnerabilities,
55
how to structure reports, and what versions of Python accept reports.
66

77
Python Security Response Team (PSRT) members

.github/workflows/build.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,13 @@ jobs:
278278
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
279279
# supported by important vendors such as AWS-LC.
280280
- { name: openssl, version: 1.1.1w }
281-
- { name: openssl, version: 3.0.20 }
282-
- { name: openssl, version: 3.3.7 }
283-
- { name: openssl, version: 3.4.5 }
284-
- { name: openssl, version: 3.5.6 }
285-
- { name: openssl, version: 3.6.2 }
286-
- { name: openssl, version: 4.0.0 }
281+
- { name: openssl, version: 3.0.21 }
282+
- { name: openssl, version: 3.4.6 }
283+
- { name: openssl, version: 3.5.7 }
284+
- { name: openssl, version: 3.6.3 }
285+
- { name: openssl, version: 4.0.1 }
287286
## AWS-LC
288-
- { name: aws-lc, version: 1.72.1 }
287+
- { name: aws-lc, version: 5.0.0 }
289288
env:
290289
SSLLIB_VER: ${{ matrix.ssllib.version }}
291290
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -399,7 +398,7 @@ jobs:
399398
needs: build-context
400399
if: needs.build-context.outputs.run-ubuntu == 'true'
401400
env:
402-
OPENSSL_VER: 3.5.6
401+
OPENSSL_VER: 3.5.7
403402
PYTHONSTRICTEXTENSIONBUILD: 1
404403
steps:
405404
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -507,7 +506,7 @@ jobs:
507506
matrix:
508507
os: [ubuntu-24.04]
509508
env:
510-
OPENSSL_VER: 3.5.6
509+
OPENSSL_VER: 3.5.7
511510
PYTHONSTRICTEXTENSIONBUILD: 1
512511
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
513512
steps:

.github/workflows/reusable-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ${{ inputs.os }}
3636
timeout-minutes: 60
3737
env:
38-
OPENSSL_VER: 3.5.6
38+
OPENSSL_VER: 3.5.7
3939
PYTHONSTRICTEXTENSIONBUILD: 1
4040
TERM: linux
4141
steps:

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
7171
on failure.
7272
7373
74+
.. c:function:: PyObject* PyLong_FromUnsignedLongLong(unsigned long long v)
75+
76+
Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long long`,
77+
or ``NULL`` on failure.
78+
79+
7480
.. c:function:: PyObject* PyLong_FromInt32(int32_t value)
7581
PyObject* PyLong_FromInt64(int64_t value)
7682
@@ -81,12 +87,6 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
8187
.. versionadded:: 3.14
8288
8389
84-
.. c:function:: PyObject* PyLong_FromUnsignedLongLong(unsigned long long v)
85-
86-
Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long long`,
87-
or ``NULL`` on failure.
88-
89-
9090
.. c:function:: PyObject* PyLong_FromUInt32(uint32_t value)
9191
PyObject* PyLong_FromUInt64(uint64_t value)
9292

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.

0 commit comments

Comments
 (0)