Skip to content

Commit ca788f4

Browse files
Merge branch '3.15' into backport-0fb82b4-3.15
2 parents 5aadf2d + 6e6884b commit ca788f4

617 files changed

Lines changed: 18313 additions & 4835 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/actionlint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
config-variables: null
22

3+
# Pending release of actionlint > 1.7.12 for ubuntu-26.04* support:
4+
# https://github.com/rhysd/actionlint/pull/683
5+
self-hosted-runner:
6+
labels:
7+
- ubuntu-26.04
8+
- ubuntu-26.04-arm
9+
310
paths:
411
.github/workflows/**/*.yml:
512
ignore:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
jobs:
1919
add-header:
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-slim
2121
permissions:
2222
issues: write
2323
timeout-minutes: 5

.github/workflows/build.yml

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
name: 'Check if Autoconf files are up to date'
101101
# Don't use ubuntu-latest but a specific version to make the job
102102
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
103-
runs-on: ubuntu-24.04
103+
runs-on: ubuntu-26.04
104104
container:
105105
image: ghcr.io/python/autoconf:2025.01.02.12581854023
106106
timeout-minutes: 60
@@ -143,7 +143,7 @@ jobs:
143143
name: 'Check if generated files are up to date'
144144
# Don't use ubuntu-latest but a specific version to make the job
145145
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
146-
runs-on: ubuntu-24.04
146+
runs-on: ubuntu-26.04
147147
timeout-minutes: 60
148148
needs: build-context
149149
if: needs.build-context.outputs.run-tests == 'true'
@@ -253,16 +253,16 @@ jobs:
253253
strategy:
254254
fail-fast: false
255255
matrix:
256-
# macos-26 is Apple Silicon, macos-15-intel is Intel.
257-
# macos-15-intel only runs tests against the GIL-enabled CPython.
256+
# macos-26 is Apple Silicon, macos-26-intel is Intel.
257+
# macos-26-intel only runs tests against the GIL-enabled CPython.
258258
os:
259259
- macos-26
260-
- macos-15-intel
260+
- macos-26-intel
261261
free-threading:
262262
- false
263263
- true
264264
exclude:
265-
- os: macos-15-intel
265+
- os: macos-26-intel
266266
free-threading: true
267267
uses: ./.github/workflows/reusable-macos.yml
268268
with:
@@ -286,18 +286,18 @@ jobs:
286286
- false
287287
- true
288288
os:
289-
- ubuntu-24.04
290-
- ubuntu-24.04-arm
289+
- ubuntu-26.04
290+
- ubuntu-26.04-arm
291291
exclude:
292292
# Do not test BOLT with free-threading, to conserve resources
293293
- bolt: true
294294
free-threading: true
295295
# BOLT currently crashes during instrumentation on aarch64
296-
- os: ubuntu-24.04-arm
296+
- os: ubuntu-26.04-arm
297297
bolt: true
298298
include:
299299
# Enable CPU-intensive tests on ARM (default build only)
300-
- os: ubuntu-24.04-arm
300+
- os: ubuntu-26.04-arm
301301
bolt: false
302302
free-threading: false
303303
test-opts: '-u cpu'
@@ -317,7 +317,7 @@ jobs:
317317
strategy:
318318
fail-fast: false
319319
matrix:
320-
os: [ubuntu-24.04]
320+
os: [ubuntu-26.04]
321321
ssllib:
322322
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
323323
## OpenSSL
@@ -393,38 +393,29 @@ jobs:
393393
- arch: aarch64
394394
runs-on: macos-26
395395
- arch: x86_64
396-
runs-on: ubuntu-24.04
396+
runs-on: ubuntu-26.04
397397

398398
runs-on: ${{ matrix.runs-on }}
399399
steps:
400400
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
401401
with:
402402
persist-credentials: false
403403
- name: Build and test
404-
run: python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
404+
run: JAVA_HOME="${JAVA_HOME_21_X64:-$JAVA_HOME_21_arm64}" python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
405405

406406
build-ios:
407407
name: iOS
408408
needs: build-context
409409
if: needs.build-context.outputs.run-ios == 'true'
410410
timeout-minutes: 60
411-
runs-on: macos-14
411+
runs-on: macos-26
412412
steps:
413413
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
414414
with:
415415
persist-credentials: false
416416

417-
# GitHub recommends explicitly selecting the desired Xcode version:
418-
# https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
419-
# This became a necessity as a result of
420-
# https://github.com/actions/runner-images/issues/12541 and
421-
# https://github.com/actions/runner-images/issues/12751.
422-
- name: Select Xcode version
423-
run: |
424-
sudo xcode-select --switch /Applications/Xcode_15.4.app
425-
426417
- name: Build and test
427-
run: python3 Platforms/Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
418+
run: python3 Platforms/Apple ci iOS --fast-ci
428419

429420
build-emscripten:
430421
name: 'Emscripten'
@@ -440,7 +431,7 @@ jobs:
440431

441432
test-hypothesis:
442433
name: "Hypothesis tests on Ubuntu"
443-
runs-on: ubuntu-24.04
434+
runs-on: ubuntu-26.04
444435
timeout-minutes: 60
445436
needs: build-context
446437
if: needs.build-context.outputs.run-ubuntu == 'true'
@@ -551,7 +542,7 @@ jobs:
551542
strategy:
552543
fail-fast: false
553544
matrix:
554-
os: [ubuntu-24.04]
545+
os: [ubuntu-26.04]
555546
env:
556547
OPENSSL_VER: 3.5.7
557548
PYTHONSTRICTEXTENSIONBUILD: 1
@@ -566,10 +557,6 @@ jobs:
566557
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
567558
- name: Install dependencies
568559
run: sudo ./.github/workflows/posix-deps-apt.sh
569-
- name: Set up GCC-10 for ASAN
570-
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
571-
with:
572-
version: 10
573560
- name: Configure OpenSSL env vars
574561
run: |
575562
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
@@ -619,7 +606,7 @@ jobs:
619606

620607
cross-build-linux:
621608
name: Cross build Linux
622-
runs-on: ubuntu-latest
609+
runs-on: ubuntu-26.04
623610
timeout-minutes: 60
624611
needs: build-context
625612
if: needs.build-context.outputs.run-ubuntu == 'true'
@@ -648,6 +635,9 @@ jobs:
648635
run: ./configure --prefix="$BUILD_DIR/cross-python" --with-build-python="$BUILD_DIR/host-python/bin/python3"
649636
- name: Install cross Python
650637
run: make -j8 install
638+
- name: Display build info
639+
run: |
640+
"$BUILD_DIR/cross-python/bin/python3" -m test.pythoninfo
651641
- name: Run test subset with host build
652642
run: |
653643
"$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed

.github/workflows/jit.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ env:
2929
jobs:
3030
interpreter:
3131
name: Interpreter (Debug)
32-
runs-on: ubuntu-24.04
32+
runs-on: ubuntu-26.04
3333
timeout-minutes: 60
3434
steps:
3535
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -102,9 +102,9 @@ jobs:
102102
- false
103103
include:
104104
- target: x86_64-apple-darwin/clang
105-
runner: macos-15-intel
105+
runner: macos-26-intel
106106
- target: aarch64-apple-darwin/clang
107-
runner: macos-15
107+
runner: macos-26
108108
steps:
109109
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
110110
with:
@@ -145,9 +145,9 @@ jobs:
145145
- false
146146
include:
147147
- target: x86_64-unknown-linux-gnu/gcc
148-
runner: ubuntu-24.04
148+
runner: ubuntu-26.04
149149
- target: aarch64-unknown-linux-gnu/gcc
150-
runner: ubuntu-24.04-arm
150+
runner: ubuntu-26.04-arm
151151
steps:
152152
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
153153
with:
@@ -160,8 +160,7 @@ jobs:
160160
sudo ./.github/workflows/posix-deps-apt.sh
161161
- name: Build
162162
run: |
163-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
164-
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
163+
# On ubuntu-26.04 image, clang is clang-21 by default
165164
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
166165
make all --jobs 4
167166
- name: Test
@@ -171,7 +170,7 @@ jobs:
171170
linux-extras:
172171
name: ${{ matrix.name }}
173172

174-
runs-on: ubuntu-24.04
173+
runs-on: ubuntu-26.04
175174
timeout-minutes: 60
176175
strategy:
177176
fail-fast: false
@@ -202,8 +201,7 @@ jobs:
202201
sudo ./.github/workflows/posix-deps-apt.sh
203202
- name: Build
204203
run: |
205-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
206-
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
204+
# On ubuntu-26.04 image, clang is clang-21 by default
207205
if [ "${{ matrix.use_clang }}" = "true" ]; then
208206
export CC=clang-${{ env.LLVM_VERSION }}
209207
fi

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
notify-new-bugs-announce:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-slim
1414
permissions:
1515
issues: read
1616
timeout-minutes: 10

.github/workflows/posix-deps-apt.sh

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,23 @@ apt-get -yq --no-install-recommends install \
55
build-essential \
66
pkg-config \
77
cmake \
8+
curl \
89
gdb \
910
lcov \
1011
libb2-dev \
1112
libbz2-dev \
1213
libffi-dev \
13-
libgdbm-dev \
1414
libgdbm-compat-dev \
15+
libgdbm-dev \
1516
liblzma-dev \
17+
libmpdec-dev \
1618
libncurses5-dev \
1719
libreadline6-dev \
1820
libsqlite3-dev \
1921
libssl-dev \
2022
libzstd-dev \
21-
lzma \
22-
lzma-dev \
2323
strace \
2424
tk-dev \
2525
uuid-dev \
2626
xvfb \
2727
zlib1g-dev
28-
29-
# Workaround missing libmpdec-dev on ubuntu 24.04 by building mpdecimal
30-
# from source. ppa:ondrej/php (launchpad.net) are unreliable
31-
# (https://status.canonical.com) so fetch the tarball directly
32-
# from the upstream host.
33-
# https://www.bytereef.org/mpdecimal/
34-
MPDECIMAL_VERSION=4.0.1
35-
curl -fsSL "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${MPDECIMAL_VERSION}.tar.gz" \
36-
| tar -xz -C /tmp
37-
(cd "/tmp/mpdecimal-${MPDECIMAL_VERSION}" \
38-
&& ./configure --prefix=/usr/local \
39-
&& make -j"$(nproc)" \
40-
&& make install)
41-
ldconfig

.github/workflows/require-pr-label.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
label-dnm:
1212
name: DO-NOT-MERGE
1313
if: github.repository_owner == 'python'
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-slim
1515
permissions:
1616
pull-requests: read
1717
timeout-minutes: 10
@@ -28,7 +28,7 @@ jobs:
2828
label-reviews:
2929
name: Unresolved review
3030
if: github.repository_owner == 'python'
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-slim
3232
permissions:
3333
pull-requests: read
3434
timeout-minutes: 10

.github/workflows/reusable-docs.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ name: Reusable Docs
33
on:
44
workflow_call:
55
workflow_dispatch:
6+
# Pushes to CPython branches seed the pip caches under the exact keys every
7+
# docs PR restores from. Without a branch-scoped copy, each PR saves a
8+
# duplicate into its own refs/pull/N/merge scope that nothing else can read.
9+
push:
10+
branches:
11+
- main
12+
- '3.*'
13+
paths:
14+
- 'Doc/pylock.toml'
15+
- 'Doc/requirements.txt'
16+
- '.github/workflows/reusable-docs.yml'
617

718
permissions:
819
contents: read
@@ -95,7 +106,7 @@ jobs:
95106
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
96107
doctest:
97108
name: 'Doctest'
98-
runs-on: ubuntu-24.04
109+
runs-on: ubuntu-26.04
99110
timeout-minutes: 60
100111
steps:
101112
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

.github/workflows/reusable-emscripten.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
jobs:
1313
build-emscripten-reusable:
1414
name: 'build and test'
15-
runs-on: ubuntu-24.04
15+
runs-on: ubuntu-26.04
1616
timeout-minutes: 40
1717
steps:
1818
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -63,15 +63,19 @@ jobs:
6363
run: python3 Platforms/emscripten configure-build-python -- --config-cache --with-pydebug
6464
- name: "Make build Python"
6565
run: python3 Platforms/emscripten make-build-python
66+
- name: "Display build info of the build Python"
67+
run: python3 Platforms/emscripten pythoninfo-build
6668
- name: "Make dependencies"
6769
run: >-
6870
python3 Platforms/emscripten make-dependencies
6971
${{ steps.emsdk-cache.outputs.cache-hit == 'true' && '--check-up-to-date' || '' }}
70-
- name: "Configure host Python"
72+
- name: "Configure host/Emscripten Python"
7173
run: python3 Platforms/emscripten configure-host --host-runner node -- --config-cache
72-
- name: "Make host Python"
74+
- name: "Make host/Emscripten Python"
7375
run: python3 Platforms/emscripten make-host
74-
- name: "Display build info"
75-
run: python3 Platforms/emscripten run --pythoninfo
76+
- name: "Display build info of the host/Emscripten Python"
77+
run: python3 Platforms/emscripten pythoninfo-host
7678
- name: "Test"
7779
run: python3 Platforms/emscripten run --test
80+
- name: "Test Repl"
81+
run: Platforms/emscripten/browser_test/run_test.sh

.github/workflows/reusable-macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ jobs:
5454
--prefix=/opt/python-dev \
5555
--with-openssl="$(brew --prefix openssl@3.5)"
5656
- name: Build CPython
57-
if : ${{ inputs.free-threading || inputs.os != 'macos-15-intel' }}
57+
if : ${{ inputs.free-threading || inputs.os != 'macos-26-intel' }}
5858
run: gmake -j8
5959
- name: Build CPython for compiler warning check
60-
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
60+
if : ${{ !inputs.free-threading && inputs.os == 'macos-26-intel' }}
6161
run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt
6262
- name: Display build info
6363
run: make pythoninfo
6464
- name: Check compiler warnings
65-
if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }}
65+
if : ${{ !inputs.free-threading && inputs.os == 'macos-26-intel' }}
6666
run: >-
6767
python3 Tools/build/check_warnings.py
6868
--compiler-output-file-path=compiler_output_macos.txt

0 commit comments

Comments
 (0)