Skip to content

Commit d98a49f

Browse files
committed
Merge remote-tracking branch 'upstream/3.14' into backport-113de85-3.14
2 parents a9d0537 + f87578f commit d98a49f

File tree

244 files changed

+34129
-33081
lines changed

Some content is hidden

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

244 files changed

+34129
-33081
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,12 @@ Lib/concurrent/futures/interpreter.py @ericsnowcurrently
302302
**/*-ios* @freakboy3742
303303

304304
# WebAssembly
305-
/Tools/wasm/ @brettcannon @freakboy3742
305+
Tools/wasm/config.site-wasm32-emscripten @freakboy3742
306+
/Tools/wasm/README.md @brettcannon @freakboy3742
307+
/Tools/wasm/wasi-env @brettcannon
308+
/Tools/wasm/wasi_build.py @brettcannon
309+
/Tools/wasm/emscripten @freakboy3742
310+
/Tools/wasm/wasi @brettcannon
306311

307312
# SBOM
308313
/Misc/externals.spdx.json @sethmlarson

.github/workflows/reusable-wasi.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ jobs:
6464
# (Make sure to keep the key in sync with the other config.cache step below.)
6565
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
6666
- name: "Configure build Python"
67-
run: python3 Tools/wasm/wasi.py configure-build-python -- --config-cache --with-pydebug
67+
run: python3 Tools/wasm/wasi configure-build-python -- --config-cache --with-pydebug
6868
- name: "Make build Python"
69-
run: python3 Tools/wasm/wasi.py make-build-python
69+
run: python3 Tools/wasm/wasi make-build-python
7070
- name: "Restore host config.cache"
7171
uses: actions/cache@v4
7272
with:
@@ -75,9 +75,9 @@ jobs:
7575
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ env.WASI_SDK_VERSION }}-${{ env.WASMTIME_VERSION }}-${{ inputs.config_hash }}-${{ hashFiles('Tools/wasm/wasi.py') }}-${{ env.pythonLocation }}
7676
- name: "Configure host"
7777
# `--with-pydebug` inferred from configure-build-python
78-
run: python3 Tools/wasm/wasi.py configure-host -- --config-cache
78+
run: python3 Tools/wasm/wasi configure-host -- --config-cache
7979
- name: "Make host"
80-
run: python3 Tools/wasm/wasi.py make-host
80+
run: python3 Tools/wasm/wasi make-host
8181
- name: "Display build info"
8282
run: make --directory "${CROSS_BUILD_WASI}" pythoninfo
8383
- name: "Test"

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ repos:
3434
name: Run Black on Tools/jit/
3535
files: ^Tools/jit/
3636

37+
- repo: https://github.com/Lucas-C/pre-commit-hooks
38+
rev: v1.5.5
39+
hooks:
40+
- id: remove-tabs
41+
types: [python]
42+
exclude: ^Tools/c-analyzer/cpython/_parser.py
43+
3744
- repo: https://github.com/pre-commit/pre-commit-hooks
3845
rev: v5.0.0
3946
hooks:

Doc/c-api/capsule.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,19 @@ Refer to :ref:`using-capsules` for more information on using these objects.
105105
``module.attribute``. The *name* stored in the capsule must match this
106106
string exactly.
107107
108+
This function splits *name* on the ``.`` character, and imports the first
109+
element. It then processes further elements using attribute lookups.
110+
108111
Return the capsule's internal *pointer* on success. On failure, set an
109112
exception and return ``NULL``.
110113
114+
.. note::
115+
116+
If *name* points to an attribute of some submodule or subpackage, this
117+
submodule or subpackage must be previously imported using other means
118+
(for example, by using :c:func:`PyImport_ImportModule`) for the
119+
attribute lookups to succeed.
120+
111121
.. versionchanged:: 3.3
112122
*no_block* has no effect anymore.
113123

Doc/c-api/function.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ There are a few functions specific to Python functions.
9595
9696
.. versionadded:: 3.12
9797
98+
99+
.. c:function:: PyObject* PyFunction_GetKwDefaults(PyObject *op)
100+
101+
Return the keyword-only argument default values of the function object *op*. This can be a
102+
dictionary of arguments or ``NULL``.
103+
104+
98105
.. c:function:: PyObject* PyFunction_GetClosure(PyObject *op)
99106
100107
Return the closure associated with the function object *op*. This can be ``NULL``
@@ -123,6 +130,19 @@ There are a few functions specific to Python functions.
123130
Raises :exc:`SystemError` and returns ``-1`` on failure.
124131
125132
133+
.. c:function:: PyObject *PyFunction_GET_CODE(PyObject *op)
134+
PyObject *PyFunction_GET_GLOBALS(PyObject *op)
135+
PyObject *PyFunction_GET_MODULE(PyObject *op)
136+
PyObject *PyFunction_GET_DEFAULTS(PyObject *op)
137+
PyObject *PyFunction_GET_KW_DEFAULTS(PyObject *op)
138+
PyObject *PyFunction_GET_CLOSURE(PyObject *op)
139+
PyObject *PyFunction_GET_ANNOTATIONS(PyObject *op)
140+
141+
These functions are similar to their ``PyFunction_Get*`` counterparts, but
142+
do not do type checking. Passing anything other than an instance of
143+
:c:data:`PyFunction_Type` is undefined behavior.
144+
145+
126146
.. c:function:: int PyFunction_AddWatcher(PyFunction_WatchCallback callback)
127147
128148
Register *callback* as a function watcher for the current interpreter.

Doc/c-api/init.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
14141414
.. c:function:: void PyInterpreterState_Clear(PyInterpreterState *interp)
14151415
14161416
Reset all information in an interpreter state object. There must be
1417-
an :term:`attached thread state` for the the interpreter.
1417+
an :term:`attached thread state` for the interpreter.
14181418
14191419
.. audit-event:: cpython.PyInterpreterState_Clear "" c.PyInterpreterState_Clear
14201420

Doc/c-api/long.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
439439
All *n_bytes* of the buffer are written: large buffers are padded with
440440
zeroes.
441441
442-
If the returned value is greater than than *n_bytes*, the value was
442+
If the returned value is greater than *n_bytes*, the value was
443443
truncated: as many of the lowest bits of the value as could fit are written,
444444
and the higher bits are ignored. This matches the typical behavior
445445
of a C-style downcast.

0 commit comments

Comments
 (0)