Skip to content

Commit 3cf8372

Browse files
authored
Merge branch 'main' into gh-129694-test-exceptions
2 parents 0234e5b + 8a00c9a commit 3cf8372

File tree

1,225 files changed

+58315
-31305
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,225 files changed

+58315
-31305
lines changed

.github/CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Objects/exceptions.c @iritkatriel
106106

107107
# Hashing & cryptographic primitives
108108
**/*hashlib* @gpshead @tiran @picnixz
109+
**/*hashopenssl* @gpshead @tiran @picnixz
109110
**/*pyhash* @gpshead @tiran
110111
**/sha* @gpshead @tiran @picnixz
111112
Modules/md5* @gpshead @tiran @picnixz
@@ -308,3 +309,6 @@ Doc/reference/ @willingc @AA-Turner
308309
# Colorize
309310
Lib/_colorize.py @hugovk
310311
Lib/test/test__colorize.py @hugovk
312+
313+
# Fuzzing
314+
Modules/_xxtestfuzz/ @ammaraskar

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

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
permissions:
2020
issues: write
21+
timeout-minutes: 5
2122
steps:
2223
- uses: actions/github-script@v7
2324
with:

.github/workflows/build.yml

+68-59
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
if: fromJSON(needs.build-context.outputs.run-docs)
4444
uses: ./.github/workflows/reusable-docs.yml
4545

46-
check_autoconf_regen:
46+
check-autoconf-regen:
4747
name: 'Check if Autoconf files are up to date'
4848
# Don't use ubuntu-latest but a specific version to make the job
4949
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
@@ -62,8 +62,6 @@ jobs:
6262
with:
6363
fetch-depth: 1
6464
persist-credentials: false
65-
- name: Runner image version
66-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6765
- name: Check Autoconf and aclocal versions
6866
run: |
6967
grep "Generated by GNU Autoconf 2.72" configure
@@ -88,7 +86,7 @@ jobs:
8886
exit 1
8987
fi
9088
91-
check_generated_files:
89+
check-generated-files:
9290
name: 'Check if generated files are up to date'
9391
# Don't use ubuntu-latest but a specific version to make the job
9492
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
@@ -104,14 +102,14 @@ jobs:
104102
with:
105103
python-version: '3.x'
106104
- name: Runner image version
107-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
105+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
108106
- name: Restore config.cache
109107
uses: actions/cache@v4
110108
with:
111109
path: config.cache
112110
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
113-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
114-
- name: Install Dependencies
111+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
112+
- name: Install dependencies
115113
run: sudo ./.github/workflows/posix-deps-apt.sh
116114
- name: Add ccache to PATH
117115
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
@@ -149,12 +147,12 @@ jobs:
149147
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
150148
run: make check-c-globals
151149

152-
build_windows:
150+
build-windows:
153151
name: >-
154152
Windows
155153
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
156154
needs: build-context
157-
if: fromJSON(needs.build-context.outputs.run-tests)
155+
if: fromJSON(needs.build-context.outputs.run-windows-tests)
158156
strategy:
159157
fail-fast: false
160158
matrix:
@@ -181,12 +179,13 @@ jobs:
181179
arch: ${{ matrix.arch }}
182180
free-threading: ${{ matrix.free-threading }}
183181

184-
build_windows_msi:
182+
build-windows-msi:
185183
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
186184
Windows MSI${{ '' }}
187185
needs: build-context
188186
if: fromJSON(needs.build-context.outputs.run-windows-msi)
189187
strategy:
188+
fail-fast: false
190189
matrix:
191190
arch:
192191
- x86
@@ -196,7 +195,7 @@ jobs:
196195
with:
197196
arch: ${{ matrix.arch }}
198197

199-
build_macos:
198+
build-macos:
200199
name: >-
201200
macOS
202201
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
@@ -230,14 +229,15 @@ jobs:
230229
free-threading: ${{ matrix.free-threading }}
231230
os: ${{ matrix.os }}
232231

233-
build_ubuntu:
232+
build-ubuntu:
234233
name: >-
235234
Ubuntu
236235
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
237236
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
238237
needs: build-context
239238
if: needs.build-context.outputs.run-tests == 'true'
240239
strategy:
240+
fail-fast: false
241241
matrix:
242242
bolt:
243243
- false
@@ -262,7 +262,7 @@ jobs:
262262
free-threading: ${{ matrix.free-threading }}
263263
os: ${{ matrix.os }}
264264

265-
build_ubuntu_ssltests:
265+
build-ubuntu-ssltests:
266266
name: 'Ubuntu SSL tests with OpenSSL'
267267
runs-on: ${{ matrix.os }}
268268
timeout-minutes: 60
@@ -284,15 +284,15 @@ jobs:
284284
with:
285285
persist-credentials: false
286286
- name: Runner image version
287-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
287+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
288288
- name: Restore config.cache
289289
uses: actions/cache@v4
290290
with:
291291
path: config.cache
292-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
292+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
293293
- name: Register gcc problem matcher
294294
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
295-
- name: Install Dependencies
295+
- name: Install dependencies
296296
run: sudo ./.github/workflows/posix-deps-apt.sh
297297
- name: Configure OpenSSL env vars
298298
run: |
@@ -324,15 +324,15 @@ jobs:
324324
- name: SSL tests
325325
run: ./python Lib/test/ssltests.py
326326

327-
build_wasi:
327+
build-wasi:
328328
name: 'WASI'
329329
needs: build-context
330330
if: needs.build-context.outputs.run-tests == 'true'
331331
uses: ./.github/workflows/reusable-wasi.yml
332332
with:
333333
config_hash: ${{ needs.build-context.outputs.config-hash }}
334334

335-
test_hypothesis:
335+
test-hypothesis:
336336
name: "Hypothesis tests on Ubuntu"
337337
runs-on: ubuntu-24.04
338338
timeout-minutes: 60
@@ -347,7 +347,7 @@ jobs:
347347
persist-credentials: false
348348
- name: Register gcc problem matcher
349349
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
350-
- name: Install Dependencies
350+
- name: Install dependencies
351351
run: sudo ./.github/workflows/posix-deps-apt.sh
352352
- name: Configure OpenSSL env vars
353353
run: |
@@ -379,12 +379,12 @@ jobs:
379379
- name: Bind mount sources read-only
380380
run: sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
381381
- name: Runner image version
382-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
382+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
383383
- name: Restore config.cache
384384
uses: actions/cache@v4
385385
with:
386386
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
387-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
387+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
388388
- name: Configure CPython out-of-tree
389389
working-directory: ${{ env.CPYTHON_BUILDDIR }}
390390
run: |
@@ -447,14 +447,14 @@ jobs:
447447
name: hypothesis-example-db
448448
path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/examples/
449449

450-
451-
build_asan:
450+
build-asan:
452451
name: 'Address sanitizer'
453452
runs-on: ${{ matrix.os }}
454453
timeout-minutes: 60
455454
needs: build-context
456455
if: needs.build-context.outputs.run-tests == 'true'
457456
strategy:
457+
fail-fast: false
458458
matrix:
459459
os: [ubuntu-24.04]
460460
env:
@@ -466,15 +466,15 @@ jobs:
466466
with:
467467
persist-credentials: false
468468
- name: Runner image version
469-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
469+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
470470
- name: Restore config.cache
471471
uses: actions/cache@v4
472472
with:
473473
path: config.cache
474-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
474+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
475475
- name: Register gcc problem matcher
476476
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
477-
- name: Install Dependencies
477+
- name: Install dependencies
478478
run: sudo ./.github/workflows/posix-deps-apt.sh
479479
- name: Set up GCC-10 for ASAN
480480
uses: egor-tensin/setup-gcc@v1
@@ -511,13 +511,14 @@ jobs:
511511
- name: Tests
512512
run: xvfb-run make ci
513513

514-
build_tsan:
514+
build-tsan:
515515
name: >-
516516
Thread sanitizer
517517
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
518518
needs: build-context
519519
if: needs.build-context.outputs.run-tests == 'true'
520520
strategy:
521+
fail-fast: false
521522
matrix:
522523
free-threading:
523524
- false
@@ -530,26 +531,27 @@ jobs:
530531
cross-build-linux:
531532
name: Cross build Linux
532533
runs-on: ubuntu-latest
534+
timeout-minutes: 60
533535
needs: build-context
534536
if: needs.build-context.outputs.run-tests == 'true'
535537
steps:
536538
- uses: actions/checkout@v4
537539
with:
538540
persist-credentials: false
539541
- name: Runner image version
540-
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
542+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
541543
- name: Restore config.cache
542544
uses: actions/cache@v4
543545
with:
544546
path: config.cache
545-
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.build-context.outputs.config-hash }}
547+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
546548
- name: Register gcc problem matcher
547549
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
548550
- name: Set build dir
549551
run:
550552
# an absolute path outside of the working directoy
551553
echo "BUILD_DIR=$(realpath ${{ github.workspace }}/../build)" >> "$GITHUB_ENV"
552-
- name: Install Dependencies
554+
- name: Install dependencies
553555
run: sudo ./.github/workflows/posix-deps-apt.sh
554556
- name: Configure host build
555557
run: ./configure --prefix="$BUILD_DIR/host-python"
@@ -594,8 +596,8 @@ jobs:
594596
output-sarif: true
595597
sanitizer: ${{ matrix.sanitizer }}
596598
- name: Upload crash
597-
uses: actions/upload-artifact@v4
598599
if: failure() && steps.build.outcome == 'success'
600+
uses: actions/upload-artifact@v4
599601
with:
600602
name: ${{ matrix.sanitizer }}-artifacts
601603
path: ./out/artifacts
@@ -608,35 +610,35 @@ jobs:
608610

609611
all-required-green: # This job does nothing and is only used for the branch protection
610612
name: All required checks pass
611-
if: always()
612-
613+
runs-on: ubuntu-latest
614+
timeout-minutes: 5
613615
needs:
614616
- build-context # Transitive dependency, needed to access `run-tests` value
615617
- check-docs
616-
- check_autoconf_regen
617-
- check_generated_files
618-
- build_macos
619-
- build_ubuntu
620-
- build_ubuntu_ssltests
621-
- build_wasi
622-
- build_windows
623-
- build_windows_msi
624-
- test_hypothesis
625-
- build_asan
626-
- build_tsan
618+
- check-autoconf-regen
619+
- check-generated-files
620+
- build-windows
621+
- build-windows-msi
622+
- build-macos
623+
- build-ubuntu
624+
- build-ubuntu-ssltests
625+
- build-wasi
626+
- test-hypothesis
627+
- build-asan
628+
- build-tsan
629+
- cross-build-linux
627630
- cifuzz
628-
629-
runs-on: ubuntu-latest
631+
if: always()
630632

631633
steps:
632634
- name: Check whether the needed jobs succeeded or failed
633635
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
634636
with:
635637
allowed-failures: >-
636-
build_ubuntu_ssltests,
637-
build_windows_msi,
638+
build-windows-msi,
639+
build-ubuntu-ssltests,
640+
test-hypothesis,
638641
cifuzz,
639-
test_hypothesis,
640642
allowed-skips: >-
641643
${{
642644
!fromJSON(needs.build-context.outputs.run-docs)
@@ -648,16 +650,23 @@ jobs:
648650
${{
649651
needs.build-context.outputs.run-tests != 'true'
650652
&& '
651-
check_autoconf_regen,
652-
check_generated_files,
653-
build_macos,
654-
build_ubuntu,
655-
build_ubuntu_ssltests,
656-
build_wasi,
657-
build_windows,
658-
build_asan,
659-
build_tsan,
660-
test_hypothesis,
653+
check-autoconf-regen,
654+
check-generated-files,
655+
build-macos,
656+
build-ubuntu,
657+
build-ubuntu-ssltests,
658+
build-wasi,
659+
test-hypothesis,
660+
build-asan,
661+
build-tsan,
662+
cross-build-linux,
663+
'
664+
|| ''
665+
}}
666+
${{
667+
!fromJSON(needs.build-context.outputs.run-windows-tests)
668+
&& '
669+
build-windows,
661670
'
662671
|| ''
663672
}}

.github/workflows/documentation-links.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
permissions:
2121
pull-requests: write
22+
timeout-minutes: 5
2223

2324
steps:
2425
- uses: readthedocs/actions/preview@v1

.github/workflows/jit.yml

+2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ jobs:
137137
name: Free-Threaded (Debug)
138138
needs: interpreter
139139
runs-on: ubuntu-24.04
140+
timeout-minutes: 90
140141
strategy:
142+
fail-fast: false
141143
matrix:
142144
llvm:
143145
- 19

0 commit comments

Comments
 (0)