Skip to content

Commit 0295846

Browse files
authored
Merge branch 'main' into improvement/ABCMeta_subclasscheck
2 parents b723912 + 3ec3d05 commit 0295846

File tree

1,910 files changed

+119947
-36149
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

+119947
-36149
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "ghcr.io/python/devcontainer:2024.09.25.11038928730",
2+
"image": "ghcr.io/python/devcontainer:2025.05.29.15334414373",
33
"onCreateCommand": [
44
// Install common tooling.
55
"dnf",

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
root = true
22

3-
[*.{py,c,cpp,h,js,rst,md,yml,yaml}]
3+
[*.{py,c,cpp,h,js,rst,md,yml,yaml,gram}]
44
trim_trailing_whitespace = true
55
insert_final_newline = true
66
indent_style = space
77

8-
[*.{py,c,cpp,h}]
8+
[*.{py,c,cpp,h,gram}]
99
indent_size = 4
1010

1111
[*.rst]

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*.ico binary
1111
*.jpg binary
1212
*.pck binary
13+
*.pdf binary
1314
*.png binary
1415
*.psd binary
1516
*.tar binary
@@ -67,6 +68,7 @@ PCbuild/readme.txt dos
6768
**/clinic/*.cpp.h generated
6869
**/clinic/*.h.h generated
6970
*_db.h generated
71+
Doc/c-api/lifecycle.dot.svg generated
7072
Doc/data/stable_abi.dat generated
7173
Doc/library/token-list.inc generated
7274
Include/internal/pycore_ast.h generated

.github/CODEOWNERS

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ Modules/Setup* @erlend-aasland
2626
**/*context* @1st1
2727
**/*genobject* @markshannon
2828
**/*hamt* @1st1
29-
**/*jit* @brandtbucher @savannahostrowski
29+
**/*jit* @brandtbucher @savannahostrowski @diegorusso
30+
Python/perf_jit_trampoline.c # Exclude the owners of "**/*jit*", above.
3031
Objects/set* @rhettinger
3132
Objects/dict* @methane @markshannon
3233
Objects/typevarobject.c @JelleZijlstra
34+
Objects/unionobject.c @JelleZijlstra
3335
Objects/type* @markshannon
3436
Objects/codeobject.c @markshannon
3537
Objects/frameobject.c @markshannon
3638
Objects/call.c @markshannon
39+
Objects/object.c @ZeroIntensity
3740
Python/ceval*.c @markshannon
3841
Python/ceval*.h @markshannon
3942
Python/codegen.c @markshannon @iritkatriel
@@ -43,8 +46,9 @@ Python/flowgraph.c @markshannon @iritkatriel
4346
Python/instruction_sequence.c @iritkatriel
4447
Python/bytecodes.c @markshannon
4548
Python/optimizer*.c @markshannon
46-
Python/optimizer_analysis.c @Fidget-Spinner
47-
Python/optimizer_bytecodes.c @Fidget-Spinner
49+
Python/optimizer_analysis.c @Fidget-Spinner @tomasr8
50+
Python/optimizer_bytecodes.c @Fidget-Spinner @tomasr8
51+
Python/optimizer_symbols.c @tomasr8
4852
Python/symtable.c @JelleZijlstra @carljm
4953
Lib/_pyrepl/* @pablogsal @lysnikolaou @ambv
5054
Lib/test/test_patma.py @brandtbucher
@@ -65,8 +69,8 @@ Doc/_static/** @AA-Turner @hugovk
6569
Doc/tools/** @AA-Turner @hugovk
6670

6771
# runtime state/lifecycle
68-
**/*pylifecycle* @ericsnowcurrently
69-
**/*pystate* @ericsnowcurrently
72+
**/*pylifecycle* @ericsnowcurrently @ZeroIntensity
73+
**/*pystate* @ericsnowcurrently @ZeroIntensity
7074
**/*preconfig* @ericsnowcurrently
7175
**/*initconfig* @ericsnowcurrently
7276
**/*pathconfig* @ericsnowcurrently
@@ -186,13 +190,13 @@ Include/internal/pycore_time.h @pganssle @abalkin
186190
/Tools/cases_generator/ @markshannon
187191

188192
# AST
189-
Python/ast.c @isidentical @JelleZijlstra @eclips4
190-
Python/ast_opt.c @isidentical @eclips4
191-
Parser/asdl.py @isidentical @JelleZijlstra @eclips4
192-
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4
193-
Lib/ast.py @isidentical @JelleZijlstra @eclips4
194-
Lib/_ast_unparse.py @isidentical @JelleZijlstra @eclips4
195-
Lib/test/test_ast/ @eclips4
193+
Python/ast.c @isidentical @JelleZijlstra @eclips4 @tomasr8
194+
Python/ast_preprocess.c @isidentical @eclips4 @tomasr8
195+
Parser/asdl.py @isidentical @JelleZijlstra @eclips4 @tomasr8
196+
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4 @tomasr8
197+
Lib/ast.py @isidentical @JelleZijlstra @eclips4 @tomasr8
198+
Lib/_ast_unparse.py @isidentical @JelleZijlstra @eclips4 @tomasr8
199+
Lib/test/test_ast/ @eclips4 @tomasr8
196200

197201
# Mock
198202
/Lib/unittest/mock.py @cjw296
@@ -280,9 +284,13 @@ Doc/howto/clinic.rst @erlend-aasland
280284
# Subinterpreters
281285
**/*interpreteridobject.* @ericsnowcurrently
282286
**/*crossinterp* @ericsnowcurrently
283-
Lib/test/support/interpreters/ @ericsnowcurrently
284287
Modules/_interp*module.c @ericsnowcurrently
288+
Lib/test/test__interp*.py @ericsnowcurrently
289+
Lib/concurrent/interpreters/ @ericsnowcurrently
290+
Lib/test/support/channels.py @ericsnowcurrently
291+
Doc/library/concurrent.interpreters.rst @ericsnowcurrently
285292
Lib/test/test_interpreters/ @ericsnowcurrently
293+
Lib/concurrent/futures/interpreter.py @ericsnowcurrently
286294

287295
# Android
288296
**/*Android* @mhsmith @freakboy3742
@@ -297,7 +305,12 @@ Lib/test/test_interpreters/ @ericsnowcurrently
297305
**/*-ios* @freakboy3742
298306

299307
# WebAssembly
300-
/Tools/wasm/ @brettcannon @freakboy3742
308+
Tools/wasm/config.site-wasm32-emscripten @freakboy3742
309+
/Tools/wasm/README.md @brettcannon @freakboy3742
310+
/Tools/wasm/wasi-env @brettcannon
311+
/Tools/wasm/wasi.py @brettcannon
312+
/Tools/wasm/emscripten @freakboy3742
313+
/Tools/wasm/wasi @brettcannon
301314

302315
# SBOM
303316
/Misc/externals.spdx.json @sethmlarson
@@ -319,3 +332,17 @@ Lib/test/test__colorize.py @hugovk
319332

320333
# Fuzzing
321334
Modules/_xxtestfuzz/ @ammaraskar
335+
336+
# t-strings
337+
**/*interpolationobject* @lysnikolaou
338+
**/*templateobject* @lysnikolaou
339+
**/*templatelib* @lysnikolaou
340+
**/*tstring* @lysnikolaou
341+
342+
# Remote debugging
343+
Python/remote_debug.h @pablogsal
344+
Python/remote_debugging.c @pablogsal
345+
Modules/_remote_debugging_module.c @pablogsal @ambv @1st1
346+
347+
# gettext
348+
**/*gettext* @tomasr8

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ body:
4040
- "3.12"
4141
- "3.13"
4242
- "3.14"
43+
- "3.15"
4344
- "CPython main branch"
4445
validations:
4546
required: true

.github/ISSUE_TEMPLATE/crash.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ body:
3333
- "3.12"
3434
- "3.13"
3535
- "3.14"
36+
- "3.15"
3637
- "CPython main branch"
3738
validations:
3839
required: true

.github/workflows/build.yml

Lines changed: 109 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ permissions:
1515
contents: read
1616

1717
concurrency:
18-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
18+
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#concurrency
19+
# 'group' must be a key uniquely representing a PR or push event.
20+
# github.workflow is the workflow name
21+
# github.actor is the user invoking the workflow
22+
# github.head_ref is the source branch of the PR or otherwise blank
23+
# github.run_id is a unique number for the current run
24+
group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }}
1925
cancel-in-progress: true
2026

2127
env:
@@ -254,7 +260,7 @@ jobs:
254260
free-threading: ${{ matrix.free-threading }}
255261
os: ${{ matrix.os }}
256262

257-
build-ubuntu-ssltests:
263+
build-ubuntu-ssltests-openssl:
258264
name: 'Ubuntu SSL tests with OpenSSL'
259265
runs-on: ${{ matrix.os }}
260266
timeout-minutes: 60
@@ -264,7 +270,7 @@ jobs:
264270
fail-fast: false
265271
matrix:
266272
os: [ubuntu-24.04]
267-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
273+
openssl_ver: [3.0.16, 3.1.8, 3.2.4, 3.3.3, 3.4.1]
268274
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
269275
env:
270276
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -316,6 +322,81 @@ jobs:
316322
- name: SSL tests
317323
run: ./python Lib/test/ssltests.py
318324

325+
build-ubuntu-ssltests-awslc:
326+
name: 'Ubuntu SSL tests with AWS-LC'
327+
runs-on: ${{ matrix.os }}
328+
timeout-minutes: 60
329+
needs: build-context
330+
if: needs.build-context.outputs.run-tests == 'true'
331+
strategy:
332+
fail-fast: false
333+
matrix:
334+
os: [ubuntu-24.04]
335+
awslc_ver: [1.55.0]
336+
env:
337+
AWSLC_VER: ${{ matrix.awslc_ver}}
338+
MULTISSL_DIR: ${{ github.workspace }}/multissl
339+
OPENSSL_DIR: ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}
340+
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}/lib
341+
steps:
342+
- uses: actions/checkout@v4
343+
with:
344+
persist-credentials: false
345+
- name: Runner image version
346+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
347+
- name: Restore config.cache
348+
uses: actions/cache@v4
349+
with:
350+
path: config.cache
351+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
352+
- name: Register gcc problem matcher
353+
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
354+
- name: Install dependencies
355+
run: sudo ./.github/workflows/posix-deps-apt.sh
356+
- name: Configure SSL lib env vars
357+
run: |
358+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
359+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}" >> "$GITHUB_ENV"
360+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}/lib" >> "$GITHUB_ENV"
361+
- name: 'Restore AWS-LC build'
362+
id: cache-aws-lc
363+
uses: actions/cache@v4
364+
with:
365+
path: ./multissl/aws-lc/${{ matrix.awslc_ver }}
366+
key: ${{ matrix.os }}-multissl-aws-lc-${{ matrix.awslc_ver }}
367+
- name: Install AWS-LC
368+
if: steps.cache-aws-lc.outputs.cache-hit != 'true'
369+
run: |
370+
python3 Tools/ssl/multissltests.py \
371+
--steps=library \
372+
--base-directory "$MULTISSL_DIR" \
373+
--awslc ${{ matrix.awslc_ver }} \
374+
--system Linux
375+
- name: Add ccache to PATH
376+
run: |
377+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
378+
- name: Configure ccache action
379+
uses: hendrikmuhs/[email protected]
380+
with:
381+
save: false
382+
- name: Configure CPython
383+
run: |
384+
./configure CFLAGS="-fdiagnostics-format=json" \
385+
--config-cache \
386+
--enable-slower-safety \
387+
--with-pydebug \
388+
--with-openssl="$OPENSSL_DIR" \
389+
--with-builtin-hashlib-hashes=blake2 \
390+
--with-ssl-default-suites=openssl
391+
- name: Build CPython
392+
run: make -j
393+
- name: Display build info
394+
run: make pythoninfo
395+
- name: Verify python is linked to AWS-LC
396+
run: ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' | grep AWS-LC
397+
- name: SSL tests
398+
run: ./python Lib/test/ssltests.py
399+
319400
build-wasi:
320401
name: 'WASI'
321402
needs: build-context
@@ -331,7 +412,7 @@ jobs:
331412
needs: build-context
332413
if: needs.build-context.outputs.run-tests == 'true'
333414
env:
334-
OPENSSL_VER: 3.0.15
415+
OPENSSL_VER: 3.0.16
335416
PYTHONSTRICTEXTENSIONBUILD: 1
336417
steps:
337418
- uses: actions/checkout@v4
@@ -422,8 +503,9 @@ jobs:
422503
# failing when executed from inside a virtual environment.
423504
"${VENV_PYTHON}" -m test \
424505
-W \
425-
-o \
506+
--slowest \
426507
-j4 \
508+
--timeout 900 \
427509
-x test_asyncio \
428510
-x test_multiprocessing_fork \
429511
-x test_multiprocessing_forkserver \
@@ -450,7 +532,7 @@ jobs:
450532
matrix:
451533
os: [ubuntu-24.04]
452534
env:
453-
OPENSSL_VER: 3.0.15
535+
OPENSSL_VER: 3.0.16
454536
PYTHONSTRICTEXTENSIONBUILD: 1
455537
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
456538
steps:
@@ -503,20 +585,28 @@ jobs:
503585
- name: Tests
504586
run: xvfb-run make ci
505587

506-
build-tsan:
507-
name: >-
508-
Thread sanitizer
509-
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
588+
build-san:
589+
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
590+
Sanitizers${{ '' }}
510591
needs: build-context
511592
if: needs.build-context.outputs.run-tests == 'true'
512593
strategy:
513594
fail-fast: false
514595
matrix:
596+
check-name:
597+
- Thread
515598
free-threading:
516599
- false
517600
- true
518-
uses: ./.github/workflows/reusable-tsan.yml
601+
sanitizer:
602+
- TSan
603+
include:
604+
- check-name: Undefined behavior
605+
sanitizer: UBSan
606+
free-threading: false
607+
uses: ./.github/workflows/reusable-san.yml
519608
with:
609+
sanitizer: ${{ matrix.sanitizer }}
520610
config_hash: ${{ needs.build-context.outputs.config-hash }}
521611
free-threading: ${{ matrix.free-threading }}
522612

@@ -613,11 +703,12 @@ jobs:
613703
- build-windows-msi
614704
- build-macos
615705
- build-ubuntu
616-
- build-ubuntu-ssltests
706+
- build-ubuntu-ssltests-awslc
707+
- build-ubuntu-ssltests-openssl
617708
- build-wasi
618709
- test-hypothesis
619710
- build-asan
620-
- build-tsan
711+
- build-san
621712
- cross-build-linux
622713
- cifuzz
623714
if: always()
@@ -628,7 +719,8 @@ jobs:
628719
with:
629720
allowed-failures: >-
630721
build-windows-msi,
631-
build-ubuntu-ssltests,
722+
build-ubuntu-ssltests-awslc,
723+
build-ubuntu-ssltests-openssl,
632724
test-hypothesis,
633725
cifuzz,
634726
allowed-skips: >-
@@ -646,11 +738,12 @@ jobs:
646738
check-generated-files,
647739
build-macos,
648740
build-ubuntu,
649-
build-ubuntu-ssltests,
741+
build-ubuntu-ssltests-awslc,
742+
build-ubuntu-ssltests-openssl,
650743
build-wasi,
651744
test-hypothesis,
652745
build-asan,
653-
build-tsan,
746+
build-san,
654747
cross-build-linux,
655748
'
656749
|| ''

0 commit comments

Comments
 (0)