Skip to content

Commit 60ccabb

Browse files
Merge branch 'pythongh-112898-double-dialog' of github.com:ronaldoussoren/cpython into pythongh-112898-double-dialog
2 parents bf6f348 + 7ccc8fa commit 60ccabb

File tree

952 files changed

+25350
-9139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

952 files changed

+25350
-9139
lines changed

.cirrus-DISABLED.yml

-29
This file was deleted.

.github/CODEOWNERS

+56-11
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
@@ -37,11 +38,37 @@ Python/ast_opt.c @isidentical
3738
Python/bytecodes.c @markshannon @gvanrossum
3839
Python/optimizer*.c @markshannon @gvanrossum
3940
Lib/test/test_patma.py @brandtbucher
40-
Lib/test/test_peepholer.py @brandtbucher
4141
Lib/test/test_type_*.py @JelleZijlstra
4242
Lib/test/test_capi/test_misc.py @markshannon @gvanrossum
4343
Tools/c-analyzer/ @ericsnowcurrently
4444

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

5279
# Hashing
53-
**/*hashlib* @tiran
54-
**/*pyhash* @tiran
55-
**/*sha* @tiran
56-
**/*md5* @tiran
57-
**/*blake* @tiran
58-
/Modules/_blake2/** @tiran
59-
/Modules/_sha3/** @tiran
80+
**/*hashlib* @gpshead @tiran
81+
**/*pyhash* @gpshead @tiran
82+
**/sha* @gpshead @tiran
83+
Modules/md5* @gpshead @tiran
84+
**/*blake* @gpshead @tiran
85+
Modules/_blake2/** @gpshead @tiran
86+
Modules/_hacl/** @gpshead
6087

6188
# logging
6289
**/*logging* @vsajip
@@ -76,7 +103,20 @@ Python/traceback.c @iritkatriel
76103
# Import (including importlib).
77104
**/*import* @brettcannon @ericsnowcurrently @ncoghlan @warsaw
78105
/Python/import.c @kumaraditya303
79-
**/*importlib/resources/* @jaraco @warsaw @FFY00
106+
Python/dynload_*.c @ericsnowcurrently
107+
**/*freeze* @ericsnowcurrently
108+
**/*frozen* @ericsnowcurrently
109+
**/*modsupport* @ericsnowcurrently
110+
**/*modulefinder* @ericsnowcurrently
111+
**/*moduleobject* @ericsnowcurrently
112+
**/*multiphase* @ericsnowcurrently
113+
**/*pkgutil* @ericsnowcurrently
114+
**/*pythonrun* @ericsnowcurrently
115+
**/*runpy* @ericsnowcurrently
116+
**/*singlephase* @ericsnowcurrently
117+
Lib/test/test_module/ @ericsnowcurrently
118+
Doc/c-api/module.rst @ericsnowcurrently
119+
**/*importlib/resources/* @jaraco @warsaw @FFY00
80120
**/importlib/metadata/* @jaraco @warsaw
81121

82122
# Dates and times
@@ -120,6 +160,9 @@ Lib/ast.py @isidentical
120160
/Lib/unittest/mock.py @cjw296
121161
/Lib/test/test_unittest/testmock/* @cjw296
122162

163+
# multiprocessing
164+
**/*multiprocessing* @gpshead
165+
123166
# SQLite 3
124167
**/*sqlite* @berkerpeksag @erlend-aasland
125168

@@ -187,11 +230,13 @@ Doc/c-api/stable.rst @encukou
187230
**/*zipfile/_path/* @jaraco
188231

189232
# Argument Clinic
190-
/Tools/clinic/** @erlend-aasland @AlexWaygood
191-
/Lib/test/test_clinic.py @erlend-aasland @AlexWaygood
233+
/Tools/clinic/** @erlend-aasland
234+
/Lib/test/test_clinic.py @erlend-aasland
192235
Doc/howto/clinic.rst @erlend-aasland
193236

194237
# Subinterpreters
238+
**/*interpreteridobject.* @ericsnowcurrently
239+
**/*crossinterp* @ericsnowcurrently
195240
Lib/test/support/interpreters/ @ericsnowcurrently
196241
Modules/_xx*interp*module.c @ericsnowcurrently
197242
Lib/test/test_interpreters/ @ericsnowcurrently

.github/workflows/build.yml

+17-8
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
with:
133133
python-version: '3.x'
134134
- name: Restore config.cache
135-
uses: actions/cache@v3
135+
uses: actions/cache@v4
136136
with:
137137
path: config.cache
138138
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
@@ -142,6 +142,8 @@ jobs:
142142
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
143143
- name: Configure ccache action
144144
uses: hendrikmuhs/ccache-action@v1.2
145+
with:
146+
save: false
145147
- name: Check Autoconf and aclocal versions
146148
run: |
147149
grep "Generated by GNU Autoconf 2.71" configure
@@ -257,7 +259,7 @@ jobs:
257259
steps:
258260
- uses: actions/checkout@v4
259261
- name: Restore config.cache
260-
uses: actions/cache@v3
262+
uses: actions/cache@v4
261263
with:
262264
path: config.cache
263265
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
@@ -272,7 +274,7 @@ jobs:
272274
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
273275
- name: 'Restore OpenSSL build'
274276
id: cache-openssl
275-
uses: actions/cache@v3
277+
uses: actions/cache@v4
276278
with:
277279
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
278280
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -284,6 +286,8 @@ jobs:
284286
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
285287
- name: Configure ccache action
286288
uses: hendrikmuhs/ccache-action@v1.2
289+
with:
290+
save: false
287291
- name: Configure CPython
288292
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
289293
- name: Build CPython
@@ -315,7 +319,7 @@ jobs:
315319
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
316320
- name: 'Restore OpenSSL build'
317321
id: cache-openssl
318-
uses: actions/cache@v3
322+
uses: actions/cache@v4
319323
with:
320324
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
321325
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -327,6 +331,8 @@ jobs:
327331
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
328332
- name: Configure ccache action
329333
uses: hendrikmuhs/ccache-action@v1.2
334+
with:
335+
save: false
330336
- name: Setup directory envs for out-of-tree builds
331337
run: |
332338
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -336,7 +342,7 @@ jobs:
336342
- name: Bind mount sources read-only
337343
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
338344
- name: Restore config.cache
339-
uses: actions/cache@v3
345+
uses: actions/cache@v4
340346
with:
341347
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
342348
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
@@ -369,7 +375,7 @@ jobs:
369375
./python -m venv $VENV_LOC && $VENV_PYTHON -m pip install -r ${GITHUB_WORKSPACE}/Tools/requirements-hypothesis.txt
370376
- name: 'Restore Hypothesis database'
371377
id: cache-hypothesis-database
372-
uses: actions/cache@v3
378+
uses: actions/cache@v4
373379
with:
374380
path: ./hypothesis
375381
key: hypothesis-database-${{ github.head_ref || github.run_id }}
@@ -415,7 +421,7 @@ jobs:
415421
steps:
416422
- uses: actions/checkout@v4
417423
- name: Restore config.cache
418-
uses: actions/cache@v3
424+
uses: actions/cache@v4
419425
with:
420426
path: config.cache
421427
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
@@ -434,7 +440,7 @@ jobs:
434440
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
435441
- name: 'Restore OpenSSL build'
436442
id: cache-openssl
437-
uses: actions/cache@v3
443+
uses: actions/cache@v4
438444
with:
439445
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
440446
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -446,6 +452,9 @@ jobs:
446452
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
447453
- name: Configure ccache action
448454
uses: hendrikmuhs/ccache-action@v1.2
455+
with:
456+
save: ${{ github.event_name == 'push' }}
457+
max-size: "200M"
449458
- name: Configure CPython
450459
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
451460
- name: Build CPython

.github/workflows/build_msi.yml

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

.github/workflows/jit.yml

+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: JIT
2+
on:
3+
pull_request:
4+
paths:
5+
- '**jit**'
6+
- 'Python/bytecodes.c'
7+
push:
8+
paths:
9+
- '**jit**'
10+
- 'Python/bytecodes.c'
11+
workflow_dispatch:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
jit:
19+
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
20+
runs-on: ${{ matrix.runner }}
21+
timeout-minutes: 60
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
target:
26+
- i686-pc-windows-msvc/msvc
27+
- x86_64-pc-windows-msvc/msvc
28+
- x86_64-apple-darwin/clang
29+
- aarch64-apple-darwin/clang
30+
- x86_64-unknown-linux-gnu/gcc
31+
- x86_64-unknown-linux-gnu/clang
32+
- aarch64-unknown-linux-gnu/gcc
33+
- aarch64-unknown-linux-gnu/clang
34+
debug:
35+
- true
36+
- false
37+
llvm:
38+
- 16
39+
include:
40+
- target: i686-pc-windows-msvc/msvc
41+
architecture: Win32
42+
runner: windows-latest
43+
compiler: msvc
44+
- target: x86_64-pc-windows-msvc/msvc
45+
architecture: x64
46+
runner: windows-latest
47+
compiler: msvc
48+
- target: x86_64-apple-darwin/clang
49+
architecture: x86_64
50+
runner: macos-13
51+
compiler: clang
52+
- target: aarch64-apple-darwin/clang
53+
architecture: aarch64
54+
runner: macos-14
55+
compiler: clang
56+
- target: x86_64-unknown-linux-gnu/gcc
57+
architecture: x86_64
58+
runner: ubuntu-latest
59+
compiler: gcc
60+
- target: x86_64-unknown-linux-gnu/clang
61+
architecture: x86_64
62+
runner: ubuntu-latest
63+
compiler: clang
64+
- target: aarch64-unknown-linux-gnu/gcc
65+
architecture: aarch64
66+
runner: ubuntu-latest
67+
compiler: gcc
68+
# These fail because of emulation, not because of the JIT:
69+
exclude: test_unix_events test_init test_process_pool test_shutdown test_multiprocessing_fork test_cmd_line test_faulthandler test_os test_perf_profiler test_posix test_signal test_socket test_subprocess test_threading test_venv
70+
- target: aarch64-unknown-linux-gnu/clang
71+
architecture: aarch64
72+
runner: ubuntu-latest
73+
compiler: clang
74+
# These fail because of emulation, not because of the JIT:
75+
exclude: test_unix_events test_init test_process_pool test_shutdown test_multiprocessing_fork test_cmd_line test_faulthandler test_os test_perf_profiler test_posix test_signal test_socket test_subprocess test_threading test_venv
76+
env:
77+
CC: ${{ matrix.compiler }}
78+
steps:
79+
- uses: actions/checkout@v4
80+
- uses: actions/setup-python@v5
81+
with:
82+
python-version: '3.11'
83+
84+
- name: Windows
85+
if: runner.os == 'Windows'
86+
run: |
87+
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}
88+
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
89+
./PCbuild/rt.bat ${{ matrix.debug && '-d' }} -p ${{ matrix.architecture }} -q --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3
90+
91+
- name: macOS
92+
if: runner.os == 'macOS'
93+
run: |
94+
brew install llvm@${{ matrix.llvm }}
95+
export SDKROOT="$(xcrun --show-sdk-path)"
96+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
97+
make all --jobs 4
98+
./python.exe -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3
99+
100+
- name: Native Linux
101+
if: runner.os == 'Linux' && matrix.architecture == 'x86_64'
102+
run: |
103+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
104+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
105+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
106+
make all --jobs 4
107+
./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3
108+
109+
- name: Emulated Linux
110+
if: runner.os == 'Linux' && matrix.architecture != 'x86_64'
111+
run: |
112+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
113+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
114+
./configure --prefix="$(pwd)/../build"
115+
make install --jobs 4
116+
make clean --jobs 4
117+
export HOST=${{ matrix.architecture }}-linux-gnu
118+
sudo apt install --yes "gcc-$HOST" qemu-user
119+
${{ !matrix.debug && matrix.compiler == 'clang' && './configure --enable-optimizations' || '' }}
120+
${{ !matrix.debug && matrix.compiler == 'clang' && 'make profile-run-stamp --jobs 4' || '' }}
121+
export CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}"
122+
export CPP="$CC --preprocess"
123+
export HOSTRUNNER=qemu-${{ matrix.architecture }}
124+
export QEMU_LD_PREFIX="/usr/$HOST"
125+
./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
126+
make all --jobs 4
127+
./python -m test --exclude ${{ matrix.exclude }} --multiprocess 0 --timeout 3600 --verbose2 --verbose3

0 commit comments

Comments
 (0)