Skip to content

Commit f3ba0fe

Browse files
committed
Merge branch 'main' into tstrings
2 parents 77822be + 7ebbd27 commit f3ba0fe

File tree

1,128 files changed

+61908
-27367
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,128 files changed

+61908
-27367
lines changed

.github/CODEOWNERS

+12-5
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,16 @@ Objects/exceptions.c @iritkatriel
107107
# Hashing & cryptographic primitives
108108
**/*hashlib* @gpshead @tiran @picnixz
109109
**/*hashopenssl* @gpshead @tiran @picnixz
110-
**/*pyhash* @gpshead @tiran
111-
**/sha* @gpshead @tiran @picnixz
112-
Modules/md5* @gpshead @tiran @picnixz
113-
**/*blake* @gpshead @tiran @picnixz
114-
Modules/_hacl/** @gpshead
110+
**/*pyhash* @gpshead @tiran @picnixz
111+
Modules/*blake* @gpshead @tiran @picnixz
112+
Modules/*md5* @gpshead @tiran @picnixz
113+
Modules/*sha* @gpshead @tiran @picnixz
114+
Modules/_hacl/** @gpshead @picnixz
115115
**/*hmac* @gpshead @picnixz
116116

117+
# libssl
118+
**/*ssl* @gpshead @picnixz
119+
117120
# logging
118121
**/*logging* @vsajip
119122

@@ -185,6 +188,7 @@ Python/ast_opt.c @isidentical @eclips4
185188
Parser/asdl.py @isidentical @JelleZijlstra @eclips4
186189
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4
187190
Lib/ast.py @isidentical @JelleZijlstra @eclips4
191+
Lib/_ast_unparse.py @isidentical @JelleZijlstra @eclips4
188192
Lib/test/test_ast/ @eclips4
189193

190194
# Mock
@@ -309,3 +313,6 @@ Doc/reference/ @willingc @AA-Turner
309313
# Colorize
310314
Lib/_colorize.py @hugovk
311315
Lib/test/test__colorize.py @hugovk
316+
317+
# Fuzzing
318+
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

+57-46
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, ...)
@@ -86,7 +86,7 @@ jobs:
8686
exit 1
8787
fi
8888
89-
check_generated_files:
89+
check-generated-files:
9090
name: 'Check if generated files are up to date'
9191
# Don't use ubuntu-latest but a specific version to make the job
9292
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
@@ -147,7 +147,7 @@ jobs:
147147
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
148148
run: make check-c-globals
149149

150-
build_windows:
150+
build-windows:
151151
name: >-
152152
Windows
153153
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
@@ -164,10 +164,12 @@ jobs:
164164
- false
165165
- true
166166
include:
167-
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
167+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
168+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
168169
arch: arm64
169170
free-threading: false
170-
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
171+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
172+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
171173
arch: arm64
172174
free-threading: true
173175
- os: windows-latest
@@ -179,22 +181,29 @@ jobs:
179181
arch: ${{ matrix.arch }}
180182
free-threading: ${{ matrix.free-threading }}
181183

182-
build_windows_msi:
184+
build-windows-msi:
183185
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
184186
Windows MSI${{ '' }}
185187
needs: build-context
186188
if: fromJSON(needs.build-context.outputs.run-windows-msi)
187189
strategy:
190+
fail-fast: false
188191
matrix:
192+
os:
193+
- windows-latest
189194
arch:
190195
- x86
191196
- x64
192-
- arm64
197+
include:
198+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
199+
- os: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
200+
arch: arm64
193201
uses: ./.github/workflows/reusable-windows-msi.yml
194202
with:
203+
os: ${{ matrix.os }}
195204
arch: ${{ matrix.arch }}
196205

197-
build_macos:
206+
build-macos:
198207
name: >-
199208
macOS
200209
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
@@ -228,14 +237,15 @@ jobs:
228237
free-threading: ${{ matrix.free-threading }}
229238
os: ${{ matrix.os }}
230239

231-
build_ubuntu:
240+
build-ubuntu:
232241
name: >-
233242
Ubuntu
234243
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
235244
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
236245
needs: build-context
237246
if: needs.build-context.outputs.run-tests == 'true'
238247
strategy:
248+
fail-fast: false
239249
matrix:
240250
bolt:
241251
- false
@@ -245,13 +255,13 @@ jobs:
245255
- true
246256
os:
247257
- ubuntu-24.04
248-
- ubuntu-22.04-arm
258+
- ubuntu-24.04-arm
249259
exclude:
250260
# Do not test BOLT with free-threading, to conserve resources
251261
- bolt: true
252262
free-threading: true
253263
# BOLT currently crashes during instrumentation on aarch64
254-
- os: ubuntu-22.04-arm
264+
- os: ubuntu-24.04-arm
255265
bolt: true
256266
uses: ./.github/workflows/reusable-ubuntu.yml
257267
with:
@@ -260,7 +270,7 @@ jobs:
260270
free-threading: ${{ matrix.free-threading }}
261271
os: ${{ matrix.os }}
262272

263-
build_ubuntu_ssltests:
273+
build-ubuntu-ssltests:
264274
name: 'Ubuntu SSL tests with OpenSSL'
265275
runs-on: ${{ matrix.os }}
266276
timeout-minutes: 60
@@ -322,15 +332,15 @@ jobs:
322332
- name: SSL tests
323333
run: ./python Lib/test/ssltests.py
324334

325-
build_wasi:
335+
build-wasi:
326336
name: 'WASI'
327337
needs: build-context
328338
if: needs.build-context.outputs.run-tests == 'true'
329339
uses: ./.github/workflows/reusable-wasi.yml
330340
with:
331341
config_hash: ${{ needs.build-context.outputs.config-hash }}
332342

333-
test_hypothesis:
343+
test-hypothesis:
334344
name: "Hypothesis tests on Ubuntu"
335345
runs-on: ubuntu-24.04
336346
timeout-minutes: 60
@@ -445,14 +455,14 @@ jobs:
445455
name: hypothesis-example-db
446456
path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/examples/
447457

448-
449-
build_asan:
458+
build-asan:
450459
name: 'Address sanitizer'
451460
runs-on: ${{ matrix.os }}
452461
timeout-minutes: 60
453462
needs: build-context
454463
if: needs.build-context.outputs.run-tests == 'true'
455464
strategy:
465+
fail-fast: false
456466
matrix:
457467
os: [ubuntu-24.04]
458468
env:
@@ -509,13 +519,14 @@ jobs:
509519
- name: Tests
510520
run: xvfb-run make ci
511521

512-
build_tsan:
522+
build-tsan:
513523
name: >-
514524
Thread sanitizer
515525
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
516526
needs: build-context
517527
if: needs.build-context.outputs.run-tests == 'true'
518528
strategy:
529+
fail-fast: false
519530
matrix:
520531
free-threading:
521532
- false
@@ -528,6 +539,7 @@ jobs:
528539
cross-build-linux:
529540
name: Cross build Linux
530541
runs-on: ubuntu-latest
542+
timeout-minutes: 60
531543
needs: build-context
532544
if: needs.build-context.outputs.run-tests == 'true'
533545
steps:
@@ -592,8 +604,8 @@ jobs:
592604
output-sarif: true
593605
sanitizer: ${{ matrix.sanitizer }}
594606
- name: Upload crash
595-
uses: actions/upload-artifact@v4
596607
if: failure() && steps.build.outcome == 'success'
608+
uses: actions/upload-artifact@v4
597609
with:
598610
name: ${{ matrix.sanitizer }}-artifacts
599611
path: ./out/artifacts
@@ -606,36 +618,35 @@ jobs:
606618

607619
all-required-green: # This job does nothing and is only used for the branch protection
608620
name: All required checks pass
609-
if: always()
610-
621+
runs-on: ubuntu-latest
622+
timeout-minutes: 5
611623
needs:
612624
- build-context # Transitive dependency, needed to access `run-tests` value
613625
- check-docs
614-
- check_autoconf_regen
615-
- check_generated_files
616-
- build_macos
617-
- build_ubuntu
618-
- build_ubuntu_ssltests
619-
- build_wasi
620-
- build_windows
621-
- build_windows_msi
626+
- check-autoconf-regen
627+
- check-generated-files
628+
- build-windows
629+
- build-windows-msi
630+
- build-macos
631+
- build-ubuntu
632+
- build-ubuntu-ssltests
633+
- build-wasi
634+
- test-hypothesis
635+
- build-asan
636+
- build-tsan
622637
- cross-build-linux
623-
- test_hypothesis
624-
- build_asan
625-
- build_tsan
626638
- cifuzz
627-
628-
runs-on: ubuntu-latest
639+
if: always()
629640

630641
steps:
631642
- name: Check whether the needed jobs succeeded or failed
632643
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
633644
with:
634645
allowed-failures: >-
635-
build_ubuntu_ssltests,
636-
build_windows_msi,
646+
build-windows-msi,
647+
build-ubuntu-ssltests,
648+
test-hypothesis,
637649
cifuzz,
638-
test_hypothesis,
639650
allowed-skips: >-
640651
${{
641652
!fromJSON(needs.build-context.outputs.run-docs)
@@ -647,23 +658,23 @@ jobs:
647658
${{
648659
needs.build-context.outputs.run-tests != 'true'
649660
&& '
650-
check_autoconf_regen,
651-
check_generated_files,
652-
build_macos,
653-
build_ubuntu,
654-
build_ubuntu_ssltests,
655-
build_wasi,
656-
build_asan,
657-
build_tsan,
658-
test_hypothesis,
661+
check-autoconf-regen,
662+
check-generated-files,
663+
build-macos,
664+
build-ubuntu,
665+
build-ubuntu-ssltests,
666+
build-wasi,
667+
test-hypothesis,
668+
build-asan,
669+
build-tsan,
659670
cross-build-linux,
660671
'
661672
|| ''
662673
}}
663674
${{
664675
!fromJSON(needs.build-context.outputs.run-windows-tests)
665676
&& '
666-
build_windows,
677+
build-windows,
667678
'
668679
|| ''
669680
}}

.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

+10-13
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ jobs:
7474
runner: windows-latest
7575
- target: aarch64-pc-windows-msvc/msvc
7676
architecture: ARM64
77-
runner: windows-latest
77+
# Forks don't have access to Windows on Arm runners. These jobs are skipped below:
78+
runner: ${{ github.repository_owner == 'python' && 'windows-aarch64' || 'windows-latest' }}
7879
- target: x86_64-apple-darwin/clang
7980
architecture: x86_64
8081
runner: macos-13
@@ -86,7 +87,7 @@ jobs:
8687
runner: ubuntu-24.04
8788
- target: aarch64-unknown-linux-gnu/gcc
8889
architecture: aarch64
89-
runner: ubuntu-22.04-arm
90+
runner: ubuntu-24.04-arm
9091
steps:
9192
- uses: actions/checkout@v4
9293
with:
@@ -95,25 +96,19 @@ jobs:
9596
with:
9697
python-version: '3.11'
9798

98-
- name: Native Windows
99-
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
99+
- name: Windows
100+
# Forks don't have access to Windows on Arm runners. Skip those:
101+
if: runner.os == 'Windows' && (matrix.architecture != 'ARM64' || github.repository_owner == 'python')
100102
run: |
101103
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
102104
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
103105
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
104106
105-
# No tests (yet):
106-
- name: Emulated Windows
107-
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
108-
run: |
109-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
110-
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
111-
112107
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
113108
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
114109
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
115110
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
116-
- name: Native macOS
111+
- name: macOS
117112
if: runner.os == 'macOS'
118113
run: |
119114
brew update
@@ -124,7 +119,7 @@ jobs:
124119
make all --jobs 4
125120
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
126121
127-
- name: Native Linux
122+
- name: Linux
128123
if: runner.os == 'Linux'
129124
run: |
130125
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
@@ -137,7 +132,9 @@ jobs:
137132
name: Free-Threaded (Debug)
138133
needs: interpreter
139134
runs-on: ubuntu-24.04
135+
timeout-minutes: 90
140136
strategy:
137+
fail-fast: false
141138
matrix:
142139
llvm:
143140
- 19

0 commit comments

Comments
 (0)