Skip to content

Commit fc50ad5

Browse files
committed
Merge remote-tracking branch 'upstream/3.13' into backport-f04bea4-3.13
2 parents f6e0edc + 6ba31ca commit fc50ad5

File tree

285 files changed

+33650
-31214
lines changed

Some content is hidden

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

285 files changed

+33650
-31214
lines changed

.github/actionlint.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
self-hosted-runner:
2+
# Pending https://github.com/rhysd/actionlint/issues/533
3+
# and https://github.com/rhysd/actionlint/issues/571
4+
labels: ["windows-11-arm", "macos-15-intel"]
5+
6+
config-variables: null
7+
8+
paths:
9+
.github/workflows/**/*.yml:
10+
ignore:
11+
- 1st argument of function call is not assignable
12+
- SC2(015|038|086|091|097|098|129|155)

.github/workflows/build.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -255,24 +255,16 @@ jobs:
255255
strategy:
256256
fail-fast: false
257257
matrix:
258-
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
259-
# macOS 13 only runs tests against the GIL-enabled CPython.
260-
# Cirrus used for upstream, macos-14 for forks.
258+
# macos-14 is M1, macos-15-intel is Intel.
259+
# macos-15-intel only runs tests against the GIL-enabled CPython.
261260
os:
262-
- ghcr.io/cirruslabs/macos-runner:sonoma
263261
- macos-14
264-
- macos-13
265-
is-fork: # only used for the exclusion trick
266-
- ${{ github.repository_owner != 'python' }}
262+
- macos-15-intel
267263
free-threading:
268264
- false
269265
- true
270266
exclude:
271-
- os: ghcr.io/cirruslabs/macos-runner:sonoma
272-
is-fork: true
273-
- os: macos-14
274-
is-fork: false
275-
- os: macos-13
267+
- os: macos-15-intel
276268
free-threading: true
277269
uses: ./.github/workflows/reusable-macos.yml
278270
with:
@@ -370,9 +362,8 @@ jobs:
370362
fail-fast: false
371363
matrix:
372364
include:
373-
# Use the same runs-on configuration as build-macos and build-ubuntu.
374365
- arch: aarch64
375-
runs-on: ${{ github.repository_owner == 'python' && 'ghcr.io/cirruslabs/macos-runner:sonoma' || 'macos-14' }}
366+
runs-on: macos-14
376367
- arch: x86_64
377368
runs-on: ubuntu-24.04
378369

.github/workflows/jit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
compiler: msvc
8383
- target: x86_64-apple-darwin/clang
8484
architecture: x86_64
85-
runner: macos-13
85+
runner: macos-15-intel
8686
compiler: clang
8787
- target: aarch64-apple-darwin/clang
8888
architecture: aarch64

.pre-commit-config.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.12.8
3+
rev: v0.13.2
44
hooks:
5-
- id: ruff
5+
- id: ruff-check
66
name: Run Ruff (lint) on Doc/
77
args: [--exit-non-zero-on-fix]
88
files: ^Doc/
9-
- id: ruff
9+
- id: ruff-check
1010
name: Run Ruff (lint) on Lib/test/
1111
args: [--exit-non-zero-on-fix]
1212
files: ^Lib/test/
13-
- id: ruff
13+
- id: ruff-check
1414
name: Run Ruff (lint) on Tools/i18n/
1515
args: [--exit-non-zero-on-fix, --config=Tools/i18n/.ruff.toml]
1616
files: ^Tools/i18n/
17-
- id: ruff
17+
- id: ruff-check
1818
name: Run Ruff (lint) on Argument Clinic
1919
args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
2020
files: ^Tools/clinic/|Lib/test/test_clinic.py
21-
- id: ruff
21+
- id: ruff-check
2222
name: Run Ruff (lint) on Tools/peg_generator/
2323
args: [--exit-non-zero-on-fix, --config=Tools/peg_generator/.ruff.toml]
2424
files: ^Tools/peg_generator/
2525
- id: ruff-format
2626
name: Run Ruff (format) on Doc/
2727
args: [--check]
2828
files: ^Doc/
29+
- id: ruff-format
30+
name: Run Ruff (format) on Tools/wasm/
31+
args: [--check, --config=Tools/wasm/.ruff.toml]
32+
files: ^Tools/wasm/
2933

3034
- repo: https://github.com/psf/black-pre-commit-mirror
31-
rev: 25.1.0
35+
rev: 25.9.0
3236
hooks:
3337
- id: black
3438
name: Run Black on Tools/jit/
@@ -59,8 +63,20 @@ repos:
5963
- id: trailing-whitespace
6064
files: '^\.github/CODEOWNERS|\.(gram)$'
6165

66+
- repo: https://github.com/python-jsonschema/check-jsonschema
67+
rev: 0.34.0
68+
hooks:
69+
- id: check-dependabot
70+
- id: check-github-workflows
71+
- id: check-readthedocs
72+
73+
- repo: https://github.com/rhysd/actionlint
74+
rev: v1.7.7
75+
hooks:
76+
- id: actionlint
77+
6278
- repo: https://github.com/woodruffw/zizmor-pre-commit
63-
rev: v1.11.0
79+
rev: v1.14.1
6480
hooks:
6581
- id: zizmor
6682

Android/testbed/app/build.gradle.kts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ for ((i, prefix) in prefixes.withIndex()) {
4747
val libDir = file("$prefix/lib")
4848
val version = run {
4949
for (filename in libDir.list()!!) {
50-
"""python(\d+\.\d+)""".toRegex().matchEntire(filename)?.let {
50+
"""python(\d+\.\d+[a-z]*)""".toRegex().matchEntire(filename)?.let {
5151
return@run it.groupValues[1]
5252
}
5353
}
@@ -64,9 +64,10 @@ for ((i, prefix) in prefixes.withIndex()) {
6464
val libPythonDir = file("$libDir/python$pythonVersion")
6565
val triplet = run {
6666
for (filename in libPythonDir.list()!!) {
67-
"""_sysconfigdata__android_(.+).py""".toRegex().matchEntire(filename)?.let {
68-
return@run it.groupValues[1]
69-
}
67+
"""_sysconfigdata_[a-z]*_android_(.+).py""".toRegex()
68+
.matchEntire(filename)?.let {
69+
return@run it.groupValues[1]
70+
}
7071
}
7172
throw GradleException("Failed to find Python triplet in $libPythonDir")
7273
}

Doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ venv:
184184
fi
185185

186186
.PHONY: dist-no-html
187-
dist-no-html: dist-text dist-pdf dist-epub dist-texinfo
187+
dist-no-html: dist-text dist-epub dist-texinfo
188188

189189
.PHONY: dist
190190
dist:

Doc/bugs.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,22 @@ Documentation bugs
1616
==================
1717

1818
If you find a bug in this documentation or would like to propose an improvement,
19-
please submit a bug report on the :ref:`tracker <using-the-tracker>`. If you
19+
please submit a bug report on the :ref:`issue tracker <using-the-tracker>`. If you
2020
have a suggestion on how to fix it, include that as well.
2121

22+
.. only:: translation
23+
24+
If the bug or suggested improvement concerns the translation of this
25+
documentation, submit the report to the
26+
`translation’s repository <TRANSLATION_REPO_>`_ instead.
27+
2228
You can also open a discussion item on our
2329
`Documentation Discourse forum <https://discuss.python.org/c/documentation/26>`_.
2430

2531
If you find a bug in the theme (HTML / CSS / JavaScript) of the
26-
documentation, please submit a bug report on the `python-doc-theme bug
32+
documentation, please submit a bug report on the `python-doc-theme issue
2733
tracker <https://github.com/python/python-docs-theme>`_.
2834

29-
If you're short on time, you can also email documentation bug reports to
30-
docs@python.org (behavioral bugs can be sent to python-list@python.org).
31-
'docs@' is a mailing list run by volunteers; your request will be noticed,
32-
though it may take a while to be processed.
33-
3435
.. seealso::
3536

3637
`Documentation bugs`_

Doc/c-api/arg.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ There are three ways strings and buffers can be converted to C:
160160
``w*`` (read-write :term:`bytes-like object`) [Py_buffer]
161161
This format accepts any object which implements the read-write buffer
162162
interface. It fills a :c:type:`Py_buffer` structure provided by the caller.
163-
The buffer may contain embedded null bytes. The caller have to call
163+
The buffer may contain embedded null bytes. The caller has to call
164164
:c:func:`PyBuffer_Release` when it is done with the buffer.
165165

166166
``es`` (:class:`str`) [const char \*encoding, char \*\*buffer]

Doc/c-api/capsule.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
1515
.. c:type:: PyCapsule
1616
1717
This subtype of :c:type:`PyObject` represents an opaque value, useful for C
18-
extension modules who need to pass an opaque value (as a :c:expr:`void*`
18+
extension modules which need to pass an opaque value (as a :c:expr:`void*`
1919
pointer) through Python code to other C code. It is often used to make a C
2020
function pointer defined in one module available to other modules, so the
2121
regular import mechanism can be used to access C APIs defined in dynamically

Doc/c-api/code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ may change without deprecation warnings.
285285
286286
.. c:function:: Py_ssize_t PyUnstable_Eval_RequestCodeExtraIndex(freefunc free)
287287
288-
Return a new an opaque index value used to adding data to code objects.
288+
Return a new opaque index value used to adding data to code objects.
289289
290290
You generally call this function once (per interpreter) and use the result
291291
with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate

0 commit comments

Comments
 (0)