Skip to content

Commit c18a4d3

Browse files
committed
Merge in the main branch
2 parents b10d78b + dd9da73 commit c18a4d3

File tree

550 files changed

+15452
-6233
lines changed

Some content is hidden

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

550 files changed

+15452
-6233
lines changed

.github/actionlint.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
self-hosted-runner:
2+
labels: ["ubuntu-24.04-aarch64", "windows-aarch64"]
3+
4+
config-variables: null
5+
6+
paths:
7+
.github/workflows/**/*.yml:
8+
ignore:
9+
- 1st argument of function call is not assignable
10+
- SC2(015|038|086|091|097|098|129|155)

.github/workflows/build.yml

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ jobs:
5353
steps:
5454
- name: Install Git
5555
run: |
56-
apt install git -yq
56+
apt update && apt install git -yq
5757
git config --global --add safe.directory "$GITHUB_WORKSPACE"
5858
- uses: actions/checkout@v4
5959
with:
6060
fetch-depth: 1
61+
persist-credentials: false
6162
- name: Runner image version
6263
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6364
- name: Check Autoconf and aclocal versions
@@ -94,6 +95,8 @@ jobs:
9495
if: needs.check_source.outputs.run_tests == 'true'
9596
steps:
9697
- uses: actions/checkout@v4
98+
with:
99+
persist-credentials: false
97100
- uses: actions/setup-python@v5
98101
with:
99102
python-version: '3.x'
@@ -120,7 +123,7 @@ jobs:
120123
- name: Build CPython
121124
run: |
122125
make -j4 regen-all
123-
make regen-stdlib-module-names regen-sbom
126+
make regen-stdlib-module-names regen-sbom regen-unicodedata
124127
- name: Check for changes
125128
run: |
126129
git add -u
@@ -150,16 +153,28 @@ jobs:
150153
needs: check_source
151154
if: fromJSON(needs.check_source.outputs.run_tests)
152155
strategy:
156+
fail-fast: false
153157
matrix:
158+
os:
159+
- windows-latest
154160
arch:
155-
- Win32
156-
- x64
157-
- arm64
161+
- x64
158162
free-threading:
159-
- false
160-
- true
163+
- false
164+
- true
165+
include:
166+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
167+
arch: arm64
168+
free-threading: false
169+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
170+
arch: arm64
171+
free-threading: true
172+
- os: windows-latest
173+
arch: Win32
174+
free-threading: false
161175
uses: ./.github/workflows/reusable-windows.yml
162176
with:
177+
os: ${{ matrix.os }}
163178
arch: ${{ matrix.arch }}
164179
free-threading: ${{ matrix.free-threading }}
165180

@@ -223,10 +238,19 @@ jobs:
223238
free-threading:
224239
- false
225240
- true
241+
os:
242+
- ubuntu-24.04
243+
- ubuntu-24.04-aarch64
244+
is-fork: # only used for the exclusion trick
245+
- ${{ github.repository_owner != 'python' }}
246+
exclude:
247+
- os: ubuntu-24.04-aarch64
248+
is-fork: true
226249
uses: ./.github/workflows/reusable-ubuntu.yml
227250
with:
228251
config_hash: ${{ needs.check_source.outputs.config_hash }}
229252
free-threading: ${{ matrix.free-threading }}
253+
os: ${{ matrix.os }}
230254

231255
build_ubuntu_ssltests:
232256
name: 'Ubuntu SSL tests with OpenSSL'
@@ -238,14 +262,17 @@ jobs:
238262
fail-fast: false
239263
matrix:
240264
os: [ubuntu-24.04]
241-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
265+
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
266+
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
242267
env:
243268
OPENSSL_VER: ${{ matrix.openssl_ver }}
244269
MULTISSL_DIR: ${{ github.workspace }}/multissl
245270
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
246271
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
247272
steps:
248273
- uses: actions/checkout@v4
274+
with:
275+
persist-credentials: false
249276
- name: Runner image version
250277
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
251278
- name: Restore config.cache
@@ -306,6 +333,8 @@ jobs:
306333
PYTHONSTRICTEXTENSIONBUILD: 1
307334
steps:
308335
- uses: actions/checkout@v4
336+
with:
337+
persist-credentials: false
309338
- name: Register gcc problem matcher
310339
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
311340
- name: Install Dependencies
@@ -389,7 +418,7 @@ jobs:
389418
#
390419
# (GH-104097) test_sysconfig is skipped because it has tests that are
391420
# failing when executed from inside a virtual environment.
392-
${{ env.VENV_PYTHON }} -m test \
421+
"${VENV_PYTHON}" -m test \
393422
-W \
394423
-o \
395424
-j4 \
@@ -424,6 +453,8 @@ jobs:
424453
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
425454
steps:
426455
- uses: actions/checkout@v4
456+
with:
457+
persist-credentials: false
427458
- name: Runner image version
428459
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
429460
- name: Restore config.cache

.github/workflows/documentation-links.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ on:
1010
- 'Doc/**'
1111
- '.github/workflows/doc.yml'
1212

13-
permissions:
14-
pull-requests: write
15-
1613
concurrency:
1714
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1815
cancel-in-progress: true
1916

2017
jobs:
2118
documentation-links:
2219
runs-on: ubuntu-latest
20+
permissions:
21+
pull-requests: write
22+
2323
steps:
2424
- uses: readthedocs/actions/preview@v1
2525
with:

.github/workflows/jit.yml

Lines changed: 18 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ concurrency:
2828
jobs:
2929
interpreter:
3030
name: Interpreter (Debug)
31-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-24.04
3232
timeout-minutes: 90
3333
steps:
3434
- uses: actions/checkout@v4
35+
with:
36+
persist-credentials: false
3537
- name: Build tier two interpreter
3638
run: |
3739
./configure --enable-experimental-jit=interpreter --with-pydebug
@@ -54,9 +56,7 @@ jobs:
5456
- x86_64-apple-darwin/clang
5557
- aarch64-apple-darwin/clang
5658
- x86_64-unknown-linux-gnu/gcc
57-
- x86_64-unknown-linux-gnu/clang
5859
- aarch64-unknown-linux-gnu/gcc
59-
- aarch64-unknown-linux-gnu/clang
6060
debug:
6161
- true
6262
- false
@@ -66,43 +66,29 @@ jobs:
6666
- target: i686-pc-windows-msvc/msvc
6767
architecture: Win32
6868
runner: windows-latest
69-
compiler: msvc
7069
- target: x86_64-pc-windows-msvc/msvc
7170
architecture: x64
7271
runner: windows-latest
73-
compiler: msvc
7472
- target: aarch64-pc-windows-msvc/msvc
7573
architecture: ARM64
7674
runner: windows-latest
77-
compiler: msvc
7875
- target: x86_64-apple-darwin/clang
7976
architecture: x86_64
8077
runner: macos-13
81-
compiler: clang
8278
- target: aarch64-apple-darwin/clang
8379
architecture: aarch64
8480
runner: macos-14
85-
compiler: clang
8681
- target: x86_64-unknown-linux-gnu/gcc
8782
architecture: x86_64
88-
runner: ubuntu-22.04
89-
compiler: gcc
90-
- target: x86_64-unknown-linux-gnu/clang
91-
architecture: x86_64
92-
runner: ubuntu-22.04
93-
compiler: clang
83+
runner: ubuntu-24.04
9484
- target: aarch64-unknown-linux-gnu/gcc
9585
architecture: aarch64
96-
runner: ubuntu-22.04
97-
compiler: gcc
98-
- target: aarch64-unknown-linux-gnu/clang
99-
architecture: aarch64
100-
runner: ubuntu-22.04
101-
compiler: clang
102-
env:
103-
CC: ${{ matrix.compiler }}
86+
# Forks don't have access to our paid AArch64 runners. These jobs are skipped below:
87+
runner: ${{ github.repository_owner == 'python' && 'ubuntu-24.04-aarch64' || 'ubuntu-24.04' }}
10488
steps:
10589
- uses: actions/checkout@v4
90+
with:
91+
persist-credentials: false
10692
- uses: actions/setup-python@v5
10793
with:
10894
python-version: '3.11'
@@ -111,10 +97,10 @@ jobs:
11197
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
11298
run: |
11399
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
114-
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
100+
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
115101
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
116102
117-
# No PGO or tests (yet):
103+
# No tests (yet):
118104
- name: Emulated Windows
119105
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
120106
run: |
@@ -123,7 +109,7 @@ jobs:
123109
124110
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
125111
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
126-
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
112+
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
127113
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
128114
- name: Native macOS
129115
if: runner.os == 'macOS'
@@ -132,50 +118,32 @@ jobs:
132118
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
133119
brew install llvm@${{ matrix.llvm }}
134120
export SDKROOT="$(xcrun --show-sdk-path)"
135-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
121+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
136122
make all --jobs 4
137123
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
138124
139125
- name: Native Linux
140-
if: runner.os == 'Linux' && matrix.architecture == 'x86_64'
126+
# Forks don't have access to our paid AArch64 runners. Skip those:
127+
if: runner.os == 'Linux' && (matrix.architecture == 'x86_64' || github.repository_owner == 'python')
141128
run: |
142129
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
143130
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
144-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
131+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
145132
make all --jobs 4
146133
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
147134
148-
- name: Emulated Linux
149-
if: runner.os == 'Linux' && matrix.architecture != 'x86_64'
150-
# The --ignorefile on ./python -m test is used to exclude tests known to fail when running on an emulated Linux.
151-
run: |
152-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
153-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
154-
./configure --prefix="$(pwd)/../build"
155-
make install --jobs 4
156-
make clean --jobs 4
157-
export HOST=${{ matrix.architecture }}-linux-gnu
158-
sudo apt install --yes "gcc-$HOST" qemu-user
159-
${{ !matrix.debug && matrix.compiler == 'clang' && './configure --enable-optimizations' || '' }}
160-
${{ !matrix.debug && matrix.compiler == 'clang' && 'make profile-run-stamp --jobs 4' || '' }}
161-
export QEMU_LD_PREFIX="/usr/$HOST"
162-
CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
163-
CPP="$CC --preprocess" \
164-
HOSTRUNNER=qemu-${{ matrix.architecture }} \
165-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--with-lto' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
166-
make all --jobs 4
167-
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
168-
169135
jit-with-disabled-gil:
170136
name: Free-Threaded (Debug)
171137
needs: interpreter
172-
runs-on: ubuntu-22.04
138+
runs-on: ubuntu-24.04
173139
strategy:
174140
matrix:
175141
llvm:
176142
- 19
177143
steps:
178144
- uses: actions/checkout@v4
145+
with:
146+
persist-credentials: false
179147
- uses: actions/setup-python@v5
180148
with:
181149
python-version: '3.11'

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
2325
- uses: actions/setup-python@v5
2426
with:
2527
python-version: "3.x"

.github/workflows/mypy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
timeout-minutes: 10
5252
steps:
5353
- uses: actions/checkout@v4
54+
with:
55+
persist-credentials: false
5456
- uses: actions/setup-python@v5
5557
with:
5658
python-version: "3.13"

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ on:
44
pull_request:
55
types: [opened, reopened, labeled, unlabeled, synchronize]
66

7-
permissions:
8-
issues: write
9-
pull-requests: write
10-
117
jobs:
128
label-dnm:
139
name: DO-NOT-MERGE
1410
if: github.repository_owner == 'python'
1511
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
pull-requests: write
1615
timeout-minutes: 10
1716

1817
steps:
@@ -28,6 +27,9 @@ jobs:
2827
name: Unresolved review
2928
if: github.repository_owner == 'python'
3029
runs-on: ubuntu-latest
30+
permissions:
31+
issues: write
32+
pull-requests: write
3133
timeout-minutes: 10
3234

3335
steps:

.github/workflows/reusable-change-detection.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
- run: >-
6262
echo '${{ github.event_name }}'
6363
- uses: actions/checkout@v4
64+
with:
65+
persist-credentials: false
6466
- name: Check for source changes
6567
id: check
6668
run: |

0 commit comments

Comments
 (0)