Skip to content

Commit a214081

Browse files
committed
Merge branch 'main' into simplify-conv-confname
2 parents 97bee9a + 9d08423 commit a214081

File tree

455 files changed

+11862
-5101
lines changed

Some content is hidden

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

455 files changed

+11862
-5101
lines changed

.azure-pipelines/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
displayName: Pre-build checks
66

77
pool:
8-
vmImage: ubuntu-22.04
8+
vmImage: ubuntu-24.04
99

1010
steps:
1111
- template: ./prebuild-checks.yml

.github/CODEOWNERS

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ Objects/exceptions.c @iritkatriel
8888
**/sha* @gpshead @tiran
8989
Modules/md5* @gpshead @tiran
9090
**/*blake* @gpshead @tiran
91-
Modules/_blake2/** @gpshead @tiran
9291
Modules/_hacl/** @gpshead
9392

9493
# logging
@@ -255,8 +254,8 @@ Modules/_interp*module.c @ericsnowcurrently
255254
Lib/test/test_interpreters/ @ericsnowcurrently
256255

257256
# Android
258-
**/*Android* @mhsmith
259-
**/*android* @mhsmith
257+
**/*Android* @mhsmith @freakboy3742
258+
**/*android* @mhsmith @freakboy3742
260259

261260
# iOS (but not termios)
262261
**/iOS* @freakboy3742
@@ -267,7 +266,7 @@ Lib/test/test_interpreters/ @ericsnowcurrently
267266
**/*-ios* @freakboy3742
268267

269268
# WebAssembly
270-
/Tools/wasm/ @brettcannon
269+
/Tools/wasm/ @brettcannon @freakboy3742
271270

272271
# SBOM
273272
/Misc/externals.spdx.json @sethmlarson

.github/workflows/build.yml

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
with:
6060
fetch-depth: 1
6161
- name: Runner image version
62-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
62+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6363
- name: Check Autoconf and aclocal versions
6464
run: |
6565
grep "Generated by GNU Autoconf 2.71" configure
@@ -88,7 +88,7 @@ jobs:
8888
name: 'Check if generated files are up to date'
8989
# Don't use ubuntu-latest but a specific version to make the job
9090
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
91-
runs-on: ubuntu-22.04
91+
runs-on: ubuntu-24.04
9292
timeout-minutes: 60
9393
needs: check_source
9494
if: needs.check_source.outputs.run_tests == 'true'
@@ -98,7 +98,7 @@ jobs:
9898
with:
9999
python-version: '3.x'
100100
- name: Runner image version
101-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
101+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
102102
- name: Restore config.cache
103103
uses: actions/cache@v4
104104
with:
@@ -108,7 +108,7 @@ jobs:
108108
- name: Install Dependencies
109109
run: sudo ./.github/workflows/posix-deps-apt.sh
110110
- name: Add ccache to PATH
111-
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
111+
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
112112
- name: Configure ccache action
113113
uses: hendrikmuhs/[email protected]
114114
with:
@@ -237,7 +237,7 @@ jobs:
237237
strategy:
238238
fail-fast: false
239239
matrix:
240-
os: [ubuntu-22.04]
240+
os: [ubuntu-24.04]
241241
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
242242
env:
243243
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -247,7 +247,7 @@ jobs:
247247
steps:
248248
- uses: actions/checkout@v4
249249
- name: Runner image version
250-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
250+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
251251
- name: Restore config.cache
252252
uses: actions/cache@v4
253253
with:
@@ -259,9 +259,9 @@ jobs:
259259
run: sudo ./.github/workflows/posix-deps-apt.sh
260260
- name: Configure OpenSSL env vars
261261
run: |
262-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
263-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
264-
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
262+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
263+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
264+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
265265
- name: 'Restore OpenSSL build'
266266
id: cache-openssl
267267
uses: actions/cache@v4
@@ -270,16 +270,16 @@ jobs:
270270
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
271271
- name: Install OpenSSL
272272
if: steps.cache-openssl.outputs.cache-hit != 'true'
273-
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
273+
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
274274
- name: Add ccache to PATH
275275
run: |
276-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
276+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
277277
- name: Configure ccache action
278278
uses: hendrikmuhs/[email protected]
279279
with:
280280
save: false
281281
- name: Configure CPython
282-
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl=$OPENSSL_DIR
282+
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
283283
- name: Build CPython
284284
run: make -j4
285285
- name: Display build info
@@ -297,7 +297,7 @@ jobs:
297297

298298
test_hypothesis:
299299
name: "Hypothesis tests on Ubuntu"
300-
runs-on: ubuntu-22.04
300+
runs-on: ubuntu-24.04
301301
timeout-minutes: 60
302302
needs: check_source
303303
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
@@ -312,9 +312,9 @@ jobs:
312312
run: sudo ./.github/workflows/posix-deps-apt.sh
313313
- name: Configure OpenSSL env vars
314314
run: |
315-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
316-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
317-
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
315+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
316+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
317+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
318318
- name: 'Restore OpenSSL build'
319319
id: cache-openssl
320320
uses: actions/cache@v4
@@ -323,24 +323,24 @@ jobs:
323323
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
324324
- name: Install OpenSSL
325325
if: steps.cache-openssl.outputs.cache-hit != 'true'
326-
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
326+
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
327327
- name: Add ccache to PATH
328328
run: |
329-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
329+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
330330
- name: Configure ccache action
331331
uses: hendrikmuhs/[email protected]
332332
with:
333333
save: false
334334
- name: Setup directory envs for out-of-tree builds
335335
run: |
336-
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
337-
echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
336+
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
337+
echo "CPYTHON_BUILDDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-builddir)" >> "$GITHUB_ENV"
338338
- name: Create directories for read-only out-of-tree builds
339-
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
339+
run: mkdir -p "$CPYTHON_RO_SRCDIR" "$CPYTHON_BUILDDIR"
340340
- name: Bind mount sources read-only
341-
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
341+
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
342342
- name: Runner image version
343-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
343+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
344344
- name: Restore config.cache
345345
uses: actions/cache@v4
346346
with:
@@ -353,7 +353,7 @@ jobs:
353353
--config-cache \
354354
--with-pydebug \
355355
--enable-slower-safety \
356-
--with-openssl=$OPENSSL_DIR
356+
--with-openssl="$OPENSSL_DIR"
357357
- name: Build CPython out-of-tree
358358
working-directory: ${{ env.CPYTHON_BUILDDIR }}
359359
run: make -j4
@@ -362,18 +362,18 @@ jobs:
362362
run: make pythoninfo
363363
- name: Remount sources writable for tests
364364
# some tests write to srcdir, lack of pyc files slows down testing
365-
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
365+
run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw
366366
- name: Setup directory envs for out-of-tree builds
367367
run: |
368-
echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
368+
echo "CPYTHON_BUILDDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-builddir)" >> "$GITHUB_ENV"
369369
- name: "Create hypothesis venv"
370370
working-directory: ${{ env.CPYTHON_BUILDDIR }}
371371
run: |
372372
VENV_LOC=$(realpath -m .)/hypovenv
373373
VENV_PYTHON=$VENV_LOC/bin/python
374-
echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV
375-
echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV
376-
./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt
374+
echo "HYPOVENV=${VENV_LOC}" >> "$GITHUB_ENV"
375+
echo "VENV_PYTHON=${VENV_PYTHON}" >> "$GITHUB_ENV"
376+
./python -m venv "$VENV_LOC" && "$VENV_PYTHON" -m pip install -r "${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt"
377377
- name: 'Restore Hypothesis database'
378378
id: cache-hypothesis-database
379379
uses: actions/cache@v4
@@ -411,18 +411,21 @@ jobs:
411411

412412
build_asan:
413413
name: 'Address sanitizer'
414-
runs-on: ubuntu-22.04
414+
runs-on: ${{ matrix.os }}
415415
timeout-minutes: 60
416416
needs: check_source
417417
if: needs.check_source.outputs.run_tests == 'true'
418+
strategy:
419+
matrix:
420+
os: [ubuntu-24.04]
418421
env:
419422
OPENSSL_VER: 3.0.15
420423
PYTHONSTRICTEXTENSIONBUILD: 1
421424
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
422425
steps:
423426
- uses: actions/checkout@v4
424427
- name: Runner image version
425-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
428+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
426429
- name: Restore config.cache
427430
uses: actions/cache@v4
428431
with:
@@ -438,9 +441,9 @@ jobs:
438441
version: 10
439442
- name: Configure OpenSSL env vars
440443
run: |
441-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
442-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
443-
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
444+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
445+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
446+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
444447
- name: 'Restore OpenSSL build'
445448
id: cache-openssl
446449
uses: actions/cache@v4
@@ -449,10 +452,10 @@ jobs:
449452
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
450453
- name: Install OpenSSL
451454
if: steps.cache-openssl.outputs.cache-hit != 'true'
452-
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
455+
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
453456
- name: Add ccache to PATH
454457
run: |
455-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
458+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
456459
- name: Configure ccache action
457460
uses: hendrikmuhs/[email protected]
458461
with:
@@ -465,7 +468,7 @@ jobs:
465468
- name: Display build info
466469
run: make pythoninfo
467470
- name: Tests
468-
run: xvfb-run make test
471+
run: xvfb-run make ci
469472

470473
build_tsan:
471474
name: 'Thread sanitizer'

.github/workflows/jit.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828
jobs:
2929
interpreter:
3030
name: Interpreter (Debug)
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-22.04
3232
timeout-minutes: 90
3333
steps:
3434
- uses: actions/checkout@v4
@@ -61,7 +61,7 @@ jobs:
6161
- true
6262
- false
6363
llvm:
64-
- 18
64+
- 19
6565
include:
6666
- target: i686-pc-windows-msvc/msvc
6767
architecture: Win32
@@ -85,19 +85,19 @@ jobs:
8585
compiler: clang
8686
- target: x86_64-unknown-linux-gnu/gcc
8787
architecture: x86_64
88-
runner: ubuntu-latest
88+
runner: ubuntu-22.04
8989
compiler: gcc
9090
- target: x86_64-unknown-linux-gnu/clang
9191
architecture: x86_64
92-
runner: ubuntu-latest
92+
runner: ubuntu-22.04
9393
compiler: clang
9494
- target: aarch64-unknown-linux-gnu/gcc
9595
architecture: aarch64
96-
runner: ubuntu-latest
96+
runner: ubuntu-22.04
9797
compiler: gcc
9898
- target: aarch64-unknown-linux-gnu/clang
9999
architecture: aarch64
100-
runner: ubuntu-latest
100+
runner: ubuntu-22.04
101101
compiler: clang
102102
env:
103103
CC: ${{ matrix.compiler }}
@@ -121,13 +121,18 @@ jobs:
121121
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
122122
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
123123
124+
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
125+
# 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
127+
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
124128
- name: Native macOS
125129
if: runner.os == 'macOS'
126130
run: |
127131
brew update
132+
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
128133
brew install llvm@${{ matrix.llvm }}
129-
SDKROOT="$(xcrun --show-sdk-path)" \
130-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
134+
export SDKROOT="$(xcrun --show-sdk-path)"
135+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
131136
make all --jobs 4
132137
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
133138
@@ -164,16 +169,20 @@ jobs:
164169
jit-with-disabled-gil:
165170
name: Free-Threaded (Debug)
166171
needs: interpreter
167-
runs-on: ubuntu-latest
172+
runs-on: ubuntu-22.04
173+
strategy:
174+
matrix:
175+
llvm:
176+
- 19
168177
steps:
169178
- uses: actions/checkout@v4
170179
- uses: actions/setup-python@v5
171180
with:
172181
python-version: '3.11'
173182
- name: Build with JIT enabled and GIL disabled
174183
run: |
175-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 18
176-
export PATH="$(llvm-config-18 --bindir):$PATH"
184+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
185+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
177186
./configure --enable-experimental-jit --with-pydebug --disable-gil
178187
make all --jobs 4
179188
- name: Run tests

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ apt-get -yq install \
1313
libgdbm-dev \
1414
libgdbm-compat-dev \
1515
liblzma-dev \
16-
libmpdec-dev \
1716
libncurses5-dev \
1817
libreadline6-dev \
1918
libsqlite3-dev \

0 commit comments

Comments
 (0)