Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a72500

Browse filesBrowse files
authored
Merge branch 'main' into gh-110109-purepathbase
2 parents cacc0f3 + ed21d0c commit 5a72500
Copy full SHA for 5a72500

File tree

Expand file treeCollapse file tree

635 files changed

+23412
-10350
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

635 files changed

+23412
-10350
lines changed

‎.devcontainer/Dockerfile

Copy file name to clipboardExpand all lines: .devcontainer/Dockerfile
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV WASI_SDK_VERSION=20
66
ENV WASI_SDK_PATH=/opt/wasi-sdk
77

88
ENV WASMTIME_HOME=/opt/wasmtime
9-
ENV WASMTIME_VERSION=9.0.1
9+
ENV WASMTIME_VERSION=14.0.4
1010
ENV WASMTIME_CPU_ARCH=x86_64
1111

1212
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \

‎.github/CODEOWNERS

Copy file name to clipboardExpand all lines: .github/CODEOWNERS
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,7 @@ Doc/howto/clinic.rst @erlend-aasland
190190

191191
# WebAssembly
192192
/Tools/wasm/ @brettcannon
193+
194+
# SBOM
195+
/Misc/sbom.spdx.json @sethmlarson
196+
/Tools/build/generate_sbom.py @sethmlarson

‎.github/workflows/add-issue-header.yml

Copy file name to clipboardExpand all lines: .github/workflows/add-issue-header.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
permissions:
2020
issues: write
2121
steps:
22-
- uses: actions/github-script@v6
22+
- uses: actions/github-script@v7
2323
with:
2424
# language=JavaScript
2525
script: |

‎.github/workflows/build.yml

Copy file name to clipboardExpand all lines: .github/workflows/build.yml
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
build_windows_free_threaded:
191191
name: 'Windows (free-threaded)'
192192
needs: check_source
193-
if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
193+
if: needs.check_source.outputs.run_tests == 'true'
194194
uses: ./.github/workflows/reusable-windows.yml
195195
with:
196196
free-threaded: true
@@ -206,7 +206,7 @@ jobs:
206206
build_macos_free_threaded:
207207
name: 'macOS (free-threaded)'
208208
needs: check_source
209-
if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
209+
if: needs.check_source.outputs.run_tests == 'true'
210210
uses: ./.github/workflows/reusable-macos.yml
211211
with:
212212
config_hash: ${{ needs.check_source.outputs.config_hash }}
@@ -228,7 +228,7 @@ jobs:
228228
build_ubuntu_free_threaded:
229229
name: 'Ubuntu (free-threaded)'
230230
needs: check_source
231-
if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
231+
if: needs.check_source.outputs.run_tests == 'true'
232232
uses: ./.github/workflows/reusable-ubuntu.yml
233233
with:
234234
config_hash: ${{ needs.check_source.outputs.config_hash }}
@@ -521,10 +521,7 @@ jobs:
521521
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
522522
with:
523523
allowed-failures: >-
524-
build_macos_free_threaded,
525-
build_ubuntu_free_threaded,
526524
build_ubuntu_ssltests,
527-
build_windows_free_threaded,
528525
cifuzz,
529526
test_hypothesis,
530527
allowed-skips: >-

‎.github/workflows/mypy.yml

Copy file name to clipboardExpand all lines: .github/workflows/mypy.yml
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
pull_request:
99
paths:
1010
- ".github/workflows/mypy.yml"
11+
- "Lib/test/libregrtest/**"
12+
- "Tools/build/generate_sbom.py"
1113
- "Tools/cases_generator/**"
1214
- "Tools/clinic/**"
1315
- "Tools/peg_generator/**"
@@ -32,6 +34,8 @@ jobs:
3234
strategy:
3335
matrix:
3436
target: [
37+
"Lib/test/libregrtest",
38+
"Tools/build/",
3539
"Tools/cases_generator",
3640
"Tools/clinic",
3741
"Tools/peg_generator",

‎.github/workflows/new-bugs-announce-notifier.yml

Copy file name to clipboardExpand all lines: .github/workflows/new-bugs-announce-notifier.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
node-version: 20
1919
- run: npm install mailgun.js form-data
2020
- name: Send notification
21-
uses: actions/github-script@v6
21+
uses: actions/github-script@v7
2222
env:
2323
MAILGUN_API_KEY: ${{ secrets.MAILGUN_PYTHON_ORG_MAILGUN_KEY }}
2424
with:

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ Tools/unicode/data/
125125
/config.status.lineno
126126
# hendrikmuhs/ccache-action@v1
127127
/.ccache
128+
/cross-build/
128129
/platform
129130
/profile-clean-stamp
130131
/profile-run-stamp

‎Doc/c-api/arg.rst

Copy file name to clipboardExpand all lines: Doc/c-api/arg.rst
+24-2Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ API Functions
413413
than a variable number of arguments.
414414
415415
416-
.. c:function:: int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], ...)
416+
.. c:function:: int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char * const *keywords, ...)
417417
418418
Parse the parameters of a function that takes both positional and keyword
419419
parameters into local variables.
@@ -424,15 +424,24 @@ API Functions
424424
Returns true on success; on failure, it returns false and raises the
425425
appropriate exception.
426426
427+
.. note::
428+
429+
The *keywords* parameter declaration is :c:expr:`char * const *` in C and
430+
:c:expr:`const char * const *` in C++.
431+
This can be overridden with the :c:macro:`PY_CXX_CONST` macro.
432+
427433
.. versionchanged:: 3.6
428434
Added support for :ref:`positional-only parameters
429435
<positional-only_parameter>`.
430436
431437
.. versionchanged:: 3.13
438+
The *keywords* parameter has now type :c:expr:`char * const *` in C and
439+
:c:expr:`const char * const *` in C++, instead of :c:expr:`char **`.
432440
Added support for non-ASCII keyword parameter names.
433441
434442
435-
.. c:function:: int PyArg_VaParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], va_list vargs)
443+
444+
.. c:function:: int PyArg_VaParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char * const *keywords, va_list vargs)
436445
437446
Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a
438447
va_list rather than a variable number of arguments.
@@ -505,6 +514,19 @@ API Functions
505514
506515
PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
507516
517+
.. c:macro:: PY_CXX_CONST
518+
519+
The value to be inserted, if any, before :c:expr:`char * const *`
520+
in the *keywords* parameter declaration of
521+
:c:func:`PyArg_ParseTupleAndKeywords` and
522+
:c:func:`PyArg_VaParseTupleAndKeywords`.
523+
Default empty for C and ``const`` for C++
524+
(:c:expr:`const char * const *`).
525+
To override, define it to the desired value before including
526+
:file:`Python.h`.
527+
528+
.. versionadded:: 3.13
529+
508530
509531
---------------
510532
Building values

‎Doc/c-api/frame.rst

Copy file name to clipboardExpand all lines: Doc/c-api/frame.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ See also :ref:`Reflection <reflection>`.
5050
5151
.. c:function:: PyObject* PyFrame_GetBuiltins(PyFrameObject *frame)
5252
53-
Get the *frame*'s ``f_builtins`` attribute.
53+
Get the *frame*'s :attr:`~frame.f_builtins` attribute.
5454
5555
Return a :term:`strong reference`. The result cannot be ``NULL``.
5656
@@ -81,7 +81,7 @@ See also :ref:`Reflection <reflection>`.
8181
8282
.. c:function:: PyObject* PyFrame_GetGlobals(PyFrameObject *frame)
8383
84-
Get the *frame*'s ``f_globals`` attribute.
84+
Get the *frame*'s :attr:`~frame.f_globals` attribute.
8585
8686
Return a :term:`strong reference`. The result cannot be ``NULL``.
8787
@@ -90,7 +90,7 @@ See also :ref:`Reflection <reflection>`.
9090
9191
.. c:function:: int PyFrame_GetLasti(PyFrameObject *frame)
9292
93-
Get the *frame*'s ``f_lasti`` attribute.
93+
Get the *frame*'s :attr:`~frame.f_lasti` attribute.
9494
9595
Returns -1 if ``frame.f_lasti`` is ``None``.
9696
@@ -120,7 +120,7 @@ See also :ref:`Reflection <reflection>`.
120120
121121
.. c:function:: PyObject* PyFrame_GetLocals(PyFrameObject *frame)
122122
123-
Get the *frame*'s ``f_locals`` attribute (:class:`dict`).
123+
Get the *frame*'s :attr:`~frame.f_locals` attribute (:class:`dict`).
124124
125125
Return a :term:`strong reference`.
126126

‎Doc/c-api/function.rst

Copy file name to clipboardExpand all lines: Doc/c-api/function.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ There are a few functions specific to Python functions.
3737
The function's docstring and name are retrieved from the code object. *__module__*
3838
is retrieved from *globals*. The argument defaults, annotations and closure are
3939
set to ``NULL``. *__qualname__* is set to the same value as the code object's
40-
``co_qualname`` field.
40+
:attr:`~codeobject.co_qualname` field.
4141
4242
4343
.. c:function:: PyObject* PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)
4444
4545
As :c:func:`PyFunction_New`, but also allows setting the function object's
4646
``__qualname__`` attribute. *qualname* should be a unicode object or ``NULL``;
4747
if ``NULL``, the ``__qualname__`` attribute is set to the same value as the
48-
code object's ``co_qualname`` field.
48+
code object's :attr:`~codeobject.co_qualname` field.
4949
5050
.. versionadded:: 3.3
5151

‎Doc/c-api/hash.rst

Copy file name to clipboardExpand all lines: Doc/c-api/hash.rst
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,17 @@ See also the :c:member:`PyTypeObject.tp_hash` member.
4545
4646
Get the hash function definition.
4747
48+
.. seealso::
49+
:pep:`456` "Secure and interchangeable hash algorithm".
50+
4851
.. versionadded:: 3.4
52+
53+
54+
.. c:function:: Py_hash_t Py_HashPointer(const void *ptr)
55+
56+
Hash a pointer value: process the pointer value as an integer (cast it to
57+
``uintptr_t`` internally). The pointer is not dereferenced.
58+
59+
The function cannot fail: it cannot return ``-1``.
60+
61+
.. versionadded:: 3.13

‎Doc/c-api/import.rst

Copy file name to clipboardExpand all lines: Doc/c-api/import.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Importing Modules
154154
:class:`~importlib.machinery.SourceFileLoader` otherwise.
155155
156156
The module's :attr:`__file__` attribute will be set to the code object's
157-
:attr:`!co_filename`. If applicable, :attr:`__cached__` will also
157+
:attr:`~codeobject.co_filename`. If applicable, :attr:`__cached__` will also
158158
be set.
159159
160160
This function will reload the module if it was already imported. See

‎Doc/c-api/init.rst

Copy file name to clipboardExpand all lines: Doc/c-api/init.rst
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,8 @@ Python-level trace functions in previous versions.
16621662
16631663
The value passed as the *what* parameter to a :c:type:`Py_tracefunc` function
16641664
(but not a profiling function) when a line-number event is being reported.
1665-
It may be disabled for a frame by setting :attr:`f_trace_lines` to *0* on that frame.
1665+
It may be disabled for a frame by setting :attr:`~frame.f_trace_lines` to
1666+
*0* on that frame.
16661667
16671668
16681669
.. c:var:: int PyTrace_RETURN
@@ -1694,7 +1695,7 @@ Python-level trace functions in previous versions.
16941695
The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but not
16951696
profiling functions) when a new opcode is about to be executed. This event is
16961697
not emitted by default: it must be explicitly requested by setting
1697-
:attr:`f_trace_opcodes` to *1* on the frame.
1698+
:attr:`~frame.f_trace_opcodes` to *1* on the frame.
16981699
16991700
17001701
.. c:function:: void PyEval_SetProfile(Py_tracefunc func, PyObject *obj)

‎Doc/c-api/refcounting.rst

Copy file name to clipboardExpand all lines: Doc/c-api/refcounting.rst
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ of Python objects.
3434
3535
Set the object *o* reference counter to *refcnt*.
3636
37+
On :ref:`Python build with Free Threading <free-threading-build>`, if
38+
*refcnt* is larger than ``UINT32_MAX``, the object is made :term:`immortal`.
39+
3740
This function has no effect on :term:`immortal` objects.
3841
3942
.. versionadded:: 3.9

‎Doc/c-api/set.rst

Copy file name to clipboardExpand all lines: Doc/c-api/set.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
147147
148148
Return ``1`` if found and removed, ``0`` if not found (no action taken), and ``-1`` if an
149149
error is encountered. Does not raise :exc:`KeyError` for missing keys. Raise a
150-
:exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~set.discard`
150+
:exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~frozenset.discard`
151151
method, this function does not automatically convert unhashable sets into
152152
temporary frozensets. Raise :exc:`SystemError` if *set* is not an
153153
instance of :class:`set` or its subtype.

‎Doc/c-api/structures.rst

Copy file name to clipboardExpand all lines: Doc/c-api/structures.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ Macro name C type Python type
592592
593593
(*): Zero-terminated, UTF8-encoded C string.
594594
With :c:macro:`!Py_T_STRING` the C representation is a pointer;
595-
with :c:macro:`!Py_T_STRING_INLINE` the string is stored directly
595+
with :c:macro:`!Py_T_STRING_INPLACE` the string is stored directly
596596
in the structure.
597597
598598
(**): String of length 1. Only ASCII is accepted.

‎Doc/c-api/typeobj.rst

Copy file name to clipboardExpand all lines: Doc/c-api/typeobj.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,13 @@ slot typedefs
343343
| | :c:type:`PyTypeObject` * | |
344344
| | :c:type:`Py_ssize_t` | |
345345
+-----------------------------+-----------------------------+----------------------+
346-
| :c:type:`destructor` | void * | void |
346+
| :c:type:`destructor` | :c:type:`PyObject` * | void |
347347
+-----------------------------+-----------------------------+----------------------+
348348
| :c:type:`freefunc` | void * | void |
349349
+-----------------------------+-----------------------------+----------------------+
350350
| :c:type:`traverseproc` | .. line-block:: | int |
351351
| | | |
352-
| | void * | |
352+
| | :c:type:`PyObject` * | |
353353
| | :c:type:`visitproc` | |
354354
| | void * | |
355355
+-----------------------------+-----------------------------+----------------------+
@@ -426,7 +426,7 @@ slot typedefs
426426
| | :c:type:`PyObject` * | |
427427
| | :c:type:`Py_buffer` * | |
428428
+-----------------------------+-----------------------------+----------------------+
429-
| :c:type:`inquiry` | void * | int |
429+
| :c:type:`inquiry` | :c:type:`PyObject` * | int |
430430
+-----------------------------+-----------------------------+----------------------+
431431
| :c:type:`unaryfunc` | .. line-block:: | :c:type:`PyObject` * |
432432
| | | |

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.