Skip to content

Commit 0d1dc7e

Browse files
committed
Merge branch 'main' into pythongh-116380
2 parents be260c1 + d0ecbdd commit 0d1dc7e

File tree

752 files changed

+29388
-13310
lines changed

Some content is hidden

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

752 files changed

+29388
-13310
lines changed

.github/workflows/build.yml

+24-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
4747
runs-on: ubuntu-24.04
4848
container:
49-
image: ghcr.io/python/autoconf:2024.11.11.11786316759
49+
image: ghcr.io/python/autoconf:2025.01.02.12581854023
5050
timeout-minutes: 60
5151
needs: check_source
5252
if: needs.check_source.outputs.run_tests == 'true'
@@ -58,11 +58,12 @@ jobs:
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
6465
run: |
65-
grep "Generated by GNU Autoconf 2.71" configure
66+
grep "Generated by GNU Autoconf 2.72" configure
6667
grep "aclocal 1.16.5" aclocal.m4
6768
grep -q "runstatedir" configure
6869
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
@@ -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
@@ -235,10 +238,19 @@ jobs:
235238
free-threading:
236239
- false
237240
- 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
238249
uses: ./.github/workflows/reusable-ubuntu.yml
239250
with:
240251
config_hash: ${{ needs.check_source.outputs.config_hash }}
241252
free-threading: ${{ matrix.free-threading }}
253+
os: ${{ matrix.os }}
242254

243255
build_ubuntu_ssltests:
244256
name: 'Ubuntu SSL tests with OpenSSL'
@@ -250,14 +262,17 @@ jobs:
250262
fail-fast: false
251263
matrix:
252264
os: [ubuntu-24.04]
253-
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
254267
env:
255268
OPENSSL_VER: ${{ matrix.openssl_ver }}
256269
MULTISSL_DIR: ${{ github.workspace }}/multissl
257270
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
258271
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
259272
steps:
260273
- uses: actions/checkout@v4
274+
with:
275+
persist-credentials: false
261276
- name: Runner image version
262277
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
263278
- name: Restore config.cache
@@ -318,6 +333,8 @@ jobs:
318333
PYTHONSTRICTEXTENSIONBUILD: 1
319334
steps:
320335
- uses: actions/checkout@v4
336+
with:
337+
persist-credentials: false
321338
- name: Register gcc problem matcher
322339
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
323340
- name: Install Dependencies
@@ -401,7 +418,7 @@ jobs:
401418
#
402419
# (GH-104097) test_sysconfig is skipped because it has tests that are
403420
# failing when executed from inside a virtual environment.
404-
${{ env.VENV_PYTHON }} -m test \
421+
"${VENV_PYTHON}" -m test \
405422
-W \
406423
-o \
407424
-j4 \
@@ -436,6 +453,8 @@ jobs:
436453
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
437454
steps:
438455
- uses: actions/checkout@v4
456+
with:
457+
persist-credentials: false
439458
- name: Runner image version
440459
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
441460
- name: Restore config.cache

.github/workflows/documentation-links.yml

+3-3
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

+18-50
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

+2
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

+2
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

+6-4
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

+2
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)