Skip to content

Commit f6aa7d8

Browse files
authored
Merge branch 'main' into cmaloney/strace_take_2
2 parents e05831a + f0c6fcc commit f6aa7d8

File tree

1,286 files changed

+27473
-11225
lines changed

Some content is hidden

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

1,286 files changed

+27473
-11225
lines changed

.github/CODEOWNERS

+6-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Makefile.pre.in @erlend-aasland
1717
Modules/Setup* @erlend-aasland
1818

1919
# asyncio
20-
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303 @willingc
20+
**/*asyncio* @1st1 @asvetlov @kumaraditya303 @willingc
2121

2222
# Core
2323
**/*context* @1st1
@@ -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
@@ -280,3 +279,5 @@ Lib/test/test_configparser.py @jaraco
280279

281280
# Doc sections
282281
Doc/reference/ @willingc
282+
283+
**/*weakref* @kumaraditya303

.github/ISSUE_TEMPLATE/bug.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ body:
3434
label: "CPython versions tested on:"
3535
multiple: true
3636
options:
37-
- "3.8"
3837
- "3.9"
3938
- "3.10"
4039
- "3.11"
4140
- "3.12"
4241
- "3.13"
42+
- "3.14"
4343
- "CPython main branch"
4444
validations:
4545
required: true

.github/ISSUE_TEMPLATE/crash.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ body:
2727
label: "CPython versions tested on:"
2828
multiple: true
2929
options:
30-
- "3.8"
3130
- "3.9"
3231
- "3.10"
3332
- "3.11"
3433
- "3.12"
3534
- "3.13"
35+
- "3.14"
3636
- "CPython main branch"
3737
validations:
3838
required: true

.github/workflows/build.yml

+82-42
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,50 @@ jobs:
4040
if: fromJSON(needs.check_source.outputs.run-docs)
4141
uses: ./.github/workflows/reusable-docs.yml
4242

43+
check_autoconf_regen:
44+
name: 'Check if Autoconf files are up to date'
45+
# Don't use ubuntu-latest but a specific version to make the job
46+
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
47+
runs-on: ubuntu-24.04
48+
container:
49+
image: ghcr.io/python/autoconf:2024.10.16.11360930377
50+
timeout-minutes: 60
51+
needs: check_source
52+
if: needs.check_source.outputs.run_tests == 'true'
53+
steps:
54+
- name: Install Git
55+
run: |
56+
apt install git -yq
57+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
58+
- uses: actions/checkout@v4
59+
with:
60+
fetch-depth: 1
61+
- name: Runner image version
62+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
63+
- name: Check Autoconf and aclocal versions
64+
run: |
65+
grep "Generated by GNU Autoconf 2.71" configure
66+
grep "aclocal 1.16.5" aclocal.m4
67+
grep -q "runstatedir" configure
68+
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
69+
- name: Regenerate autoconf files
70+
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
71+
run: autoreconf -ivf -Werror
72+
- name: Check for changes
73+
run: |
74+
git add -u
75+
changes=$(git status --porcelain)
76+
# Check for changes in regenerated files
77+
if test -n "$changes"; then
78+
echo "Generated files not up to date."
79+
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
80+
echo "configure files must be regenerated with a specific version of autoconf."
81+
echo "$changes"
82+
echo ""
83+
git diff --staged || true
84+
exit 1
85+
fi
86+
4387
check_generated_files:
4488
name: 'Check if generated files are up to date'
4589
# Don't use ubuntu-latest but a specific version to make the job
@@ -54,7 +98,7 @@ jobs:
5498
with:
5599
python-version: '3.x'
56100
- name: Runner image version
57-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
101+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
58102
- name: Restore config.cache
59103
uses: actions/cache@v4
60104
with:
@@ -64,24 +108,15 @@ jobs:
64108
- name: Install Dependencies
65109
run: sudo ./.github/workflows/posix-deps-apt.sh
66110
- name: Add ccache to PATH
67-
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
111+
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
68112
- name: Configure ccache action
69113
uses: hendrikmuhs/[email protected]
70114
with:
71115
save: false
72-
- name: Check Autoconf and aclocal versions
73-
run: |
74-
grep "Generated by GNU Autoconf 2.71" configure
75-
grep "aclocal 1.16.5" aclocal.m4
76-
grep -q "runstatedir" configure
77-
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
78116
- name: Configure CPython
79117
run: |
80118
# Build Python with the libpython dynamic library
81119
./configure --config-cache --with-pydebug --enable-shared
82-
- name: Regenerate autoconf files
83-
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
84-
run: autoreconf -ivf -Werror
85120
- name: Build CPython
86121
run: |
87122
make -j4 regen-all
@@ -212,7 +247,7 @@ jobs:
212247
steps:
213248
- uses: actions/checkout@v4
214249
- name: Runner image version
215-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
250+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
216251
- name: Restore config.cache
217252
uses: actions/cache@v4
218253
with:
@@ -224,9 +259,9 @@ jobs:
224259
run: sudo ./.github/workflows/posix-deps-apt.sh
225260
- name: Configure OpenSSL env vars
226261
run: |
227-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
228-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
229-
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"
230265
- name: 'Restore OpenSSL build'
231266
id: cache-openssl
232267
uses: actions/cache@v4
@@ -235,16 +270,16 @@ jobs:
235270
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
236271
- name: Install OpenSSL
237272
if: steps.cache-openssl.outputs.cache-hit != 'true'
238-
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
239274
- name: Add ccache to PATH
240275
run: |
241-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
276+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
242277
- name: Configure ccache action
243278
uses: hendrikmuhs/[email protected]
244279
with:
245280
save: false
246281
- name: Configure CPython
247-
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"
248283
- name: Build CPython
249284
run: make -j4
250285
- name: Display build info
@@ -277,9 +312,9 @@ jobs:
277312
run: sudo ./.github/workflows/posix-deps-apt.sh
278313
- name: Configure OpenSSL env vars
279314
run: |
280-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
281-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
282-
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"
283318
- name: 'Restore OpenSSL build'
284319
id: cache-openssl
285320
uses: actions/cache@v4
@@ -288,24 +323,24 @@ jobs:
288323
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
289324
- name: Install OpenSSL
290325
if: steps.cache-openssl.outputs.cache-hit != 'true'
291-
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
292327
- name: Add ccache to PATH
293328
run: |
294-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
329+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
295330
- name: Configure ccache action
296331
uses: hendrikmuhs/[email protected]
297332
with:
298333
save: false
299334
- name: Setup directory envs for out-of-tree builds
300335
run: |
301-
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
302-
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"
303338
- name: Create directories for read-only out-of-tree builds
304-
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
339+
run: mkdir -p "$CPYTHON_RO_SRCDIR" "$CPYTHON_BUILDDIR"
305340
- name: Bind mount sources read-only
306-
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
341+
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
307342
- name: Runner image version
308-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
343+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
309344
- name: Restore config.cache
310345
uses: actions/cache@v4
311346
with:
@@ -318,7 +353,7 @@ jobs:
318353
--config-cache \
319354
--with-pydebug \
320355
--enable-slower-safety \
321-
--with-openssl=$OPENSSL_DIR
356+
--with-openssl="$OPENSSL_DIR"
322357
- name: Build CPython out-of-tree
323358
working-directory: ${{ env.CPYTHON_BUILDDIR }}
324359
run: make -j4
@@ -327,18 +362,18 @@ jobs:
327362
run: make pythoninfo
328363
- name: Remount sources writable for tests
329364
# some tests write to srcdir, lack of pyc files slows down testing
330-
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw
365+
run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw
331366
- name: Setup directory envs for out-of-tree builds
332367
run: |
333-
echo "CPYTHON_BUILDDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-builddir)" >> $GITHUB_ENV
368+
echo "CPYTHON_BUILDDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-builddir)" >> "$GITHUB_ENV"
334369
- name: "Create hypothesis venv"
335370
working-directory: ${{ env.CPYTHON_BUILDDIR }}
336371
run: |
337372
VENV_LOC=$(realpath -m .)/hypovenv
338373
VENV_PYTHON=$VENV_LOC/bin/python
339-
echo "HYPOVENV=${VENV_LOC}" >> $GITHUB_ENV
340-
echo "VENV_PYTHON=${VENV_PYTHON}" >> $GITHUB_ENV
341-
./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"
342377
- name: 'Restore Hypothesis database'
343378
id: cache-hypothesis-database
344379
uses: actions/cache@v4
@@ -376,18 +411,21 @@ jobs:
376411

377412
build_asan:
378413
name: 'Address sanitizer'
379-
runs-on: ubuntu-22.04
414+
runs-on: ${{ matrix.os }}
380415
timeout-minutes: 60
381416
needs: check_source
382417
if: needs.check_source.outputs.run_tests == 'true'
418+
strategy:
419+
matrix:
420+
os: [ubuntu-22.04]
383421
env:
384422
OPENSSL_VER: 3.0.15
385423
PYTHONSTRICTEXTENSIONBUILD: 1
386424
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
387425
steps:
388426
- uses: actions/checkout@v4
389427
- name: Runner image version
390-
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
428+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
391429
- name: Restore config.cache
392430
uses: actions/cache@v4
393431
with:
@@ -403,9 +441,9 @@ jobs:
403441
version: 10
404442
- name: Configure OpenSSL env vars
405443
run: |
406-
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
407-
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
408-
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"
409447
- name: 'Restore OpenSSL build'
410448
id: cache-openssl
411449
uses: actions/cache@v4
@@ -414,10 +452,10 @@ jobs:
414452
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
415453
- name: Install OpenSSL
416454
if: steps.cache-openssl.outputs.cache-hit != 'true'
417-
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
418456
- name: Add ccache to PATH
419457
run: |
420-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
458+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
421459
- name: Configure ccache action
422460
uses: hendrikmuhs/[email protected]
423461
with:
@@ -430,7 +468,7 @@ jobs:
430468
- name: Display build info
431469
run: make pythoninfo
432470
- name: Tests
433-
run: xvfb-run make test
471+
run: xvfb-run make ci
434472

435473
build_tsan:
436474
name: 'Thread sanitizer'
@@ -501,6 +539,7 @@ jobs:
501539
needs:
502540
- check_source # Transitive dependency, needed to access `run_tests` value
503541
- check-docs
542+
- check_autoconf_regen
504543
- check_generated_files
505544
- build_macos
506545
- build_ubuntu
@@ -536,6 +575,7 @@ jobs:
536575
${{
537576
needs.check_source.outputs.run_tests != 'true'
538577
&& '
578+
check_autoconf_regen,
539579
check_generated_files,
540580
build_macos,
541581
build_ubuntu,

0 commit comments

Comments
 (0)