Skip to content

Commit 8a118a7

Browse files
committed
Merge branch 'main' into pythongh-116380
2 parents 4cf8a4d + 19e93e2 commit 8a118a7

File tree

1,570 files changed

+89264
-60605
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,570 files changed

+89264
-60605
lines changed

.devcontainer/Dockerfile

-24
This file was deleted.

.devcontainer/devcontainer.json

+1-3
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

-2
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

+15-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Makefile.pre.in @erlend-aasland
1717
Modules/Setup* @erlend-aasland
1818

1919
# asyncio
20-
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303 @willingc
20+
**/*asyncio* @1st1 @asvetlov @kumaraditya303 @willingc
2121

2222
# Core
2323
**/*context* @1st1
@@ -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,14 +207,14 @@ Doc/c-api/stable.rst @encukou
205207
**/*bisect* @rhettinger
206208
**/*heapq* @rhettinger
207209
**/*functools* @rhettinger
208-
**/*decimal* @rhettinger
209210

210211
**/*dataclasses* @ericvsmith
211212

212213
**/*ensurepip* @pfmoore @pradyunsg
213214

214-
**/*idlelib* @terryjreedy
215215
/Doc/library/idle.rst @terryjreedy
216+
**/*idlelib* @terryjreedy
217+
**/*turtledemo* @terryjreedy
216218

217219
**/*annotationlib* @JelleZijlstra
218220
**/*typing* @JelleZijlstra @AlexWaygood
@@ -275,3 +277,8 @@ Lib/test/test_interpreters/ @ericsnowcurrently
275277
# Config Parser
276278
Lib/configparser.py @jaraco
277279
Lib/test/test_configparser.py @jaraco
280+
281+
# Doc sections
282+
Doc/reference/ @willingc
283+
284+
**/*weakref* @kumaraditya303

.github/ISSUE_TEMPLATE/bug.yml

+1-1
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

+2-1
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

+53-15
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,50 @@ jobs:
4040
if: fromJSON(needs.check_source.outputs.run-docs)
4141
uses: ./.github/workflows/reusable-docs.yml
4242

43+
check_autoconf_regen:
44+
name: 'Check if Autoconf files are up to date'
45+
# Don't use ubuntu-latest but a specific version to make the job
46+
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
47+
runs-on: ubuntu-24.04
48+
container:
49+
image: ghcr.io/python/autoconf:2024.10.16.11360930377
50+
timeout-minutes: 60
51+
needs: check_source
52+
if: needs.check_source.outputs.run_tests == 'true'
53+
steps:
54+
- name: Install Git
55+
run: |
56+
apt install git -yq
57+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
58+
- uses: actions/checkout@v4
59+
with:
60+
fetch-depth: 1
61+
- name: Runner image version
62+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
63+
- name: Check Autoconf and aclocal versions
64+
run: |
65+
grep "Generated by GNU Autoconf 2.71" configure
66+
grep "aclocal 1.16.5" aclocal.m4
67+
grep -q "runstatedir" configure
68+
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
69+
- name: Regenerate autoconf files
70+
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
71+
run: autoreconf -ivf -Werror
72+
- name: Check for changes
73+
run: |
74+
git add -u
75+
changes=$(git status --porcelain)
76+
# Check for changes in regenerated files
77+
if test -n "$changes"; then
78+
echo "Generated files not up to date."
79+
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
80+
echo "configure files must be regenerated with a specific version of autoconf."
81+
echo "$changes"
82+
echo ""
83+
git diff --staged || true
84+
exit 1
85+
fi
86+
4387
check_generated_files:
4488
name: 'Check if generated files are up to date'
4589
# Don't use ubuntu-latest but a specific version to make the job
@@ -69,19 +113,10 @@ jobs:
69113
uses: hendrikmuhs/ccache-action@v1.2
70114
with:
71115
save: false
72-
- name: Check Autoconf and aclocal versions
73-
run: |
74-
grep "Generated by GNU Autoconf 2.71" configure
75-
grep "aclocal 1.16.5" aclocal.m4
76-
grep -q "runstatedir" configure
77-
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
78116
- name: Configure CPython
79117
run: |
80118
# Build Python with the libpython dynamic library
81119
./configure --config-cache --with-pydebug --enable-shared
82-
- name: Regenerate autoconf files
83-
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
84-
run: autoreconf -ivf -Werror
85120
- name: Build CPython
86121
run: |
87122
make -j4 regen-all
@@ -195,14 +230,15 @@ jobs:
195230

196231
build_ubuntu_ssltests:
197232
name: 'Ubuntu SSL tests with OpenSSL'
198-
runs-on: ubuntu-22.04
233+
runs-on: ${{ matrix.os }}
199234
timeout-minutes: 60
200235
needs: check_source
201236
if: needs.check_source.outputs.run_tests == 'true'
202237
strategy:
203238
fail-fast: false
204239
matrix:
205-
openssl_ver: [1.1.1w, 3.0.13, 3.1.5, 3.2.1]
240+
os: [ubuntu-22.04]
241+
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
206242
env:
207243
OPENSSL_VER: ${{ matrix.openssl_ver }}
208244
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -231,7 +267,7 @@ jobs:
231267
uses: actions/cache@v4
232268
with:
233269
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
234-
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
270+
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
235271
- name: Install OpenSSL
236272
if: steps.cache-openssl.outputs.cache-hit != 'true'
237273
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
@@ -266,7 +302,7 @@ jobs:
266302
needs: check_source
267303
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
268304
env:
269-
OPENSSL_VER: 3.0.13
305+
OPENSSL_VER: 3.0.15
270306
PYTHONSTRICTEXTENSIONBUILD: 1
271307
steps:
272308
- uses: actions/checkout@v4
@@ -380,7 +416,7 @@ jobs:
380416
needs: check_source
381417
if: needs.check_source.outputs.run_tests == 'true'
382418
env:
383-
OPENSSL_VER: 3.0.13
419+
OPENSSL_VER: 3.0.15
384420
PYTHONSTRICTEXTENSIONBUILD: 1
385421
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
386422
steps:
@@ -410,7 +446,7 @@ jobs:
410446
uses: actions/cache@v4
411447
with:
412448
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
413-
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
449+
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
414450
- name: Install OpenSSL
415451
if: steps.cache-openssl.outputs.cache-hit != 'true'
416452
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
@@ -500,6 +536,7 @@ jobs:
500536
needs:
501537
- check_source # Transitive dependency, needed to access `run_tests` value
502538
- check-docs
539+
- check_autoconf_regen
503540
- check_generated_files
504541
- build_macos
505542
- build_ubuntu
@@ -535,6 +572,7 @@ jobs:
535572
${{
536573
needs.check_source.outputs.run_tests != 'true'
537574
&& '
575+
check_autoconf_regen,
538576
check_generated_files,
539577
build_macos,
540578
build_ubuntu,

.github/workflows/jit.yml

+3-5
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

+1-1
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/posix-deps-apt.sh

-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
#!/bin/sh
22
apt-get update
33

4-
# autoconf-archive is needed by autoreconf (check_generated_files job)
54
apt-get -yq install \
65
build-essential \
76
pkg-config \
8-
autoconf-archive \
97
ccache \
108
gdb \
119
lcov \

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

+1-3
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

+6-3
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:
@@ -11,6 +11,9 @@ concurrency:
1111
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1212
cancel-in-progress: true
1313

14+
env:
15+
FORCE_COLOR: 1
16+
1417
jobs:
1518
build_doc:
1619
name: 'Docs'
@@ -81,7 +84,7 @@ jobs:
8184
- name: 'Set up Python'
8285
uses: actions/setup-python@v5
8386
with:
84-
python-version: '3.12' # known to work with Sphinx 6.2.1
87+
python-version: '3.13' # known to work with Sphinx 7.2.6
8588
cache: 'pip'
8689
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
8790
- name: 'Install build dependencies'
@@ -92,7 +95,7 @@ jobs:
9295
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
9396
doctest:
9497
name: 'Doctest'
95-
runs-on: ubuntu-latest
98+
runs-on: ubuntu-22.04
9699
timeout-minutes: 60
97100
steps:
98101
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)