Skip to content

Commit 039bf0b

Browse files
Merge branch 'main' into use-extra-assertions
2 parents 3c985b8 + fbe7b87 commit 039bf0b

File tree

1,121 files changed

+75246
-22846
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,121 files changed

+75246
-22846
lines changed

.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: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Modules/Setup* @erlend-aasland
3030
Objects/set* @rhettinger
3131
Objects/dict* @methane @markshannon
3232
Objects/typevarobject.c @JelleZijlstra
33+
Objects/unionobject.c @JelleZijlstra
3334
Objects/type* @markshannon
3435
Objects/codeobject.c @markshannon
3536
Objects/frameobject.c @markshannon
@@ -167,6 +168,9 @@ Include/internal/pycore_time.h @pganssle @abalkin
167168
**/*imap* @python/email-team
168169
**/*poplib* @python/email-team
169170

171+
# Exclude .mailmap from being owned by @python/email-team
172+
/.mailmap
173+
170174
# Garbage collector
171175
/Modules/gcmodule.c @pablogsal
172176
/Doc/library/gc.rst @pablogsal
@@ -184,7 +188,7 @@ Include/internal/pycore_time.h @pganssle @abalkin
184188

185189
# AST
186190
Python/ast.c @isidentical @JelleZijlstra @eclips4
187-
Python/ast_opt.c @isidentical @eclips4
191+
Python/ast_preprocess.c @isidentical @eclips4
188192
Parser/asdl.py @isidentical @JelleZijlstra @eclips4
189193
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4
190194
Lib/ast.py @isidentical @JelleZijlstra @eclips4
@@ -294,7 +298,12 @@ Lib/test/test_interpreters/ @ericsnowcurrently
294298
**/*-ios* @freakboy3742
295299

296300
# WebAssembly
297-
/Tools/wasm/ @brettcannon @freakboy3742
301+
Tools/wasm/config.site-wasm32-emscripten @freakboy3742
302+
/Tools/wasm/README.md @brettcannon @freakboy3742
303+
/Tools/wasm/wasi-env @brettcannon
304+
/Tools/wasm/wasi.py @brettcannon
305+
/Tools/wasm/emscripten @freakboy3742
306+
/Tools/wasm/wasi @brettcannon
298307

299308
# SBOM
300309
/Misc/externals.spdx.json @sethmlarson
@@ -316,3 +325,9 @@ Lib/test/test__colorize.py @hugovk
316325

317326
# Fuzzing
318327
Modules/_xxtestfuzz/ @ammaraskar
328+
329+
# t-strings
330+
**/*interpolationobject* @lysnikolaou
331+
**/*templateobject* @lysnikolaou
332+
**/*templatelib* @lysnikolaou
333+
**/*tstring* @lysnikolaou

.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/actionlint.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
self-hosted-runner:
2-
labels: ["windows-aarch64"]
2+
# Pending https://github.com/rhysd/actionlint/issues/533
3+
labels: ["windows-11-arm"]
34

45
config-variables: null
56

.github/workflows/build.yml

Lines changed: 18 additions & 27 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:
@@ -156,28 +162,18 @@ jobs:
156162
strategy:
157163
fail-fast: false
158164
matrix:
159-
os:
160-
- windows-latest
161165
arch:
162166
- x64
167+
- Win32
168+
- arm64
163169
free-threading:
164170
- false
165171
- true
166-
include:
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' }}
169-
arch: arm64
170-
free-threading: false
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' }}
173-
arch: arm64
174-
free-threading: true
175-
- os: windows-latest
176-
arch: Win32
177-
free-threading: false
172+
exclude:
173+
# Skip Win32 on free-threaded builds
174+
- { arch: Win32, free-threading: true }
178175
uses: ./.github/workflows/reusable-windows.yml
179176
with:
180-
os: ${{ matrix.os }}
181177
arch: ${{ matrix.arch }}
182178
free-threading: ${{ matrix.free-threading }}
183179

@@ -189,18 +185,12 @@ jobs:
189185
strategy:
190186
fail-fast: false
191187
matrix:
192-
os:
193-
- windows-latest
194188
arch:
195189
- x86
196190
- x64
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
191+
- arm64
201192
uses: ./.github/workflows/reusable-windows-msi.yml
202193
with:
203-
os: ${{ matrix.os }}
204194
arch: ${{ matrix.arch }}
205195

206196
build-macos:
@@ -280,7 +270,7 @@ jobs:
280270
fail-fast: false
281271
matrix:
282272
os: [ubuntu-24.04]
283-
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]
284274
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
285275
env:
286276
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -347,7 +337,7 @@ jobs:
347337
needs: build-context
348338
if: needs.build-context.outputs.run-tests == 'true'
349339
env:
350-
OPENSSL_VER: 3.0.15
340+
OPENSSL_VER: 3.0.16
351341
PYTHONSTRICTEXTENSIONBUILD: 1
352342
steps:
353343
- uses: actions/checkout@v4
@@ -438,8 +428,9 @@ jobs:
438428
# failing when executed from inside a virtual environment.
439429
"${VENV_PYTHON}" -m test \
440430
-W \
441-
-o \
431+
--slowest \
442432
-j4 \
433+
--timeout 900 \
443434
-x test_asyncio \
444435
-x test_multiprocessing_fork \
445436
-x test_multiprocessing_forkserver \
@@ -466,7 +457,7 @@ jobs:
466457
matrix:
467458
os: [ubuntu-24.04]
468459
env:
469-
OPENSSL_VER: 3.0.15
460+
OPENSSL_VER: 3.0.16
470461
PYTHONSTRICTEXTENSIONBUILD: 1
471462
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
472463
steps:

.github/workflows/jit.yml

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ jobs:
7474
runner: windows-latest
7575
- target: aarch64-pc-windows-msvc/msvc
7676
architecture: ARM64
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' }}
77+
runner: windows-11-arm
7978
- target: x86_64-apple-darwin/clang
8079
architecture: x86_64
8180
runner: macos-13
@@ -96,11 +95,10 @@ jobs:
9695
with:
9796
python-version: '3.11'
9897

98+
# PCbuild downloads LLVM automatically:
9999
- 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')
100+
if: runner.os == 'Windows'
102101
run: |
103-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
104102
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
105103
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
106104
@@ -115,7 +113,7 @@ jobs:
115113
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
116114
brew install llvm@${{ matrix.llvm }}
117115
export SDKROOT="$(xcrun --show-sdk-path)"
118-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
116+
./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
119117
make all --jobs 4
120118
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
121119
@@ -128,29 +126,30 @@ jobs:
128126
make all --jobs 4
129127
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
130128
131-
jit-with-disabled-gil:
132-
name: Free-Threaded (Debug)
133-
needs: interpreter
134-
runs-on: ubuntu-24.04
135-
timeout-minutes: 90
136-
strategy:
137-
fail-fast: false
138-
matrix:
139-
llvm:
140-
- 19
141-
steps:
142-
- uses: actions/checkout@v4
143-
with:
144-
persist-credentials: false
145-
- uses: actions/setup-python@v5
146-
with:
147-
python-version: '3.11'
148-
- name: Build with JIT enabled and GIL disabled
149-
run: |
150-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
151-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
152-
./configure --enable-experimental-jit --with-pydebug --disable-gil
153-
make all --jobs 4
154-
- name: Run tests
155-
run: |
156-
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
129+
# XXX: GH-133171
130+
# jit-with-disabled-gil:
131+
# name: Free-Threaded (Debug)
132+
# needs: interpreter
133+
# runs-on: ubuntu-24.04
134+
# timeout-minutes: 90
135+
# strategy:
136+
# fail-fast: false
137+
# matrix:
138+
# llvm:
139+
# - 19
140+
# steps:
141+
# - uses: actions/checkout@v4
142+
# with:
143+
# persist-credentials: false
144+
# - uses: actions/setup-python@v5
145+
# with:
146+
# python-version: '3.11'
147+
# - name: Build with JIT enabled and GIL disabled
148+
# run: |
149+
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
150+
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
151+
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
152+
# make all --jobs 4
153+
# - name: Run tests
154+
# run: |
155+
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

.github/workflows/mypy.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,23 @@ on:
88
pull_request:
99
paths:
1010
- ".github/workflows/mypy.yml"
11+
- "Lib/_colorize.py"
1112
- "Lib/_pyrepl/**"
1213
- "Lib/test/libregrtest/**"
14+
- "Lib/tomllib/**"
15+
- "Misc/mypy/**"
16+
- "Tools/build/compute-changes.py"
17+
- "Tools/build/deepfreeze.py"
1318
- "Tools/build/generate_sbom.py"
19+
- "Tools/build/generate-build-details.py"
20+
- "Tools/build/verify_ensurepip_wheels.py"
21+
- "Tools/build/update_file.py"
22+
- "Tools/build/umarshal.py"
1423
- "Tools/cases_generator/**"
1524
- "Tools/clinic/**"
1625
- "Tools/jit/**"
1726
- "Tools/peg_generator/**"
1827
- "Tools/requirements-dev.txt"
19-
- "Tools/wasm/**"
2028
workflow_dispatch:
2129

2230
permissions:
@@ -42,12 +50,12 @@ jobs:
4250
target: [
4351
"Lib/_pyrepl",
4452
"Lib/test/libregrtest",
53+
"Lib/tomllib",
4554
"Tools/build",
4655
"Tools/cases_generator",
4756
"Tools/clinic",
4857
"Tools/jit",
4958
"Tools/peg_generator",
50-
"Tools/wasm",
5159
]
5260
steps:
5361
- uses: actions/checkout@v4

.github/workflows/reusable-context.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ jobs:
9797
run: python Tools/build/compute-changes.py
9898
env:
9999
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
100+
GITHUB_EVENT_NAME: ${{ github.event_name }}
101+
CCF_TARGET_REF: ${{ github.base_ref || github.event.repository.default_branch }}
102+
CCF_HEAD_REF: ${{ github.event.pull_request.head.sha || github.sha }}
100103

101104
- name: Compute hash for config cache key
102105
id: config-hash

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: |
6767
set -Eeuo pipefail
6868
# Build docs with the nit-picky option; write warnings to file
69-
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --keep-going --warning-file sphinx-warnings.txt" html
69+
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --warning-file sphinx-warnings.txt" html
7070
- name: 'Check warnings'
7171
if: github.event_name == 'pull_request'
7272
run: |
@@ -101,4 +101,4 @@ jobs:
101101
run: make -C Doc/ PYTHON=../python venv
102102
# Use "xvfb-run" since some doctest tests open GUI windows
103103
- name: 'Run documentation doctest'
104-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning --keep-going" doctest
104+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning" doctest

0 commit comments

Comments
 (0)