Skip to content

Commit 8bc0cbe

Browse files
authored
Merge branch '3.14' into backport-5f35f9b-3.14
2 parents a7005b7 + d29c38e commit 8bc0cbe

252 files changed

Lines changed: 5341 additions & 2576 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.github/** @ezio-melotti @hugovk @AA-Turner
99

1010
# pre-commit
11-
.pre-commit-config.yaml @hugovk @AlexWaygood
11+
.pre-commit-config.yaml @hugovk
1212
.ruff.toml @hugovk @AlexWaygood @AA-Turner
1313

1414
# Build system

.github/workflows/build.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177
- name: Build CPython
178178
run: |
179179
make -j4 regen-all
180-
make regen-stdlib-module-names regen-sbom regen-unicodedata
180+
make regen-stdlib-module-names regen-sbom
181181
- name: Check for changes
182182
run: |
183183
git add -u
@@ -225,8 +225,8 @@ jobs:
225225
free-threading: ${{ matrix.free-threading }}
226226

227227
build-windows-msi:
228-
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
229-
Windows MSI${{ '' }}
228+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
229+
name: Windows MSI${{ '' }} # zizmor: ignore[obfuscation]
230230
needs: build-context
231231
if: fromJSON(needs.build-context.outputs.run-windows-msi)
232232
strategy:
@@ -317,7 +317,10 @@ jobs:
317317
fail-fast: false
318318
matrix:
319319
os: [ubuntu-24.04]
320-
openssl_ver: [3.0.16, 3.1.8, 3.2.4, 3.3.3, 3.4.1]
320+
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
321+
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
322+
# supported by important vendors such as AWS-LC.
323+
openssl_ver: [1.1.1w, 3.0.17, 3.2.5, 3.3.4, 3.4.2, 3.5.2]
321324
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
322325
env:
323326
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -369,6 +372,29 @@ jobs:
369372
- name: SSL tests
370373
run: ./python Lib/test/ssltests.py
371374

375+
build-android:
376+
name: Android (${{ matrix.arch }})
377+
needs: build-context
378+
if: needs.build-context.outputs.run-tests == 'true'
379+
timeout-minutes: 60
380+
strategy:
381+
fail-fast: false
382+
matrix:
383+
include:
384+
# Use the same runs-on configuration as build-macos and build-ubuntu.
385+
- arch: aarch64
386+
runs-on: ${{ github.repository_owner == 'python' && 'ghcr.io/cirruslabs/macos-runner:sonoma' || 'macos-14' }}
387+
- arch: x86_64
388+
runs-on: ubuntu-24.04
389+
390+
runs-on: ${{ matrix.runs-on }}
391+
steps:
392+
- uses: actions/checkout@v4
393+
with:
394+
persist-credentials: false
395+
- name: Build and test
396+
run: ./Android/android.py ci ${{ matrix.arch }}-linux-android
397+
372398
build-wasi:
373399
name: 'WASI'
374400
needs: build-context
@@ -558,8 +584,8 @@ jobs:
558584
run: xvfb-run make ci
559585

560586
build-san:
561-
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
562-
Sanitizers${{ '' }}
587+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
588+
name: Sanitizers${{ '' }} # zizmor: ignore[obfuscation]
563589
needs: build-context
564590
if: needs.build-context.outputs.run-tests == 'true'
565591
strategy:
@@ -676,6 +702,7 @@ jobs:
676702
- build-macos
677703
- build-ubuntu
678704
- build-ubuntu-ssltests
705+
- build-android
679706
- build-wasi
680707
- test-hypothesis
681708
- build-asan
@@ -709,6 +736,7 @@ jobs:
709736
build-macos,
710737
build-ubuntu,
711738
build-ubuntu-ssltests,
739+
build-android,
712740
build-wasi,
713741
test-hypothesis,
714742
build-asan,

.github/workflows/jit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ jobs:
113113
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
114114
brew install llvm@${{ matrix.llvm }}
115115
export SDKROOT="$(xcrun --show-sdk-path)"
116+
# Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to
117+
# make sure we don't break downstream distributors (like uv):
118+
export CFLAGS_JIT='-Werror=unguarded-availability'
119+
export MACOSX_DEPLOYMENT_TARGET=10.15
116120
./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
117121
make all --jobs 4
118122
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.github/workflows/mypy.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ on:
1313
- "Lib/test/libregrtest/**"
1414
- "Lib/tomllib/**"
1515
- "Misc/mypy/**"
16+
- "Tools/build/check_extension_modules.py"
17+
- "Tools/build/check_warnings.py"
1618
- "Tools/build/compute-changes.py"
1719
- "Tools/build/deepfreeze.py"
18-
- "Tools/build/generate_sbom.py"
1920
- "Tools/build/generate-build-details.py"
20-
- "Tools/build/verify_ensurepip_wheels.py"
21-
- "Tools/build/update_file.py"
21+
- "Tools/build/generate_sbom.py"
22+
- "Tools/build/generate_stdlib_module_names.py"
23+
- "Tools/build/mypy.ini"
2224
- "Tools/build/umarshal.py"
25+
- "Tools/build/update_file.py"
26+
- "Tools/build/verify_ensurepip_wheels.py"
2327
- "Tools/cases_generator/**"
2428
- "Tools/clinic/**"
2529
- "Tools/jit/**"

.github/workflows/reusable-docs.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: |
6767
set -Eeuo pipefail
6868
# Build docs with the nit-picky option; write warnings to file
69-
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --warning-file sphinx-warnings.txt" html
69+
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --warning-file sphinx-warnings.txt" html
7070
- name: 'Check warnings'
7171
if: github.event_name == 'pull_request'
7272
run: |
@@ -102,3 +102,30 @@ jobs:
102102
# Use "xvfb-run" since some doctest tests open GUI windows
103103
- name: 'Run documentation doctest'
104104
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning" doctest
105+
106+
check-epub:
107+
name: 'Check EPUB'
108+
runs-on: ubuntu-latest
109+
timeout-minutes: 30
110+
steps:
111+
- uses: actions/checkout@v4
112+
with:
113+
persist-credentials: false
114+
- name: 'Set up Python'
115+
uses: actions/setup-python@v5
116+
with:
117+
python-version: '3'
118+
cache: 'pip'
119+
cache-dependency-path: 'Doc/requirements.txt'
120+
- name: 'Install build dependencies'
121+
run: |
122+
make -C Doc/ venv
123+
python -m pip install epubcheck
124+
- name: 'Build EPUB documentation'
125+
run: make -C Doc/ PYTHON=../python epub
126+
- name: 'Run epubcheck'
127+
continue-on-error: true
128+
run: epubcheck Doc/build/epub/Python.epub &> Doc/epubcheck.txt
129+
- run: cat Doc/epubcheck.txt
130+
- name: 'Check for fatal errors in EPUB'
131+
run: python Doc/tools/check-epub.py

.github/workflows/tail-call.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ jobs:
114114
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
115115
brew install llvm@${{ matrix.llvm }}
116116
export SDKROOT="$(xcrun --show-sdk-path)"
117-
export PATH="/usr/local/opt/llvm/bin:$PATH"
118-
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
117+
export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
118+
export PATH="/opt/homebrew/opt/llvm@${{ matrix.llvm }}/bin:$PATH"
119119
CC=clang-20 ./configure --with-tail-call-interp
120120
make all --jobs 4
121121
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ iOS/testbed/Python.xcframework/ios-*/lib
8080
iOS/testbed/Python.xcframework/ios-*/Python.framework
8181
iOS/testbed/iOSTestbed.xcodeproj/project.xcworkspace
8282
iOS/testbed/iOSTestbed.xcodeproj/xcuserdata
83-
iOS/testbed/iOSTestbed.xcodeproj/xcshareddata
8483
Mac/Makefile
8584
Mac/PythonLauncher/Info.plist
8685
Mac/PythonLauncher/Makefile

.pre-commit-config.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.11.8
3+
rev: v0.12.8
44
hooks:
55
- id: ruff
66
name: Run Ruff (lint) on Doc/
@@ -14,10 +14,18 @@ repos:
1414
name: Run Ruff (lint) on Tools/build/
1515
args: [--exit-non-zero-on-fix, --config=Tools/build/.ruff.toml]
1616
files: ^Tools/build/
17+
- id: ruff
18+
name: Run Ruff (lint) on Tools/i18n/
19+
args: [--exit-non-zero-on-fix, --config=Tools/i18n/.ruff.toml]
20+
files: ^Tools/i18n/
1721
- id: ruff
1822
name: Run Ruff (lint) on Argument Clinic
1923
args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
2024
files: ^Tools/clinic/|Lib/test/test_clinic.py
25+
- id: ruff
26+
name: Run Ruff (lint) on Tools/peg_generator/
27+
args: [--exit-non-zero-on-fix, --config=Tools/peg_generator/.ruff.toml]
28+
files: ^Tools/peg_generator/
2129
- id: ruff-format
2230
name: Run Ruff (format) on Doc/
2331
args: [--check]
@@ -42,7 +50,7 @@ repos:
4250
exclude: ^Tools/c-analyzer/cpython/_parser.py
4351

4452
- repo: https://github.com/pre-commit/pre-commit-hooks
45-
rev: v5.0.0
53+
rev: v6.0.0
4654
hooks:
4755
- id: check-case-conflict
4856
- id: check-merge-conflict
@@ -60,7 +68,7 @@ repos:
6068
files: '^\.github/CODEOWNERS|\.(gram)$'
6169

6270
- repo: https://github.com/python-jsonschema/check-jsonschema
63-
rev: 0.33.0
71+
rev: 0.33.2
6472
hooks:
6573
- id: check-dependabot
6674
- id: check-github-workflows
@@ -72,7 +80,7 @@ repos:
7280
- id: actionlint
7381

7482
- repo: https://github.com/woodruffw/zizmor-pre-commit
75-
rev: v1.6.0
83+
rev: v1.11.0
7684
hooks:
7785
- id: zizmor
7886

Android/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ similar to the `Android` directory of the CPython source tree.
9696

9797
## Testing
9898

99-
The Python test suite can be run on Linux, macOS, or Windows:
99+
The Python test suite can be run on Linux, macOS, or Windows.
100100

101-
* On Linux, the emulator needs access to the KVM virtualization interface, and
102-
a DISPLAY environment variable pointing at an X server. Xvfb is acceptable.
101+
On Linux, the emulator needs access to the KVM virtualization interface. This may
102+
require adding your user to a group, or changing your udev rules. On GitHub
103+
Actions, the test script will do this automatically using the commands shown
104+
[here](https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/).
103105

104106
The test suite can usually be run on a device with 2 GB of RAM, but this is
105107
borderline, so you may need to increase it to 4 GB. As of Android

Android/android-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fail() {
2424
# * https://android.googlesource.com/platform/ndk/+/ndk-rXX-release/docs/BuildSystemMaintainers.md
2525
# where XX is the NDK version. Do a diff against the version you're upgrading from, e.g.:
2626
# https://android.googlesource.com/platform/ndk/+/ndk-r25-release..ndk-r26-release/docs/BuildSystemMaintainers.md
27-
ndk_version=27.2.12479018
27+
ndk_version=27.3.13750724
2828

2929
ndk=$ANDROID_HOME/ndk/$ndk_version
3030
if ! [ -e "$ndk" ]; then

0 commit comments

Comments
 (0)