Skip to content

Commit 090a33e

Browse files
authored
Merge branch 'main' into pythongh-11599-docs
2 parents 244d00c + de28651 commit 090a33e

File tree

1,331 files changed

+113712
-48813
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,331 files changed

+113712
-48813
lines changed

.azure-pipelines/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
trigger: ['main', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
1+
trigger: ['main', '3.*']
22

33
jobs:
44
- job: Prebuild

.editorconfig

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

3-
[*.{py,c,cpp,h,js,rst,md,yml}]
3+
[*.{py,c,cpp,h,js,rst,md,yml,yaml}]
44
trim_trailing_whitespace = true
55
insert_final_newline = true
66
indent_style = space
@@ -11,5 +11,5 @@ indent_size = 4
1111
[*.rst]
1212
indent_size = 3
1313

14-
[*.{js,yml}]
14+
[*.{js,yml,yaml}]
1515
indent_size = 2

.github/CODEOWNERS

Lines changed: 26 additions & 7 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
@@ -107,13 +108,16 @@ Objects/exceptions.c @iritkatriel
107108
# Hashing & cryptographic primitives
108109
**/*hashlib* @gpshead @tiran @picnixz
109110
**/*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
111+
**/*pyhash* @gpshead @tiran @picnixz
112+
Modules/*blake* @gpshead @tiran @picnixz
113+
Modules/*md5* @gpshead @tiran @picnixz
114+
Modules/*sha* @gpshead @tiran @picnixz
115+
Modules/_hacl/** @gpshead @picnixz
115116
**/*hmac* @gpshead @picnixz
116117

118+
# libssl
119+
**/*ssl* @gpshead @picnixz
120+
117121
# logging
118122
**/*logging* @vsajip
119123

@@ -164,6 +168,9 @@ Include/internal/pycore_time.h @pganssle @abalkin
164168
**/*imap* @python/email-team
165169
**/*poplib* @python/email-team
166170

171+
# Exclude .mailmap from being owned by @python/email-team
172+
/.mailmap
173+
167174
# Garbage collector
168175
/Modules/gcmodule.c @pablogsal
169176
/Doc/library/gc.rst @pablogsal
@@ -181,10 +188,11 @@ Include/internal/pycore_time.h @pganssle @abalkin
181188

182189
# AST
183190
Python/ast.c @isidentical @JelleZijlstra @eclips4
184-
Python/ast_opt.c @isidentical @eclips4
191+
Python/ast_preprocess.c @isidentical @eclips4
185192
Parser/asdl.py @isidentical @JelleZijlstra @eclips4
186193
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4
187194
Lib/ast.py @isidentical @JelleZijlstra @eclips4
195+
Lib/_ast_unparse.py @isidentical @JelleZijlstra @eclips4
188196
Lib/test/test_ast/ @eclips4
189197

190198
# Mock
@@ -290,7 +298,12 @@ Lib/test/test_interpreters/ @ericsnowcurrently
290298
**/*-ios* @freakboy3742
291299

292300
# WebAssembly
293-
/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
294307

295308
# SBOM
296309
/Misc/externals.spdx.json @sethmlarson
@@ -312,3 +325,9 @@ Lib/test/test__colorize.py @hugovk
312325

313326
# Fuzzing
314327
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/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Please read this comment in its entirety. It's quite important.
77
It should be in the following format:
88
99
```
10-
gh-NNNNN: Summary of the changes made
10+
gh-NNNNNN: Summary of the changes made
1111
```
1212
13-
Where: gh-NNNNN refers to the GitHub issue number.
13+
Where: gh-NNNNNN refers to the GitHub issue number.
1414
1515
Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue.
1616
@@ -20,11 +20,11 @@ If this is a backport PR (PR made against branches other than `main`),
2020
please ensure that the PR title is in the following format:
2121
2222
```
23-
[X.Y] <title from the original PR> (GH-NNNN)
23+
[X.Y] <title from the original PR> (GH-NNNNNN)
2424
```
2525
26-
Where: [X.Y] is the branch name, e.g. [3.6].
26+
Where: [X.Y] is the branch name, for example: [3.13].
2727
28-
GH-NNNN refers to the PR number from `main`.
28+
GH-NNNNNN refers to the PR number from `main`.
2929
3030
-->

.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: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -156,26 +156,18 @@ jobs:
156156
strategy:
157157
fail-fast: false
158158
matrix:
159-
os:
160-
- windows-latest
161159
arch:
162160
- x64
161+
- Win32
162+
- arm64
163163
free-threading:
164164
- false
165165
- true
166-
include:
167-
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
168-
arch: arm64
169-
free-threading: false
170-
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
171-
arch: arm64
172-
free-threading: true
173-
- os: windows-latest
174-
arch: Win32
175-
free-threading: false
166+
exclude:
167+
# Skip Win32 on free-threaded builds
168+
- { arch: Win32, free-threading: true }
176169
uses: ./.github/workflows/reusable-windows.yml
177170
with:
178-
os: ${{ matrix.os }}
179171
arch: ${{ matrix.arch }}
180172
free-threading: ${{ matrix.free-threading }}
181173

@@ -272,7 +264,7 @@ jobs:
272264
fail-fast: false
273265
matrix:
274266
os: [ubuntu-24.04]
275-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
267+
openssl_ver: [3.0.16, 3.1.8, 3.2.4, 3.3.3, 3.4.1]
276268
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
277269
env:
278270
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -339,7 +331,7 @@ jobs:
339331
needs: build-context
340332
if: needs.build-context.outputs.run-tests == 'true'
341333
env:
342-
OPENSSL_VER: 3.0.15
334+
OPENSSL_VER: 3.0.16
343335
PYTHONSTRICTEXTENSIONBUILD: 1
344336
steps:
345337
- uses: actions/checkout@v4
@@ -430,8 +422,9 @@ jobs:
430422
# failing when executed from inside a virtual environment.
431423
"${VENV_PYTHON}" -m test \
432424
-W \
433-
-o \
425+
--slowest \
434426
-j4 \
427+
--timeout 900 \
435428
-x test_asyncio \
436429
-x test_multiprocessing_fork \
437430
-x test_multiprocessing_forkserver \
@@ -458,7 +451,7 @@ jobs:
458451
matrix:
459452
os: [ubuntu-24.04]
460453
env:
461-
OPENSSL_VER: 3.0.15
454+
OPENSSL_VER: 3.0.16
462455
PYTHONSTRICTEXTENSIONBUILD: 1
463456
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
464457
steps:

.github/workflows/jit.yml

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
runner: windows-latest
7575
- target: aarch64-pc-windows-msvc/msvc
7676
architecture: ARM64
77-
runner: windows-latest
77+
runner: windows-11-arm
7878
- target: x86_64-apple-darwin/clang
7979
architecture: x86_64
8080
runner: macos-13
@@ -95,36 +95,29 @@ jobs:
9595
with:
9696
python-version: '3.11'
9797

98-
- name: Native Windows
99-
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
98+
# PCbuild downloads LLVM automatically:
99+
- name: Windows
100+
if: runner.os == 'Windows'
100101
run: |
101-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
102102
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
103103
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
104104
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-
112105
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
113106
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
114107
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
115108
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
116-
- name: Native macOS
109+
- name: macOS
117110
if: runner.os == 'macOS'
118111
run: |
119112
brew update
120113
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
121114
brew install llvm@${{ matrix.llvm }}
122115
export SDKROOT="$(xcrun --show-sdk-path)"
123-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
116+
./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
124117
make all --jobs 4
125118
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
126119
127-
- name: Native Linux
120+
- name: Linux
128121
if: runner.os == 'Linux'
129122
run: |
130123
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
@@ -133,29 +126,30 @@ jobs:
133126
make all --jobs 4
134127
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
135128
136-
jit-with-disabled-gil:
137-
name: Free-Threaded (Debug)
138-
needs: interpreter
139-
runs-on: ubuntu-24.04
140-
timeout-minutes: 90
141-
strategy:
142-
fail-fast: false
143-
matrix:
144-
llvm:
145-
- 19
146-
steps:
147-
- uses: actions/checkout@v4
148-
with:
149-
persist-credentials: false
150-
- uses: actions/setup-python@v5
151-
with:
152-
python-version: '3.11'
153-
- name: Build with JIT enabled and GIL disabled
154-
run: |
155-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
156-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
157-
./configure --enable-experimental-jit --with-pydebug --disable-gil
158-
make all --jobs 4
159-
- name: Run tests
160-
run: |
161-
./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: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ 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"
1317
- "Tools/build/generate_sbom.py"
18+
- "Tools/build/generate-build-details.py"
19+
- "Tools/build/verify_ensurepip_wheels.py"
20+
- "Tools/build/update_file.py"
1421
- "Tools/cases_generator/**"
1522
- "Tools/clinic/**"
1623
- "Tools/jit/**"
1724
- "Tools/peg_generator/**"
1825
- "Tools/requirements-dev.txt"
19-
- "Tools/wasm/**"
2026
workflow_dispatch:
2127

2228
permissions:
@@ -42,12 +48,12 @@ jobs:
4248
target: [
4349
"Lib/_pyrepl",
4450
"Lib/test/libregrtest",
51+
"Lib/tomllib",
4552
"Tools/build",
4653
"Tools/cases_generator",
4754
"Tools/clinic",
4855
"Tools/jit",
4956
"Tools/peg_generator",
50-
"Tools/wasm",
5157
]
5258
steps:
5359
- uses: actions/checkout@v4
@@ -59,4 +65,5 @@ jobs:
5965
cache: pip
6066
cache-dependency-path: Tools/requirements-dev.txt
6167
- run: pip install -r Tools/requirements-dev.txt
68+
- run: python3 Misc/mypy/make_symlinks.py --symlink
6269
- run: mypy --config-file ${{ matrix.target }}/mypy.ini

.github/workflows/reusable-context.yml

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

101103
- name: Compute hash for config cache key
102104
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)