Skip to content

Commit c69dcd8

Browse files
authored
Merge branch 'main' into pythongh-103501
2 parents a3973f0 + ec23e90 commit c69dcd8

File tree

1,251 files changed

+60165
-40261
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,251 files changed

+60165
-40261
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV WASI_SDK_VERSION=20
66
ENV WASI_SDK_PATH=/opt/wasi-sdk
77

88
ENV WASMTIME_HOME=/opt/wasmtime
9-
ENV WASMTIME_VERSION=9.0.1
9+
ENV WASMTIME_VERSION=14.0.4
1010
ENV WASMTIME_CPU_ARCH=x86_64
1111

1212
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Include/internal/pycore_ast_state.h generated
7676
Include/internal/pycore_opcode.h generated
7777
Include/internal/pycore_opcode_metadata.h generated
7878
Include/internal/pycore_*_generated.h generated
79+
Include/internal/pycore_uop_ids.h generated
7980
Include/opcode.h generated
8081
Include/opcode_ids.h generated
8182
Include/token.h generated
@@ -84,6 +85,7 @@ Lib/keyword.py generated
8485
Lib/test/levenshtein_examples.json generated
8586
Lib/test/test_stable_abi_ctypes.py generated
8687
Lib/token.py generated
88+
Misc/sbom.spdx.json generated
8789
Objects/typeslots.inc generated
8890
PC/python3dll.c generated
8991
Parser/parser.c generated
@@ -92,7 +94,6 @@ Programs/test_frozenmain.h generated
9294
Python/Python-ast.c generated
9395
Python/executor_cases.c.h generated
9496
Python/generated_cases.c.h generated
95-
Python/abstract_interp_cases.c.h generated
9697
Python/opcode_targets.h generated
9798
Python/stdlib_module_names.h generated
9899
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,19 @@ Objects/type* @markshannon
2828
Objects/codeobject.c @markshannon
2929
Objects/frameobject.c @markshannon
3030
Objects/call.c @markshannon
31-
Python/ceval.c @markshannon
31+
Python/ceval*.c @markshannon @gvanrossum
32+
Python/ceval*.h @markshannon @gvanrossum
3233
Python/compile.c @markshannon @iritkatriel
3334
Python/assemble.c @markshannon @iritkatriel
3435
Python/flowgraph.c @markshannon @iritkatriel
3536
Python/ast_opt.c @isidentical
37+
Python/bytecodes.c @markshannon @gvanrossum
38+
Python/optimizer*.c @markshannon @gvanrossum
3639
Lib/test/test_patma.py @brandtbucher
3740
Lib/test/test_peepholer.py @brandtbucher
3841
Lib/test/test_type_*.py @JelleZijlstra
42+
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum
43+
Tools/c-analyzer/ @ericsnowcurrently
3944

4045
# Exceptions
4146
Lib/traceback.py @iritkatriel
@@ -102,6 +107,9 @@ Include/internal/pycore_time.h @pganssle @abalkin
102107
/Lib/tokenize.py @pablogsal @lysnikolaou
103108
/Lib/test/test_tokenize.py @pablogsal @lysnikolaou
104109

110+
# Code generator
111+
/Tools/cases_generator/ @gvanrossum
112+
105113
# AST
106114
Python/ast.c @isidentical
107115
Parser/asdl.py @isidentical
@@ -149,9 +157,11 @@ Doc/c-api/stable.rst @encukou
149157

150158
**/*dataclasses* @ericvsmith
151159

160+
**/*ensurepip* @pfmoore @pradyunsg
161+
152162
**/*idlelib* @terryjreedy
153163

154-
**/*typing* @gvanrossum @JelleZijlstra @AlexWaygood
164+
**/*typing* @JelleZijlstra @AlexWaygood
155165

156166
**/*ftplib @giampaolo
157167
**/*shutil @giampaolo
@@ -181,5 +191,14 @@ Doc/c-api/stable.rst @encukou
181191
/Lib/test/test_clinic.py @erlend-aasland @AlexWaygood
182192
Doc/howto/clinic.rst @erlend-aasland
183193

194+
# Subinterpreters
195+
Lib/test/support/interpreters/ @ericsnowcurrently
196+
Modules/_xx*interp*module.c @ericsnowcurrently
197+
Lib/test/test_interpreters/ @ericsnowcurrently
198+
184199
# WebAssembly
185200
/Tools/wasm/ @brettcannon
201+
202+
# SBOM
203+
/Misc/sbom.spdx.json @sethmlarson
204+
/Tools/build/generate_sbom.py @sethmlarson

.github/workflows/add-issue-header.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
permissions:
2020
issues: write
2121
steps:
22-
- uses: actions/github-script@v6
22+
- uses: actions/github-script@v7
2323
with:
2424
# language=JavaScript
2525
script: |

.github/workflows/build.yml

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,15 @@ jobs:
120120

121121
check_generated_files:
122122
name: 'Check if generated files are up to date'
123-
runs-on: ubuntu-latest
123+
# Don't use ubuntu-latest but a specific version to make the job
124+
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
125+
runs-on: ubuntu-22.04
124126
timeout-minutes: 60
125127
needs: check_source
126128
if: needs.check_source.outputs.run_tests == 'true'
127129
steps:
128130
- uses: actions/checkout@v4
129-
- uses: actions/setup-python@v4
131+
- uses: actions/setup-python@v5
130132
with:
131133
python-version: '3.x'
132134
- name: Restore config.cache
@@ -140,18 +142,21 @@ jobs:
140142
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
141143
- name: Configure ccache action
142144
uses: hendrikmuhs/[email protected]
145+
with:
146+
save: ${{ github.event_name == 'push' }}
143147
- name: Check Autoconf and aclocal versions
144148
run: |
145149
grep "Generated by GNU Autoconf 2.71" configure
146-
grep "aclocal 1.16.4" aclocal.m4
150+
grep "aclocal 1.16.5" aclocal.m4
147151
grep -q "runstatedir" configure
148152
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
149153
- name: Configure CPython
150154
run: |
151155
# Build Python with the libpython dynamic library
152156
./configure --config-cache --with-pydebug --enable-shared
153-
- name: Regenerate autoconf files with container image
154-
run: make regen-configure
157+
- name: Regenerate autoconf files
158+
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
159+
run: autoreconf -ivf -Werror
155160
- name: Build CPython
156161
run: |
157162
make -j4 regen-all
@@ -184,13 +189,13 @@ jobs:
184189
if: needs.check_source.outputs.run_tests == 'true'
185190
uses: ./.github/workflows/reusable-windows.yml
186191

187-
build_windows_free_threaded:
188-
name: 'Windows (free-threaded)'
192+
build_windows_free_threading:
193+
name: 'Windows (free-threading)'
189194
needs: check_source
190-
if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
195+
if: needs.check_source.outputs.run_tests == 'true'
191196
uses: ./.github/workflows/reusable-windows.yml
192197
with:
193-
free-threaded: true
198+
free-threading: true
194199

195200
build_macos:
196201
name: 'macOS'
@@ -200,14 +205,14 @@ jobs:
200205
with:
201206
config_hash: ${{ needs.check_source.outputs.config_hash }}
202207

203-
build_macos_free_threaded:
204-
name: 'macOS (free-threaded)'
208+
build_macos_free_threading:
209+
name: 'macOS (free-threading)'
205210
needs: check_source
206-
if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
211+
if: needs.check_source.outputs.run_tests == 'true'
207212
uses: ./.github/workflows/reusable-macos.yml
208213
with:
209214
config_hash: ${{ needs.check_source.outputs.config_hash }}
210-
free-threaded: true
215+
free-threading: true
211216

212217
build_ubuntu:
213218
name: 'Ubuntu'
@@ -222,10 +227,10 @@ jobs:
222227
--with-pydebug \
223228
--with-openssl=$OPENSSL_DIR
224229
225-
build_ubuntu_free_threaded:
226-
name: 'Ubuntu (free-threaded)'
230+
build_ubuntu_free_threading:
231+
name: 'Ubuntu (free-threading)'
227232
needs: check_source
228-
if: needs.check_source.outputs.run_tests == 'true' && contains(github.event.pull_request.labels.*.name, 'topic-free-threaded')
233+
if: needs.check_source.outputs.run_tests == 'true'
229234
uses: ./.github/workflows/reusable-ubuntu.yml
230235
with:
231236
config_hash: ${{ needs.check_source.outputs.config_hash }}
@@ -281,6 +286,8 @@ jobs:
281286
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
282287
- name: Configure ccache action
283288
uses: hendrikmuhs/[email protected]
289+
with:
290+
save: ${{ github.event_name == 'push' }}
284291
- name: Configure CPython
285292
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
286293
- name: Build CPython
@@ -324,6 +331,8 @@ jobs:
324331
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
325332
- name: Configure ccache action
326333
uses: hendrikmuhs/[email protected]
334+
with:
335+
save: ${{ github.event_name == 'push' }}
327336
- name: Setup directory envs for out-of-tree builds
328337
run: |
329338
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -392,7 +401,7 @@ jobs:
392401
-x test_subprocess \
393402
-x test_signal \
394403
-x test_sysconfig
395-
- uses: actions/upload-artifact@v3
404+
- uses: actions/upload-artifact@v4
396405
if: always()
397406
with:
398407
name: hypothesis-example-db
@@ -443,6 +452,8 @@ jobs:
443452
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
444453
- name: Configure ccache action
445454
uses: hendrikmuhs/[email protected]
455+
with:
456+
save: ${{ github.event_name == 'push' }}
446457
- name: Configure CPython
447458
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
448459
- name: Build CPython
@@ -480,14 +491,14 @@ jobs:
480491
output-sarif: true
481492
sanitizer: ${{ matrix.sanitizer }}
482493
- name: Upload crash
483-
uses: actions/upload-artifact@v3
494+
uses: actions/upload-artifact@v4
484495
if: failure() && steps.build.outcome == 'success'
485496
with:
486497
name: ${{ matrix.sanitizer }}-artifacts
487498
path: ./out/artifacts
488499
- name: Upload SARIF
489500
if: always() && steps.build.outcome == 'success'
490-
uses: github/codeql-action/upload-sarif@v2
501+
uses: github/codeql-action/upload-sarif@v3
491502
with:
492503
sarif_file: cifuzz-sarif/results.sarif
493504
checkout_path: cifuzz-sarif
@@ -501,12 +512,12 @@ jobs:
501512
- check-docs
502513
- check_generated_files
503514
- build_macos
504-
- build_macos_free_threaded
515+
- build_macos_free_threading
505516
- build_ubuntu
506-
- build_ubuntu_free_threaded
517+
- build_ubuntu_free_threading
507518
- build_ubuntu_ssltests
508519
- build_windows
509-
- build_windows_free_threaded
520+
- build_windows_free_threading
510521
- test_hypothesis
511522
- build_asan
512523
- cifuzz
@@ -518,10 +529,7 @@ jobs:
518529
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
519530
with:
520531
allowed-failures: >-
521-
build_macos_free_threaded,
522-
build_ubuntu_free_threaded,
523532
build_ubuntu_ssltests,
524-
build_windows_free_threaded,
525533
cifuzz,
526534
test_hypothesis,
527535
allowed-skips: >-
@@ -537,12 +545,12 @@ jobs:
537545
&& '
538546
check_generated_files,
539547
build_macos,
540-
build_macos_free_threaded,
548+
build_macos_free_threading,
541549
build_ubuntu,
542-
build_ubuntu_free_threaded,
550+
build_ubuntu_free_threading,
543551
build_ubuntu_ssltests,
544552
build_windows,
545-
build_windows_free_threaded,
553+
build_windows_free_threading,
546554
build_asan,
547555
'
548556
|| ''

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23-
- uses: actions/setup-python@v4
23+
- uses: actions/setup-python@v5
2424
with:
2525
python-version: "3.x"
2626
- uses: pre-commit/[email protected]

.github/workflows/mypy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
pull_request:
99
paths:
1010
- ".github/workflows/mypy.yml"
11+
- "Lib/test/libregrtest/**"
12+
- "Tools/build/generate_sbom.py"
1113
- "Tools/cases_generator/**"
1214
- "Tools/clinic/**"
1315
- "Tools/peg_generator/**"
@@ -32,6 +34,8 @@ jobs:
3234
strategy:
3335
matrix:
3436
target: [
37+
"Lib/test/libregrtest",
38+
"Tools/build/",
3539
"Tools/cases_generator",
3640
"Tools/clinic",
3741
"Tools/peg_generator",
@@ -42,7 +46,7 @@ jobs:
4246
timeout-minutes: 10
4347
steps:
4448
- uses: actions/checkout@v4
45-
- uses: actions/setup-python@v4
49+
- uses: actions/setup-python@v5
4650
with:
4751
python-version: "3.11"
4852
cache: pip

.github/workflows/new-bugs-announce-notifier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
node-version: 20
1919
- run: npm install mailgun.js form-data
2020
- name: Send notification
21-
uses: actions/github-script@v6
21+
uses: actions/github-script@v7
2222
env:
2323
MAILGUN_API_KEY: ${{ secrets.MAILGUN_PYTHON_ORG_MAILGUN_KEY }}
2424
with:

.github/workflows/posix-deps-apt.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#!/bin/sh
22
apt-get update
33

4+
# autoconf-archive is needed by autoreconf (check_generated_files job)
45
apt-get -yq install \
56
build-essential \
67
pkg-config \
8+
autoconf-archive \
79
ccache \
810
gdb \
911
lcov \
@@ -19,6 +21,7 @@ apt-get -yq install \
1921
libssl-dev \
2022
lzma \
2123
lzma-dev \
24+
strace \
2225
tk-dev \
2326
uuid-dev \
2427
xvfb \

.github/workflows/reusable-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
git fetch origin ${{ env.refspec_base }} --shallow-since="${DATE}" \
4242
--no-tags --prune --no-recurse-submodules
4343
- name: 'Set up Python'
44-
uses: actions/setup-python@v4
44+
uses: actions/setup-python@v5
4545
with:
4646
python-version: '3'
4747
cache: 'pip'
@@ -72,7 +72,7 @@ jobs:
7272
steps:
7373
- uses: actions/checkout@v4
7474
- name: 'Set up Python'
75-
uses: actions/setup-python@v4
75+
uses: actions/setup-python@v5
7676
with:
7777
python-version: '3.11' # known to work with Sphinx 4.2
7878
cache: 'pip'

.github/workflows/reusable-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
config_hash:
55
required: true
66
type: string
7-
free-threaded:
7+
free-threading:
88
required: false
99
type: boolean
1010
default: false
@@ -35,7 +35,7 @@ jobs:
3535
./configure \
3636
--config-cache \
3737
--with-pydebug \
38-
${{ inputs.free-threaded && '--disable-gil' || '' }} \
38+
${{ inputs.free-threading && '--disable-gil' || '' }} \
3939
--prefix=/opt/python-dev \
4040
--with-openssl="$(brew --prefix [email protected])"
4141
- name: Build CPython

0 commit comments

Comments
 (0)