Skip to content

Commit afbaf04

Browse files
authored
Merge branch 'main' into _gh114940
2 parents 9cb2de0 + dbcc5ac commit afbaf04

File tree

1,320 files changed

+75730
-56215
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,320 files changed

+75730
-56215
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 24 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"build": {
3-
"dockerfile": "Dockerfile"
4-
},
2+
"image": "ghcr.io/python/devcontainer:2024.09.25.11038928730",
53
"onCreateCommand": [
64
// Install common tooling.
75
"dnf",

.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ Lib/test/cjkencodings/* noeol
2727
Lib/test/tokenizedata/coding20731.py noeol
2828
Lib/test/decimaltestdata/*.decTest noeol
2929
Lib/test/test_email/data/*.txt noeol
30-
Lib/test/test_importlib/resources/data01/* noeol
31-
Lib/test/test_importlib/resources/namespacedata01/* noeol
3230
Lib/test/xmltestdata/* noeol
3331

3432
# Shell scripts should have LF even on Windows because of Cygwin

.github/CODEOWNERS

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ Objects/frameobject.c @markshannon
3333
Objects/call.c @markshannon
3434
Python/ceval*.c @markshannon
3535
Python/ceval*.h @markshannon
36+
Python/codegen.c @markshannon @iritkatriel
3637
Python/compile.c @markshannon @iritkatriel
3738
Python/assemble.c @markshannon @iritkatriel
3839
Python/flowgraph.c @markshannon @iritkatriel
3940
Python/instruction_sequence.c @iritkatriel
40-
Python/ast_opt.c @isidentical
4141
Python/bytecodes.c @markshannon
4242
Python/optimizer*.c @markshannon
4343
Python/optimizer_analysis.c @Fidget-Spinner
@@ -157,10 +157,12 @@ Include/internal/pycore_time.h @pganssle @abalkin
157157
/Tools/cases_generator/ @markshannon
158158

159159
# AST
160-
Python/ast.c @isidentical @JelleZijlstra
161-
Parser/asdl.py @isidentical @JelleZijlstra
162-
Parser/asdl_c.py @isidentical @JelleZijlstra
163-
Lib/ast.py @isidentical @JelleZijlstra
160+
Python/ast.c @isidentical @JelleZijlstra @eclips4
161+
Python/ast_opt.c @isidentical @eclips4
162+
Parser/asdl.py @isidentical @JelleZijlstra @eclips4
163+
Parser/asdl_c.py @isidentical @JelleZijlstra @eclips4
164+
Lib/ast.py @isidentical @JelleZijlstra @eclips4
165+
Lib/test/test_ast/ @eclips4
164166

165167
# Mock
166168
/Lib/unittest/mock.py @cjw296
@@ -205,7 +207,6 @@ Doc/c-api/stable.rst @encukou
205207
**/*bisect* @rhettinger
206208
**/*heapq* @rhettinger
207209
**/*functools* @rhettinger
208-
**/*decimal* @rhettinger
209210

210211
**/*dataclasses* @ericvsmith
211212

@@ -276,3 +277,8 @@ Lib/test/test_interpreters/ @ericsnowcurrently
276277
# Config Parser
277278
Lib/configparser.py @jaraco
278279
Lib/test/test_configparser.py @jaraco
280+
281+
# Doc sections
282+
Doc/reference/ @willingc
283+
284+
**/*weakref* @kumaraditya303

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ body:
3434
label: "CPython versions tested on:"
3535
multiple: true
3636
options:
37-
- "3.8"
3837
- "3.9"
3938
- "3.10"
4039
- "3.11"
4140
- "3.12"
4241
- "3.13"
42+
- "3.14"
4343
- "CPython main branch"
4444
validations:
4545
required: true

.github/ISSUE_TEMPLATE/crash.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ body:
2727
label: "CPython versions tested on:"
2828
multiple: true
2929
options:
30-
- "3.8"
3130
- "3.9"
3231
- "3.10"
3332
- "3.11"
3433
- "3.12"
34+
- "3.13"
35+
- "3.14"
3536
- "CPython main branch"
3637
validations:
3738
required: true

.github/workflows/build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,15 @@ jobs:
195195

196196
build_ubuntu_ssltests:
197197
name: 'Ubuntu SSL tests with OpenSSL'
198-
runs-on: ubuntu-22.04
198+
runs-on: ${{ matrix.os }}
199199
timeout-minutes: 60
200200
needs: check_source
201201
if: needs.check_source.outputs.run_tests == 'true'
202202
strategy:
203203
fail-fast: false
204204
matrix:
205-
openssl_ver: [1.1.1w, 3.0.13, 3.1.5, 3.2.1]
205+
os: [ubuntu-22.04]
206+
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
206207
env:
207208
OPENSSL_VER: ${{ matrix.openssl_ver }}
208209
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -231,7 +232,7 @@ jobs:
231232
uses: actions/cache@v4
232233
with:
233234
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
234-
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
235+
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
235236
- name: Install OpenSSL
236237
if: steps.cache-openssl.outputs.cache-hit != 'true'
237238
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
@@ -266,7 +267,7 @@ jobs:
266267
needs: check_source
267268
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
268269
env:
269-
OPENSSL_VER: 3.0.13
270+
OPENSSL_VER: 3.0.15
270271
PYTHONSTRICTEXTENSIONBUILD: 1
271272
steps:
272273
- uses: actions/checkout@v4
@@ -380,7 +381,7 @@ jobs:
380381
needs: check_source
381382
if: needs.check_source.outputs.run_tests == 'true'
382383
env:
383-
OPENSSL_VER: 3.0.13
384+
OPENSSL_VER: 3.0.15
384385
PYTHONSTRICTEXTENSIONBUILD: 1
385386
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
386387
steps:
@@ -410,7 +411,7 @@ jobs:
410411
uses: actions/cache@v4
411412
with:
412413
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
413-
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
414+
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
414415
- name: Install OpenSSL
415416
if: steps.cache-openssl.outputs.cache-hit != 'true'
416417
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux

.github/workflows/jit.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,15 @@ jobs:
110110
- name: Native Windows
111111
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
112112
run: |
113-
choco upgrade llvm -y
114-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
113+
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
115114
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
116115
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
117116
118117
# No PGO or tests (yet):
119118
- name: Emulated Windows
120119
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
121120
run: |
122-
choco upgrade llvm -y
123-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
121+
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
124122
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
125123
126124
- name: Native macOS
@@ -159,7 +157,7 @@ jobs:
159157
CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
160158
CPP="$CC --preprocess" \
161159
HOSTRUNNER=qemu-${{ matrix.architecture }} \
162-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
160+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--with-lto' }} --build=x86_64-linux-gnu --host="$HOST" --with-build-python=../build/bin/python3 --with-pkg-config=no ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptc=no ac_cv_file__dev_ptmx=yes
163161
make all --jobs 4
164162
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
165163

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- uses: actions/checkout@v4
5454
- uses: actions/setup-python@v5
5555
with:
56-
python-version: "3.11"
56+
python-version: "3.13"
5757
cache: pip
5858
cache-dependency-path: Tools/requirements-dev.txt
5959
- run: pip install -r Tools/requirements-dev.txt

.github/workflows/reusable-change-detection.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
2-
3-
name: Change detection
1+
name: Reusable change detection
42

53
on: # yamllint disable-line rule:truthy
64
workflow_call:

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docs
1+
name: Reusable Docs
22

33
on:
44
workflow_call:
@@ -95,7 +95,7 @@ jobs:
9595
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
9696
doctest:
9797
name: 'Doctest'
98-
runs-on: ubuntu-latest
98+
runs-on: ubuntu-22.04
9999
timeout-minutes: 60
100100
steps:
101101
- uses: actions/checkout@v4

.github/workflows/reusable-macos.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable macOS
2+
13
on:
24
workflow_call:
35
inputs:
@@ -35,7 +37,7 @@ jobs:
3537
path: config.cache
3638
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
3739
- name: Install Homebrew dependencies
38-
run: brew install pkg-config [email protected] xz gdbm tcl-tk
40+
run: brew install pkg-config [email protected] xz gdbm tcl-tk make
3941
- name: Configure CPython
4042
run: |
4143
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
@@ -44,14 +46,27 @@ jobs:
4446
--config-cache \
4547
--with-pydebug \
4648
--enable-slower-safety \
49+
--enable-safety \
4750
${{ inputs.free-threading && '--disable-gil' || '' }} \
4851
--prefix=/opt/python-dev \
4952
--with-openssl="$(brew --prefix [email protected])"
5053
- name: Build CPython
51-
run: set -o pipefail; make -j8 2>&1 | tee compiler_output.txt
54+
if : ${{ inputs.free-threading || inputs.os != 'macos-13' }}
55+
run: gmake -j8
56+
- name: Build CPython for compiler warning check
57+
if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }}
58+
run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt
5259
- name: Display build info
5360
run: make pythoninfo
5461
- name: Check compiler warnings
55-
run: python3 Tools/build/check_warnings.py --compiler-output-file-path=compiler_output.txt --warning-ignore-file-path=Tools/build/.warningignore_macos --compiler-output-type=clang
62+
if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }}
63+
run: >-
64+
python3 Tools/build/check_warnings.py
65+
--compiler-output-file-path=compiler_output_macos.txt
66+
--warning-ignore-file-path=Tools/build/.warningignore_macos
67+
--compiler-output-type=clang
68+
--fail-on-regression
69+
--fail-on-improvement
70+
--path-prefix="./"
5671
- name: Tests
5772
run: make test

.github/workflows/reusable-tsan.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Thread Sanitizer
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-ubuntu.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Ubuntu
2+
13
on:
24
workflow_call:
35
inputs:
@@ -14,10 +16,14 @@ jobs:
1416
build_ubuntu_reusable:
1517
name: 'build and test'
1618
timeout-minutes: 60
17-
runs-on: ubuntu-22.04
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: [ubuntu-22.04]
1824
env:
1925
FORCE_COLOR: 1
20-
OPENSSL_VER: 3.0.13
26+
OPENSSL_VER: 3.0.15
2127
PYTHONSTRICTEXTENSIONBUILD: 1
2228
TERM: linux
2329
steps:
@@ -36,7 +42,7 @@ jobs:
3642
uses: actions/cache@v4
3743
with:
3844
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
39-
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
45+
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
4046
- name: Install OpenSSL
4147
if: steps.cache-openssl.outputs.cache-hit != 'true'
4248
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
@@ -67,20 +73,33 @@ jobs:
6773
working-directory: ${{ env.CPYTHON_BUILDDIR }}
6874
run: >-
6975
../cpython-ro-srcdir/configure
70-
CFLAGS="-fdiagnostics-format=json"
7176
--config-cache
7277
--with-pydebug
7378
--enable-slower-safety
79+
--enable-safety
7480
--with-openssl=$OPENSSL_DIR
7581
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
7682
- name: Build CPython out-of-tree
83+
if: ${{ inputs.free-threading }}
84+
working-directory: ${{ env.CPYTHON_BUILDDIR }}
85+
run: make -j4
86+
- name: Build CPython out-of-tree (for compiler warning check)
87+
if: ${{ !inputs.free-threading}}
7788
working-directory: ${{ env.CPYTHON_BUILDDIR }}
78-
run: set -o pipefail; make -j4 2>&1 | tee compiler_output.txt
89+
run: set -o pipefail; make -j4 --output-sync 2>&1 | tee compiler_output_ubuntu.txt
7990
- name: Display build info
8091
working-directory: ${{ env.CPYTHON_BUILDDIR }}
8192
run: make pythoninfo
8293
- name: Check compiler warnings
83-
run: python Tools/build/check_warnings.py --compiler-output-file-path=${{ env.CPYTHON_BUILDDIR }}/compiler_output.txt --warning-ignore-file-path ${GITHUB_WORKSPACE}/Tools/build/.warningignore_ubuntu --compiler-output-type=json
94+
if: ${{ !inputs.free-threading }}
95+
run: >-
96+
python Tools/build/check_warnings.py
97+
--compiler-output-file-path=${{ env.CPYTHON_BUILDDIR }}/compiler_output_ubuntu.txt
98+
--warning-ignore-file-path ${GITHUB_WORKSPACE}/Tools/build/.warningignore_ubuntu
99+
--compiler-output-type=gcc
100+
--fail-on-regression
101+
--fail-on-improvement
102+
--path-prefix="../cpython-ro-srcdir/"
84103
- name: Remount sources writable for tests
85104
# some tests write to srcdir, lack of pyc files slows down testing
86105
run: sudo mount $CPYTHON_RO_SRCDIR -oremount,rw

.github/workflows/reusable-wasi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable WASI
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/reusable-windows-msi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: TestsMSI
1+
name: Reusable Windows MSI
22

33
on:
44
workflow_call:

.github/workflows/reusable-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Reusable Windows
2+
13
on:
24
workflow_call:
35
inputs:

0 commit comments

Comments
 (0)