Skip to content

Commit 9c365c2

Browse files
authored
Merge branch 'main' into fix-issue-54873
2 parents e9ac454 + 34f5ae6 commit 9c365c2

File tree

1,910 files changed

+125988
-52681
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,910 files changed

+125988
-52681
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
FROM docker.io/library/fedora:37
1+
FROM docker.io/library/fedora:40
22

33
ENV CC=clang
44

5-
ENV WASI_SDK_VERSION=20
5+
ENV WASI_SDK_VERSION=21
66
ENV WASI_SDK_PATH=/opt/wasi-sdk
77

88
ENV WASMTIME_HOME=/opt/wasmtime
9-
ENV WASMTIME_VERSION=14.0.4
9+
ENV WASMTIME_VERSION=18.0.3
1010
ENV WASMTIME_CPU_ARCH=x86_64
1111

1212
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ Include/opcode_ids.h generated
8383
Include/token.h generated
8484
Lib/_opcode_metadata.py generated
8585
Lib/keyword.py generated
86+
Lib/test/certdata/*.pem generated
87+
Lib/test/certdata/*.0 generated
8688
Lib/test/levenshtein_examples.json generated
8789
Lib/test/test_stable_abi_ctypes.py generated
8890
Lib/token.py generated

.github/CODEOWNERS

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,23 @@ Objects/type* @markshannon
2929
Objects/codeobject.c @markshannon
3030
Objects/frameobject.c @markshannon
3131
Objects/call.c @markshannon
32-
Python/ceval*.c @markshannon @gvanrossum
33-
Python/ceval*.h @markshannon @gvanrossum
32+
Python/ceval*.c @markshannon
33+
Python/ceval*.h @markshannon
3434
Python/compile.c @markshannon @iritkatriel
3535
Python/assemble.c @markshannon @iritkatriel
3636
Python/flowgraph.c @markshannon @iritkatriel
37+
Python/instruction_sequence.c @iritkatriel
3738
Python/ast_opt.c @isidentical
38-
Python/bytecodes.c @markshannon @gvanrossum
39-
Python/optimizer*.c @markshannon @gvanrossum
39+
Python/bytecodes.c @markshannon
40+
Python/optimizer*.c @markshannon
4041
Python/optimizer_analysis.c @Fidget-Spinner
4142
Python/optimizer_bytecodes.c @Fidget-Spinner
43+
Python/symtable.c @JelleZijlstra @carljm
44+
Lib/_pyrepl/* @pablogsal @lysnikolaou @ambv
4245
Lib/test/test_patma.py @brandtbucher
4346
Lib/test/test_type_*.py @JelleZijlstra
44-
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum
47+
Lib/test/test_capi/test_misc.py @markshannon
48+
Lib/test/test_pyrepl/* @pablogsal @lysnikolaou @ambv
4549
Tools/c-analyzer/ @ericsnowcurrently
4650

4751
# dbm
@@ -72,11 +76,8 @@ Programs/python.c @ericsnowcurrently
7276
Tools/build/generate_global_objects.py @ericsnowcurrently
7377

7478
# Exceptions
75-
Lib/traceback.py @iritkatriel
7679
Lib/test/test_except*.py @iritkatriel
77-
Lib/test/test_traceback.py @iritkatriel
7880
Objects/exceptions.c @iritkatriel
79-
Python/traceback.c @iritkatriel
8081

8182
# Hashing
8283
**/*hashlib* @gpshead @tiran
@@ -119,7 +120,7 @@ Python/dynload_*.c @ericsnowcurrently
119120
Lib/test/test_module/ @ericsnowcurrently
120121
Doc/c-api/module.rst @ericsnowcurrently
121122
**/*importlib/resources/* @jaraco @warsaw @FFY00
122-
**/importlib/metadata/* @jaraco @warsaw
123+
**/*importlib/metadata/* @jaraco @warsaw
123124

124125
# Dates and times
125126
**/*datetime* @pganssle @abalkin
@@ -150,13 +151,13 @@ Include/internal/pycore_time.h @pganssle @abalkin
150151
/Lib/test/test_tokenize.py @pablogsal @lysnikolaou
151152

152153
# Code generator
153-
/Tools/cases_generator/ @gvanrossum
154+
/Tools/cases_generator/ @markshannon
154155

155156
# AST
156-
Python/ast.c @isidentical
157-
Parser/asdl.py @isidentical
158-
Parser/asdl_c.py @isidentical
159-
Lib/ast.py @isidentical
157+
Python/ast.c @isidentical @JelleZijlstra
158+
Parser/asdl.py @isidentical @JelleZijlstra
159+
Parser/asdl_c.py @isidentical @JelleZijlstra
160+
Lib/ast.py @isidentical @JelleZijlstra
160161

161162
# Mock
162163
/Lib/unittest/mock.py @cjw296
@@ -173,6 +174,10 @@ Lib/ast.py @isidentical
173174
/Lib/test/test_subprocess.py @gpshead
174175
/Modules/*subprocess* @gpshead
175176

177+
# debugger
178+
**/*pdb* @gaogaotiantian
179+
**/*bdb* @gaogaotiantian
180+
176181
# Limited C API & stable ABI
177182
Tools/build/stable_abi.py @encukou
178183
Misc/stable_abi.toml @encukou
@@ -243,10 +248,23 @@ Lib/test/support/interpreters/ @ericsnowcurrently
243248
Modules/_xx*interp*module.c @ericsnowcurrently
244249
Lib/test/test_interpreters/ @ericsnowcurrently
245250

251+
# Android
252+
**/*Android* @mhsmith
253+
**/*android* @mhsmith
254+
255+
# iOS (but not termios)
256+
**/iOS* @freakboy3742
257+
**/ios* @freakboy3742
258+
**/*_iOS* @freakboy3742
259+
**/*_ios* @freakboy3742
260+
**/*-iOS* @freakboy3742
261+
**/*-ios* @freakboy3742
262+
246263
# WebAssembly
247264
/Tools/wasm/ @brettcannon
248265

249266
# SBOM
267+
/Misc/externals.spdx.json @sethmlarson
250268
/Misc/sbom.spdx.json @sethmlarson
251269
/Tools/build/generate_sbom.py @sethmlarson
252270

.github/workflows/build.yml

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@ on:
88
push:
99
branches:
1010
- 'main'
11-
- '3.12'
12-
- '3.11'
13-
- '3.10'
14-
- '3.9'
15-
- '3.8'
11+
- '3.*'
1612
pull_request:
1713
branches:
1814
- 'main'
19-
- '3.12'
20-
- '3.11'
21-
- '3.10'
22-
- '3.9'
23-
- '3.8'
15+
- '3.*'
2416

2517
permissions:
2618
contents: read
@@ -97,7 +89,7 @@ jobs:
9789
- name: Get a list of the changed documentation-related files
9890
if: github.event_name == 'pull_request'
9991
id: changed-docs-files
100-
uses: Ana06/get-changed-files@v2.2.0
92+
uses: Ana06/get-changed-files@v2.3.0
10193
with:
10294
filter: |
10395
Doc/**
@@ -137,6 +129,7 @@ jobs:
137129
uses: actions/cache@v4
138130
with:
139131
path: config.cache
132+
# Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
140133
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
141134
- name: Install Dependencies
142135
run: sudo ./.github/workflows/posix-deps-apt.sh
@@ -206,6 +199,9 @@ jobs:
206199
uses: ./.github/workflows/reusable-macos.yml
207200
with:
208201
config_hash: ${{ needs.check_source.outputs.config_hash }}
202+
# Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
203+
# Cirrus used for upstream, macos-14 for forks.
204+
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14", "macos-13"]'
209205

210206
build_macos_free_threading:
211207
name: 'macOS (free-threading)'
@@ -215,6 +211,9 @@ jobs:
215211
with:
216212
config_hash: ${{ needs.check_source.outputs.config_hash }}
217213
free-threading: true
214+
# Cirrus and macos-14 are M1.
215+
# Cirrus used for upstream, macos-14 for forks.
216+
os-matrix: '["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14"]'
218217

219218
build_ubuntu:
220219
name: 'Ubuntu'
@@ -245,7 +244,7 @@ jobs:
245244
246245
build_ubuntu_ssltests:
247246
name: 'Ubuntu SSL tests with OpenSSL'
248-
runs-on: ubuntu-20.04
247+
runs-on: ubuntu-22.04
249248
timeout-minutes: 60
250249
needs: check_source
251250
if: needs.check_source.outputs.run_tests == 'true'
@@ -301,9 +300,17 @@ jobs:
301300
- name: SSL tests
302301
run: ./python Lib/test/ssltests.py
303302

303+
build_wasi:
304+
name: 'WASI'
305+
needs: check_source
306+
if: needs.check_source.outputs.run_tests == 'true'
307+
uses: ./.github/workflows/reusable-wasi.yml
308+
with:
309+
config_hash: ${{ needs.check_source.outputs.config_hash }}
310+
304311
test_hypothesis:
305312
name: "Hypothesis tests on Ubuntu"
306-
runs-on: ubuntu-20.04
313+
runs-on: ubuntu-22.04
307314
timeout-minutes: 60
308315
needs: check_source
309316
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
@@ -383,7 +390,7 @@ jobs:
383390
id: cache-hypothesis-database
384391
uses: actions/cache@v4
385392
with:
386-
path: ./hypothesis
393+
path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/
387394
key: hypothesis-database-${{ github.head_ref || github.run_id }}
388395
restore-keys: |
389396
- hypothesis-database-
@@ -411,12 +418,12 @@ jobs:
411418
if: always()
412419
with:
413420
name: hypothesis-example-db
414-
path: .hypothesis/examples/
421+
path: ${{ env.CPYTHON_BUILDDIR }}/.hypothesis/examples/
415422

416423

417424
build_asan:
418425
name: 'Address sanitizer'
419-
runs-on: ubuntu-20.04
426+
runs-on: ubuntu-22.04
420427
timeout-minutes: 60
421428
needs: check_source
422429
if: needs.check_source.outputs.run_tests == 'true'
@@ -472,6 +479,28 @@ jobs:
472479
- name: Tests
473480
run: xvfb-run make test
474481

482+
build_tsan:
483+
name: 'Thread sanitizer'
484+
needs: check_source
485+
if: needs.check_source.outputs.run_tests == 'true'
486+
uses: ./.github/workflows/reusable-tsan.yml
487+
with:
488+
config_hash: ${{ needs.check_source.outputs.config_hash }}
489+
options: ./configure --config-cache --with-thread-sanitizer --with-pydebug
490+
suppressions_path: Tools/tsan/supressions.txt
491+
tsan_logs_artifact_name: tsan-logs-default
492+
493+
build_tsan_free_threading:
494+
name: 'Thread sanitizer (free-threading)'
495+
needs: check_source
496+
if: needs.check_source.outputs.run_tests == 'true'
497+
uses: ./.github/workflows/reusable-tsan.yml
498+
with:
499+
config_hash: ${{ needs.check_source.outputs.config_hash }}
500+
options: ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
501+
suppressions_path: Tools/tsan/suppressions_free_threading.txt
502+
tsan_logs_artifact_name: tsan-logs-free-threading
503+
475504
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
476505
cifuzz:
477506
name: CIFuzz
@@ -525,10 +554,13 @@ jobs:
525554
- build_ubuntu
526555
- build_ubuntu_free_threading
527556
- build_ubuntu_ssltests
557+
- build_wasi
528558
- build_windows
529559
- build_windows_free_threading
530560
- test_hypothesis
531561
- build_asan
562+
- build_tsan
563+
- build_tsan_free_threading
532564
- cifuzz
533565

534566
runs-on: ubuntu-latest
@@ -558,9 +590,12 @@ jobs:
558590
build_ubuntu,
559591
build_ubuntu_free_threading,
560592
build_ubuntu_ssltests,
593+
build_wasi,
561594
build_windows,
562595
build_windows_free_threading,
563596
build_asan,
597+
build_tsan,
598+
build_tsan_free_threading,
564599
'
565600
|| ''
566601
}}

0 commit comments

Comments
 (0)