Skip to content

Commit e5a6413

Browse files
authored
Merge branch 'main' into clarify-contextvar-token-single-use
2 parents ae10290 + 63cc125 commit e5a6413

File tree

367 files changed

+26213
-6584
lines changed

Some content is hidden

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

367 files changed

+26213
-6584
lines changed

.github/CODEOWNERS

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ Misc/externals.spdx.json @sethmlarson
143143
Misc/sbom.spdx.json @sethmlarson
144144
Tools/build/generate_sbom.py @sethmlarson
145145

146+
# ABI check
147+
Misc/libabigail.abignore @encukou
148+
146149

147150
# ----------------------------------------------------------------------------
148151
# Platform Support
@@ -173,9 +176,9 @@ Tools/wasm/config.site-wasm32-emscripten @freakboy3742 @emmatyping
173176
Tools/wasm/emscripten @freakboy3742 @emmatyping
174177

175178
# WebAssembly (WASI)
176-
Tools/wasm/wasi-env @brettcannon @emmatyping
177-
Tools/wasm/wasi.py @brettcannon @emmatyping
178-
Tools/wasm/wasi @brettcannon @emmatyping
179+
Tools/wasm/wasi-env @brettcannon @emmatyping @savannahostrowski
180+
Tools/wasm/wasi.py @brettcannon @emmatyping @savannahostrowski
181+
Tools/wasm/wasi @brettcannon @emmatyping @savannahostrowski
179182

180183
# Windows
181184
PC/ @python/windows-team
@@ -290,9 +293,9 @@ InternalDocs/jit.md @brandtbucher @savannahostrowski @diegorusso @AA-T
290293

291294
# Micro-op / μop / Tier 2 Optimiser
292295
Python/optimizer.c @markshannon @Fidget-Spinner
293-
Python/optimizer_analysis.c @markshannon @tomasr8 @Fidget-Spinner
294-
Python/optimizer_bytecodes.c @markshannon @tomasr8 @Fidget-Spinner
295-
Python/optimizer_symbols.c @markshannon @tomasr8 @Fidget-Spinner
296+
Python/optimizer_analysis.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
297+
Python/optimizer_bytecodes.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
298+
Python/optimizer_symbols.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
296299

297300
# Parser, Lexer, and Grammar
298301
Grammar/python.gram @pablogsal @lysnikolaou

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
issues: write
2121
timeout-minutes: 5
2222
steps:
23-
- uses: actions/github-script@v7
23+
- uses: actions/github-script@v8
2424
with:
2525
# language=JavaScript
2626
script: |

.github/workflows/build.yml

Lines changed: 69 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
run: |
6565
apt update && apt install git -yq
6666
git config --global --add safe.directory "$GITHUB_WORKSPACE"
67-
- uses: actions/checkout@v4
67+
- uses: actions/checkout@v6
6868
with:
6969
fetch-depth: 1
7070
persist-credentials: false
@@ -101,10 +101,10 @@ jobs:
101101
needs: build-context
102102
if: needs.build-context.outputs.run-tests == 'true'
103103
steps:
104-
- uses: actions/checkout@v4
104+
- uses: actions/checkout@v6
105105
with:
106106
persist-credentials: false
107-
- uses: actions/setup-python@v5
107+
- uses: actions/setup-python@v6
108108
with:
109109
python-version: '3.x'
110110
- name: Runner image version
@@ -142,9 +142,14 @@ jobs:
142142
- name: Check for unsupported C global variables
143143
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
144144
run: make check-c-globals
145-
- name: Check for undocumented C APIs
146-
run: make check-c-api-docs
147145

146+
check-c-api-docs:
147+
name: C API Docs
148+
needs: build-context
149+
if: >-
150+
needs.build-context.outputs.run-tests == 'true'
151+
|| needs.build-context.outputs.run-docs == 'true'
152+
uses: ./.github/workflows/reusable-check-c-api-docs.yml
148153

149154
build-windows:
150155
name: >-
@@ -264,7 +269,7 @@ jobs:
264269
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
265270
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
266271
steps:
267-
- uses: actions/checkout@v4
272+
- uses: actions/checkout@v6
268273
with:
269274
persist-credentials: false
270275
- name: Runner image version
@@ -280,7 +285,7 @@ jobs:
280285
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
281286
- name: 'Restore OpenSSL build'
282287
id: cache-openssl
283-
uses: actions/cache@v4
288+
uses: actions/cache@v5
284289
with:
285290
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
286291
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -316,7 +321,7 @@ jobs:
316321
OPENSSL_DIR: ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}
317322
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}/lib
318323
steps:
319-
- uses: actions/checkout@v4
324+
- uses: actions/checkout@v6
320325
with:
321326
persist-credentials: false
322327
- name: Runner image version
@@ -332,7 +337,7 @@ jobs:
332337
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}/lib" >> "$GITHUB_ENV"
333338
- name: 'Restore AWS-LC build'
334339
id: cache-aws-lc
335-
uses: actions/cache@v4
340+
uses: actions/cache@v5
336341
with:
337342
path: ./multissl/aws-lc/${{ matrix.awslc_ver }}
338343
key: ${{ matrix.os }}-multissl-aws-lc-${{ matrix.awslc_ver }}
@@ -381,7 +386,7 @@ jobs:
381386

382387
runs-on: ${{ matrix.runs-on }}
383388
steps:
384-
- uses: actions/checkout@v4
389+
- uses: actions/checkout@v6
385390
with:
386391
persist-credentials: false
387392
- name: Build and test
@@ -394,7 +399,7 @@ jobs:
394399
timeout-minutes: 60
395400
runs-on: macos-14
396401
steps:
397-
- uses: actions/checkout@v4
402+
- uses: actions/checkout@v6
398403
with:
399404
persist-credentials: false
400405

@@ -426,7 +431,7 @@ jobs:
426431
OPENSSL_VER: 3.0.18
427432
PYTHONSTRICTEXTENSIONBUILD: 1
428433
steps:
429-
- uses: actions/checkout@v4
434+
- uses: actions/checkout@v6
430435
with:
431436
persist-credentials: false
432437
- name: Register gcc problem matcher
@@ -440,7 +445,7 @@ jobs:
440445
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
441446
- name: 'Restore OpenSSL build'
442447
id: cache-openssl
443-
uses: actions/cache@v4
448+
uses: actions/cache@v5
444449
with:
445450
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
446451
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -490,7 +495,7 @@ jobs:
490495
./python -m venv "$VENV_LOC" && "$VENV_PYTHON" -m pip install -r "${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt"
491496
- name: 'Restore Hypothesis database'
492497
id: cache-hypothesis-database
493-
uses: actions/cache@v4
498+
uses: actions/cache@v5
494499
with:
495500
path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/
496501
key: hypothesis-database-${{ github.head_ref || github.run_id }}
@@ -517,7 +522,7 @@ jobs:
517522
-x test_subprocess \
518523
-x test_signal \
519524
-x test_sysconfig
520-
- uses: actions/upload-artifact@v4
525+
- uses: actions/upload-artifact@v6
521526
if: always()
522527
with:
523528
name: hypothesis-example-db
@@ -538,7 +543,7 @@ jobs:
538543
PYTHONSTRICTEXTENSIONBUILD: 1
539544
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
540545
steps:
541-
- uses: actions/checkout@v4
546+
- uses: actions/checkout@v6
542547
with:
543548
persist-credentials: false
544549
- name: Runner image version
@@ -548,7 +553,7 @@ jobs:
548553
- name: Install dependencies
549554
run: sudo ./.github/workflows/posix-deps-apt.sh
550555
- name: Set up GCC-10 for ASAN
551-
uses: egor-tensin/setup-gcc@v1
556+
uses: egor-tensin/setup-gcc@v2
552557
with:
553558
version: 10
554559
- name: Configure OpenSSL env vars
@@ -558,7 +563,7 @@ jobs:
558563
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
559564
- name: 'Restore OpenSSL build'
560565
id: cache-openssl
561-
uses: actions/cache@v4
566+
uses: actions/cache@v5
562567
with:
563568
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
564569
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -608,7 +613,7 @@ jobs:
608613
needs: build-context
609614
if: needs.build-context.outputs.run-ubuntu == 'true'
610615
steps:
611-
- uses: actions/checkout@v4
616+
- uses: actions/checkout@v6
612617
with:
613618
persist-credentials: false
614619
- name: Runner image version
@@ -636,45 +641,45 @@ jobs:
636641
run: |
637642
"$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed
638643
639-
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
640644
cifuzz:
641-
name: CIFuzz
642-
runs-on: ubuntu-latest
643-
timeout-minutes: 60
645+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
646+
name: CIFuzz${{ '' }} # zizmor: ignore[obfuscation]
644647
needs: build-context
645-
if: needs.build-context.outputs.run-ci-fuzz == 'true'
648+
if: >-
649+
needs.build-context.outputs.run-ci-fuzz == 'true'
650+
|| needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
646651
permissions:
647652
security-events: write
648653
strategy:
649654
fail-fast: false
650655
matrix:
651-
sanitizer: [address, undefined, memory]
652-
steps:
653-
- name: Build fuzzers (${{ matrix.sanitizer }})
654-
id: build
655-
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
656-
with:
657-
oss-fuzz-project-name: cpython3
658-
sanitizer: ${{ matrix.sanitizer }}
659-
- name: Run fuzzers (${{ matrix.sanitizer }})
660-
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
661-
with:
662-
fuzz-seconds: 600
663-
oss-fuzz-project-name: cpython3
664-
output-sarif: true
665-
sanitizer: ${{ matrix.sanitizer }}
666-
- name: Upload crash
667-
if: failure() && steps.build.outcome == 'success'
668-
uses: actions/upload-artifact@v4
669-
with:
670-
name: ${{ matrix.sanitizer }}-artifacts
671-
path: ./out/artifacts
672-
- name: Upload SARIF
673-
if: always() && steps.build.outcome == 'success'
674-
uses: github/codeql-action/upload-sarif@v3
675-
with:
676-
sarif_file: cifuzz-sarif/results.sarif
677-
checkout_path: cifuzz-sarif
656+
sanitizer:
657+
- address
658+
- undefined
659+
- memory
660+
oss-fuzz-project-name:
661+
- cpython3
662+
- python3-libraries
663+
exclude:
664+
# Note that the 'no-exclude' sentinel below is to prevent
665+
# an empty string value from excluding all jobs and causing
666+
# GHA to create a 'default' matrix entry with all empty values.
667+
- oss-fuzz-project-name: >-
668+
${{
669+
needs.build-context.outputs.run-ci-fuzz == 'true'
670+
&& 'no-exclude'
671+
|| 'cpython3'
672+
}}
673+
- oss-fuzz-project-name: >-
674+
${{
675+
needs.build-context.outputs.run-ci-fuzz-stdlib == 'true'
676+
&& 'no-exclude'
677+
|| 'python3-libraries'
678+
}}
679+
uses: ./.github/workflows/reusable-cifuzz.yml
680+
with:
681+
oss-fuzz-project-name: ${{ matrix.oss-fuzz-project-name }}
682+
sanitizer: ${{ matrix.sanitizer }}
678683

679684
all-required-green: # This job does nothing and is only used for the branch protection
680685
name: All required checks pass
@@ -685,6 +690,7 @@ jobs:
685690
- check-docs
686691
- check-autoconf-regen
687692
- check-generated-files
693+
- check-c-api-docs
688694
- build-windows
689695
- build-windows-msi
690696
- build-macos
@@ -721,8 +727,19 @@ jobs:
721727
'
722728
|| ''
723729
}}
730+
${{
731+
!fromJSON(needs.build-context.outputs.run-tests)
732+
&& !fromJSON(needs.build-context.outputs.run-docs)
733+
&& 'check-c-api-docs,'
734+
|| ''
735+
}}
724736
${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
725-
${{ !fromJSON(needs.build-context.outputs.run-ci-fuzz) && 'cifuzz,' || '' }}
737+
${{
738+
!fromJSON(needs.build-context.outputs.run-ci-fuzz)
739+
&& !fromJSON(needs.build-context.outputs.run-ci-fuzz-stdlib)
740+
&& 'cifuzz,' ||
741+
''
742+
}}
726743
${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }}
727744
${{
728745
!fromJSON(needs.build-context.outputs.run-ubuntu)

.github/workflows/jit.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- 'Python/optimizer*.c'
88
- 'Python/executor_cases.c.h'
99
- 'Python/optimizer_cases.c.h'
10+
- '**_testinternalcapi**'
1011
- '!Python/perf_jit_trampoline.c'
1112
- '!**/*.md'
1213
- '!**/*.ini'
@@ -17,6 +18,7 @@ on:
1718
- 'Python/optimizer*.c'
1819
- 'Python/executor_cases.c.h'
1920
- 'Python/optimizer_cases.c.h'
21+
- '**_testinternalcapi**'
2022
- '!Python/perf_jit_trampoline.c'
2123
- '!**/*.md'
2224
- '!**/*.ini'
@@ -38,7 +40,7 @@ jobs:
3840
runs-on: ubuntu-24.04
3941
timeout-minutes: 90
4042
steps:
41-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v6
4244
with:
4345
persist-credentials: false
4446
- name: Build tier two interpreter
@@ -92,10 +94,10 @@ jobs:
9294
architecture: aarch64
9395
runner: ubuntu-24.04-arm
9496
steps:
95-
- uses: actions/checkout@v4
97+
- uses: actions/checkout@v6
9698
with:
9799
persist-credentials: false
98-
- uses: actions/setup-python@v5
100+
- uses: actions/setup-python@v6
99101
with:
100102
python-version: '3.11'
101103

@@ -140,10 +142,10 @@ jobs:
140142
llvm:
141143
- 21
142144
steps:
143-
- uses: actions/checkout@v4
145+
- uses: actions/checkout@v6
144146
with:
145147
persist-credentials: false
146-
- uses: actions/setup-python@v5
148+
- uses: actions/setup-python@v6
147149
with:
148150
python-version: '3.11'
149151
- name: Build with JIT enabled and GIL disabled
@@ -168,10 +170,10 @@ jobs:
168170
llvm:
169171
- 21
170172
steps:
171-
- uses: actions/checkout@v4
173+
- uses: actions/checkout@v6
172174
with:
173175
persist-credentials: false
174-
- uses: actions/setup-python@v5
176+
- uses: actions/setup-python@v6
175177
with:
176178
python-version: '3.11'
177179
- name: Build with JIT
@@ -195,10 +197,10 @@ jobs:
195197
llvm:
196198
- 21
197199
steps:
198-
- uses: actions/checkout@v4
200+
- uses: actions/checkout@v6
199201
with:
200202
persist-credentials: false
201-
- uses: actions/setup-python@v5
203+
- uses: actions/setup-python@v6
202204
with:
203205
python-version: '3.11'
204206
- name: Build with JIT and tailcall

0 commit comments

Comments
 (0)