Skip to content

Commit 41f7a12

Browse files
committed
Merge branch 'main' into incremental-gc-3
2 parents 4cde149 + 9b7f253 commit 41f7a12

File tree

1,383 files changed

+63313
-21838
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,383 files changed

+63313
-21838
lines changed

.cirrus-DISABLED.yml

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

.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,rst,md,yml}]
3+
[*.{py,c,cpp,h,js,rst,md,yml}]
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-
[*.yml]
14+
[*.{js,yml}]
1515
indent_size = 2

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Include/internal/pycore_opcode.h generated
7777
Include/internal/pycore_opcode_metadata.h generated
7878
Include/internal/pycore_*_generated.h generated
7979
Include/internal/pycore_uop_ids.h generated
80+
Include/internal/pycore_uop_metadata.h generated
8081
Include/opcode.h generated
8182
Include/opcode_ids.h generated
8283
Include/token.h generated
@@ -94,6 +95,7 @@ Programs/test_frozenmain.h generated
9495
Python/Python-ast.c generated
9596
Python/executor_cases.c.h generated
9697
Python/generated_cases.c.h generated
98+
Python/optimizer_cases.c.h generated
9799
Python/opcode_targets.h generated
98100
Python/stdlib_module_names.h generated
99101
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ configure* @erlend-aasland @corona10
2121
**/*context* @1st1
2222
**/*genobject* @markshannon
2323
**/*hamt* @1st1
24+
**/*jit* @brandtbucher
2425
Objects/set* @rhettinger
2526
Objects/dict* @methane @markshannon
2627
Objects/typevarobject.c @JelleZijlstra
@@ -36,12 +37,40 @@ Python/flowgraph.c @markshannon @iritkatriel
3637
Python/ast_opt.c @isidentical
3738
Python/bytecodes.c @markshannon @gvanrossum
3839
Python/optimizer*.c @markshannon @gvanrossum
40+
Python/optimizer_analysis.c @Fidget-Spinner
41+
Python/optimizer_bytecodes.c @Fidget-Spinner
3942
Lib/test/test_patma.py @brandtbucher
40-
Lib/test/test_peepholer.py @brandtbucher
4143
Lib/test/test_type_*.py @JelleZijlstra
4244
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum
4345
Tools/c-analyzer/ @ericsnowcurrently
4446

47+
# dbm
48+
**/*dbm* @corona10 @erlend-aasland @serhiy-storchaka
49+
50+
# runtime state/lifecycle
51+
**/*pylifecycle* @ericsnowcurrently
52+
**/*pystate* @ericsnowcurrently
53+
**/*preconfig* @ericsnowcurrently
54+
**/*initconfig* @ericsnowcurrently
55+
**/*pathconfig* @ericsnowcurrently
56+
**/*sysmodule* @ericsnowcurrently
57+
**/*bltinmodule* @ericsnowcurrently
58+
**/*gil* @ericsnowcurrently
59+
Include/internal/pycore_runtime.h @ericsnowcurrently
60+
Include/internal/pycore_interp.h @ericsnowcurrently
61+
Include/internal/pycore_tstate.h @ericsnowcurrently
62+
Include/internal/pycore_*_state.h @ericsnowcurrently
63+
Include/internal/pycore_*_init.h @ericsnowcurrently
64+
Include/internal/pycore_atexit.h @ericsnowcurrently
65+
Include/internal/pycore_freelist.h @ericsnowcurrently
66+
Include/internal/pycore_global_objects.h @ericsnowcurrently
67+
Include/internal/pycore_obmalloc.h @ericsnowcurrently
68+
Include/internal/pycore_pymem.h @ericsnowcurrently
69+
Modules/main.c @ericsnowcurrently
70+
Programs/_bootstrap_python.c @ericsnowcurrently
71+
Programs/python.c @ericsnowcurrently
72+
Tools/build/generate_global_objects.py @ericsnowcurrently
73+
4574
# Exceptions
4675
Lib/traceback.py @iritkatriel
4776
Lib/test/test_except*.py @iritkatriel
@@ -50,13 +79,13 @@ Objects/exceptions.c @iritkatriel
5079
Python/traceback.c @iritkatriel
5180

5281
# Hashing
53-
**/*hashlib* @tiran
54-
**/*pyhash* @tiran
55-
**/*sha* @tiran
56-
**/*md5* @tiran
57-
**/*blake* @tiran
58-
/Modules/_blake2/** @tiran
59-
/Modules/_sha3/** @tiran
82+
**/*hashlib* @gpshead @tiran
83+
**/*pyhash* @gpshead @tiran
84+
**/sha* @gpshead @tiran
85+
Modules/md5* @gpshead @tiran
86+
**/*blake* @gpshead @tiran
87+
Modules/_blake2/** @gpshead @tiran
88+
Modules/_hacl/** @gpshead
6089

6190
# logging
6291
**/*logging* @vsajip
@@ -76,7 +105,20 @@ Python/traceback.c @iritkatriel
76105
# Import (including importlib).
77106
**/*import* @brettcannon @ericsnowcurrently @ncoghlan @warsaw
78107
/Python/import.c @kumaraditya303
79-
**/*importlib/resources/* @jaraco @warsaw @FFY00
108+
Python/dynload_*.c @ericsnowcurrently
109+
**/*freeze* @ericsnowcurrently
110+
**/*frozen* @ericsnowcurrently
111+
**/*modsupport* @ericsnowcurrently
112+
**/*modulefinder* @ericsnowcurrently
113+
**/*moduleobject* @ericsnowcurrently
114+
**/*multiphase* @ericsnowcurrently
115+
**/*pkgutil* @ericsnowcurrently
116+
**/*pythonrun* @ericsnowcurrently
117+
**/*runpy* @ericsnowcurrently
118+
**/*singlephase* @ericsnowcurrently
119+
Lib/test/test_module/ @ericsnowcurrently
120+
Doc/c-api/module.rst @ericsnowcurrently
121+
**/*importlib/resources/* @jaraco @warsaw @FFY00
80122
**/importlib/metadata/* @jaraco @warsaw
81123

82124
# Dates and times
@@ -120,6 +162,9 @@ Lib/ast.py @isidentical
120162
/Lib/unittest/mock.py @cjw296
121163
/Lib/test/test_unittest/testmock/* @cjw296
122164

165+
# multiprocessing
166+
**/*multiprocessing* @gpshead
167+
123168
# SQLite 3
124169
**/*sqlite* @berkerpeksag @erlend-aasland
125170

@@ -187,11 +232,13 @@ Doc/c-api/stable.rst @encukou
187232
**/*zipfile/_path/* @jaraco
188233

189234
# Argument Clinic
190-
/Tools/clinic/** @erlend-aasland @AlexWaygood
191-
/Lib/test/test_clinic.py @erlend-aasland @AlexWaygood
235+
/Tools/clinic/** @erlend-aasland
236+
/Lib/test/test_clinic.py @erlend-aasland
192237
Doc/howto/clinic.rst @erlend-aasland
193238

194239
# Subinterpreters
240+
**/*interpreteridobject.* @ericsnowcurrently
241+
**/*crossinterp* @ericsnowcurrently
195242
Lib/test/support/interpreters/ @ericsnowcurrently
196243
Modules/_xx*interp*module.c @ericsnowcurrently
197244
Lib/test/test_interpreters/ @ericsnowcurrently
@@ -200,5 +247,10 @@ Lib/test/test_interpreters/ @ericsnowcurrently
200247
/Tools/wasm/ @brettcannon
201248

202249
# SBOM
250+
/Misc/externals.spdx.json @sethmlarson
203251
/Misc/sbom.spdx.json @sethmlarson
204252
/Tools/build/generate_sbom.py @sethmlarson
253+
254+
# Config Parser
255+
Lib/configparser.py @jaraco
256+
Lib/test/test_configparser.py @jaraco

.github/workflows/build.yml

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,21 @@ jobs:
131131
- uses: actions/setup-python@v5
132132
with:
133133
python-version: '3.x'
134+
- name: Runner image version
135+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
134136
- name: Restore config.cache
135-
uses: actions/cache@v3
137+
uses: actions/cache@v4
136138
with:
137139
path: config.cache
138-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
140+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
139141
- name: Install Dependencies
140142
run: sudo ./.github/workflows/posix-deps-apt.sh
141143
- name: Add ccache to PATH
142144
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
143145
- name: Configure ccache action
144146
uses: hendrikmuhs/[email protected]
147+
with:
148+
save: false
145149
- name: Check Autoconf and aclocal versions
146150
run: |
147151
grep "Generated by GNU Autoconf 2.71" configure
@@ -158,7 +162,7 @@ jobs:
158162
- name: Build CPython
159163
run: |
160164
make -j4 regen-all
161-
make regen-stdlib-module-names
165+
make regen-stdlib-module-names regen-sbom
162166
- name: Check for changes
163167
run: |
164168
git add -u
@@ -248,19 +252,21 @@ jobs:
248252
strategy:
249253
fail-fast: false
250254
matrix:
251-
openssl_ver: [1.1.1w, 3.0.11, 3.1.3]
255+
openssl_ver: [1.1.1w, 3.0.13, 3.1.5, 3.2.1]
252256
env:
253257
OPENSSL_VER: ${{ matrix.openssl_ver }}
254258
MULTISSL_DIR: ${{ github.workspace }}/multissl
255259
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
256260
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
257261
steps:
258262
- uses: actions/checkout@v4
263+
- name: Runner image version
264+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
259265
- name: Restore config.cache
260-
uses: actions/cache@v3
266+
uses: actions/cache@v4
261267
with:
262268
path: config.cache
263-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
269+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
264270
- name: Register gcc problem matcher
265271
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
266272
- name: Install Dependencies
@@ -272,7 +278,7 @@ jobs:
272278
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
273279
- name: 'Restore OpenSSL build'
274280
id: cache-openssl
275-
uses: actions/cache@v3
281+
uses: actions/cache@v4
276282
with:
277283
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
278284
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -284,6 +290,8 @@ jobs:
284290
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
285291
- name: Configure ccache action
286292
uses: hendrikmuhs/[email protected]
293+
with:
294+
save: false
287295
- name: Configure CPython
288296
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
289297
- name: Build CPython
@@ -300,7 +308,7 @@ jobs:
300308
needs: check_source
301309
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
302310
env:
303-
OPENSSL_VER: 3.0.11
311+
OPENSSL_VER: 3.0.13
304312
PYTHONSTRICTEXTENSIONBUILD: 1
305313
steps:
306314
- uses: actions/checkout@v4
@@ -315,7 +323,7 @@ jobs:
315323
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
316324
- name: 'Restore OpenSSL build'
317325
id: cache-openssl
318-
uses: actions/cache@v3
326+
uses: actions/cache@v4
319327
with:
320328
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
321329
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -327,6 +335,8 @@ jobs:
327335
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
328336
- name: Configure ccache action
329337
uses: hendrikmuhs/[email protected]
338+
with:
339+
save: false
330340
- name: Setup directory envs for out-of-tree builds
331341
run: |
332342
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -335,11 +345,13 @@ jobs:
335345
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
336346
- name: Bind mount sources read-only
337347
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
348+
- name: Runner image version
349+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
338350
- name: Restore config.cache
339-
uses: actions/cache@v3
351+
uses: actions/cache@v4
340352
with:
341353
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
342-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
354+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
343355
- name: Configure CPython out-of-tree
344356
working-directory: ${{ env.CPYTHON_BUILDDIR }}
345357
run: |
@@ -369,7 +381,7 @@ jobs:
369381
./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt
370382
- name: 'Restore Hypothesis database'
371383
id: cache-hypothesis-database
372-
uses: actions/cache@v3
384+
uses: actions/cache@v4
373385
with:
374386
path: ./hypothesis
375387
key: hypothesis-database-${{ github.head_ref || github.run_id }}
@@ -409,16 +421,18 @@ jobs:
409421
needs: check_source
410422
if: needs.check_source.outputs.run_tests == 'true'
411423
env:
412-
OPENSSL_VER: 3.0.11
424+
OPENSSL_VER: 3.0.13
413425
PYTHONSTRICTEXTENSIONBUILD: 1
414426
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
415427
steps:
416428
- uses: actions/checkout@v4
429+
- name: Runner image version
430+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
417431
- name: Restore config.cache
418-
uses: actions/cache@v3
432+
uses: actions/cache@v4
419433
with:
420434
path: config.cache
421-
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
435+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
422436
- name: Register gcc problem matcher
423437
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
424438
- name: Install Dependencies
@@ -434,7 +448,7 @@ jobs:
434448
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
435449
- name: 'Restore OpenSSL build'
436450
id: cache-openssl
437-
uses: actions/cache@v3
451+
uses: actions/cache@v4
438452
with:
439453
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
440454
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -446,6 +460,9 @@ jobs:
446460
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
447461
- name: Configure ccache action
448462
uses: hendrikmuhs/[email protected]
463+
with:
464+
save: ${{ github.event_name == 'push' }}
465+
max-size: "200M"
449466
- name: Configure CPython
450467
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
451468
- name: Build CPython

.github/workflows/build_msi.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
strategy:
3333
matrix:
3434
type: [x86, x64, arm64]
35+
env:
36+
IncludeFreethreaded: true
3537
steps:
3638
- uses: actions/checkout@v4
3739
- name: Build CPython installer

0 commit comments

Comments
 (0)