Skip to content

Commit 67670f0

Browse files
committed
Merge branch 'main' into use-stackrefs
2 parents f03f745 + 1f8267b commit 67670f0

File tree

856 files changed

+25826
-10617
lines changed

Some content is hidden

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

856 files changed

+25826
-10617
lines changed

.azure-pipelines/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
displayName: Pre-build checks
66

77
pool:
8-
vmImage: ubuntu-22.04
8+
vmImage: ubuntu-24.04
99

1010
steps:
1111
- template: ./prebuild-checks.yml

.github/CODEOWNERS

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ configure* @erlend-aasland @corona10
1616
Makefile.pre.in @erlend-aasland
1717
Modules/Setup* @erlend-aasland
1818

19+
# argparse
20+
**/*argparse* @savannahostrowski
21+
1922
# asyncio
2023
**/*asyncio* @1st1 @asvetlov @kumaraditya303 @willingc
2124

2225
# Core
2326
**/*context* @1st1
2427
**/*genobject* @markshannon
2528
**/*hamt* @1st1
26-
**/*jit* @brandtbucher
29+
**/*jit* @brandtbucher @savannahostrowski
2730
Objects/set* @rhettinger
2831
Objects/dict* @methane @markshannon
2932
Objects/typevarobject.c @JelleZijlstra
@@ -78,6 +81,17 @@ Programs/_bootstrap_python.c @ericsnowcurrently
7881
Programs/python.c @ericsnowcurrently
7982
Tools/build/generate_global_objects.py @ericsnowcurrently
8083

84+
# Initialization
85+
Doc/library/sys_path_init.rst @FFY00
86+
Doc/c-api/init_config.rst @FFY00
87+
88+
# getpath
89+
**/*getpath* @FFY00
90+
91+
# site
92+
**/*site.py @FFY00
93+
Doc/library/site.rst @FFY00
94+
8195
# Exceptions
8296
Lib/test/test_except*.py @iritkatriel
8397
Objects/exceptions.c @iritkatriel
@@ -88,14 +102,13 @@ Objects/exceptions.c @iritkatriel
88102
**/sha* @gpshead @tiran
89103
Modules/md5* @gpshead @tiran
90104
**/*blake* @gpshead @tiran
91-
Modules/_blake2/** @gpshead @tiran
92105
Modules/_hacl/** @gpshead
93106

94107
# logging
95108
**/*logging* @vsajip
96109

97110
# venv
98-
**/*venv* @vsajip
111+
**/*venv* @vsajip @FFY00
99112

100113
# Launcher
101114
/PC/launcher.c @vsajip
@@ -255,8 +268,8 @@ Modules/_interp*module.c @ericsnowcurrently
255268
Lib/test/test_interpreters/ @ericsnowcurrently
256269

257270
# Android
258-
**/*Android* @mhsmith
259-
**/*android* @mhsmith
271+
**/*Android* @mhsmith @freakboy3742
272+
**/*android* @mhsmith @freakboy3742
260273

261274
# iOS (but not termios)
262275
**/iOS* @freakboy3742
@@ -267,7 +280,7 @@ Lib/test/test_interpreters/ @ericsnowcurrently
267280
**/*-ios* @freakboy3742
268281

269282
# WebAssembly
270-
/Tools/wasm/ @brettcannon
283+
/Tools/wasm/ @brettcannon @freakboy3742
271284

272285
# SBOM
273286
/Misc/externals.spdx.json @sethmlarson

.github/actionlint.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
self-hosted-runner:
2+
labels: ["ubuntu-24.04-aarch64", "windows-aarch64"]
3+
4+
config-variables: null
5+
6+
paths:
7+
.github/workflows/**/*.yml:
8+
ignore:
9+
- 1st argument of function call is not assignable
10+
- SC2(015|038|086|091|097|098|129|155)

.github/workflows/build.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ jobs:
4646
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
4747
runs-on: ubuntu-24.04
4848
container:
49-
image: ghcr.io/python/autoconf:2024.10.16.11360930377
49+
image: ghcr.io/python/autoconf:2024.11.11.11786316759
5050
timeout-minutes: 60
5151
needs: check_source
5252
if: needs.check_source.outputs.run_tests == 'true'
5353
steps:
5454
- name: Install Git
5555
run: |
56-
apt install git -yq
56+
apt update && apt install git -yq
5757
git config --global --add safe.directory "$GITHUB_WORKSPACE"
5858
- uses: actions/checkout@v4
5959
with:
@@ -76,7 +76,7 @@ jobs:
7676
# Check for changes in regenerated files
7777
if test -n "$changes"; then
7878
echo "Generated files not up to date."
79-
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
79+
echo "Perhaps you forgot to run make regen-configure ;)"
8080
echo "configure files must be regenerated with a specific version of autoconf."
8181
echo "$changes"
8282
echo ""
@@ -88,7 +88,7 @@ jobs:
8888
name: 'Check if generated files are up to date'
8989
# Don't use ubuntu-latest but a specific version to make the job
9090
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
91-
runs-on: ubuntu-22.04
91+
runs-on: ubuntu-24.04
9292
timeout-minutes: 60
9393
needs: check_source
9494
if: needs.check_source.outputs.run_tests == 'true'
@@ -150,16 +150,28 @@ jobs:
150150
needs: check_source
151151
if: fromJSON(needs.check_source.outputs.run_tests)
152152
strategy:
153+
fail-fast: false
153154
matrix:
155+
os:
156+
- windows-latest
154157
arch:
155-
- Win32
156-
- x64
157-
- arm64
158+
- x64
158159
free-threading:
159-
- false
160-
- true
160+
- false
161+
- true
162+
include:
163+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
164+
arch: arm64
165+
free-threading: false
166+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
167+
arch: arm64
168+
free-threading: true
169+
- os: windows-latest
170+
arch: Win32
171+
free-threading: false
161172
uses: ./.github/workflows/reusable-windows.yml
162173
with:
174+
os: ${{ matrix.os }}
163175
arch: ${{ matrix.arch }}
164176
free-threading: ${{ matrix.free-threading }}
165177

@@ -237,8 +249,9 @@ jobs:
237249
strategy:
238250
fail-fast: false
239251
matrix:
240-
os: [ubuntu-22.04]
241-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
252+
os: [ubuntu-24.04]
253+
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
254+
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
242255
env:
243256
OPENSSL_VER: ${{ matrix.openssl_ver }}
244257
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -297,7 +310,7 @@ jobs:
297310

298311
test_hypothesis:
299312
name: "Hypothesis tests on Ubuntu"
300-
runs-on: ubuntu-22.04
313+
runs-on: ubuntu-24.04
301314
timeout-minutes: 60
302315
needs: check_source
303316
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
@@ -417,7 +430,7 @@ jobs:
417430
if: needs.check_source.outputs.run_tests == 'true'
418431
strategy:
419432
matrix:
420-
os: [ubuntu-22.04]
433+
os: [ubuntu-24.04]
421434
env:
422435
OPENSSL_VER: 3.0.15
423436
PYTHONSTRICTEXTENSIONBUILD: 1
@@ -468,7 +481,7 @@ jobs:
468481
- name: Display build info
469482
run: make pythoninfo
470483
- name: Tests
471-
run: xvfb-run make test
484+
run: xvfb-run make ci
472485

473486
build_tsan:
474487
name: 'Thread sanitizer'

.github/workflows/jit.yml

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828
jobs:
2929
interpreter:
3030
name: Interpreter (Debug)
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-22.04
3232
timeout-minutes: 90
3333
steps:
3434
- uses: actions/checkout@v4
@@ -54,53 +54,34 @@ jobs:
5454
- x86_64-apple-darwin/clang
5555
- aarch64-apple-darwin/clang
5656
- x86_64-unknown-linux-gnu/gcc
57-
- x86_64-unknown-linux-gnu/clang
5857
- aarch64-unknown-linux-gnu/gcc
59-
- aarch64-unknown-linux-gnu/clang
6058
debug:
6159
- true
6260
- false
6361
llvm:
64-
- 18
62+
- 19
6563
include:
6664
- target: i686-pc-windows-msvc/msvc
6765
architecture: Win32
6866
runner: windows-latest
69-
compiler: msvc
7067
- target: x86_64-pc-windows-msvc/msvc
7168
architecture: x64
7269
runner: windows-latest
73-
compiler: msvc
7470
- target: aarch64-pc-windows-msvc/msvc
7571
architecture: ARM64
7672
runner: windows-latest
77-
compiler: msvc
7873
- target: x86_64-apple-darwin/clang
7974
architecture: x86_64
8075
runner: macos-13
81-
compiler: clang
8276
- target: aarch64-apple-darwin/clang
8377
architecture: aarch64
8478
runner: macos-14
85-
compiler: clang
8679
- target: x86_64-unknown-linux-gnu/gcc
8780
architecture: x86_64
88-
runner: ubuntu-latest
89-
compiler: gcc
90-
- target: x86_64-unknown-linux-gnu/clang
91-
architecture: x86_64
92-
runner: ubuntu-latest
93-
compiler: clang
81+
runner: ubuntu-22.04
9482
- target: aarch64-unknown-linux-gnu/gcc
9583
architecture: aarch64
96-
runner: ubuntu-latest
97-
compiler: gcc
98-
- target: aarch64-unknown-linux-gnu/clang
99-
architecture: aarch64
100-
runner: ubuntu-latest
101-
compiler: clang
102-
env:
103-
CC: ${{ matrix.compiler }}
84+
runner: ubuntu-22.04
10485
steps:
10586
- uses: actions/checkout@v4
10687
- uses: actions/setup-python@v5
@@ -111,23 +92,28 @@ jobs:
11192
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
11293
run: |
11394
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
114-
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
95+
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
11596
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
11697
117-
# No PGO or tests (yet):
98+
# No tests (yet):
11899
- name: Emulated Windows
119100
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
120101
run: |
121102
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
122103
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
123104
105+
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
106+
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
107+
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
108+
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
124109
- name: Native macOS
125110
if: runner.os == 'macOS'
126111
run: |
127112
brew update
113+
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
128114
brew install llvm@${{ matrix.llvm }}
129-
SDKROOT="$(xcrun --show-sdk-path)" \
130-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
115+
export SDKROOT="$(xcrun --show-sdk-path)"
116+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
131117
make all --jobs 4
132118
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
133119
@@ -136,7 +122,7 @@ jobs:
136122
run: |
137123
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
138124
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
139-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
125+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
140126
make all --jobs 4
141127
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
142128
@@ -151,29 +137,31 @@ jobs:
151137
make clean --jobs 4
152138
export HOST=${{ matrix.architecture }}-linux-gnu
153139
sudo apt install --yes "gcc-$HOST" qemu-user
154-
${{ !matrix.debug && matrix.compiler == 'clang' && './configure --enable-optimizations' || '' }}
155-
${{ !matrix.debug && matrix.compiler == 'clang' && 'make profile-run-stamp --jobs 4' || '' }}
156140
export QEMU_LD_PREFIX="/usr/$HOST"
157-
CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
158-
CPP="$CC --preprocess" \
141+
CC="$HOST-gcc" \
142+
CPP="$HOST-gcc --preprocess" \
159143
HOSTRUNNER=qemu-${{ matrix.architecture }} \
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
144+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }} --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
161145
make all --jobs 4
162146
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
163147
164148
jit-with-disabled-gil:
165149
name: Free-Threaded (Debug)
166150
needs: interpreter
167-
runs-on: ubuntu-latest
151+
runs-on: ubuntu-22.04
152+
strategy:
153+
matrix:
154+
llvm:
155+
- 19
168156
steps:
169157
- uses: actions/checkout@v4
170158
- uses: actions/setup-python@v5
171159
with:
172160
python-version: '3.11'
173161
- name: Build with JIT enabled and GIL disabled
174162
run: |
175-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 18
176-
export PATH="$(llvm-config-18 --bindir):$PATH"
163+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
164+
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
177165
./configure --enable-experimental-jit --with-pydebug --disable-gil
178166
make all --jobs 4
179167
- name: Run tests

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ apt-get -yq install \
1313
libgdbm-dev \
1414
libgdbm-compat-dev \
1515
liblzma-dev \
16-
libmpdec-dev \
1716
libncurses5-dev \
1817
libreadline6-dev \
1918
libsqlite3-dev \

.github/workflows/reusable-macos.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ jobs:
3737
path: config.cache
3838
key: ${{ github.job }}-${{ inputs.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
3939
- name: Install Homebrew dependencies
40-
run: brew install pkg-config [email protected] xz gdbm tcl-tk make
40+
run: |
41+
brew install pkg-config [email protected] xz gdbm tcl-tk@8 make
42+
# Because alternate versions are not symlinked into place by default:
43+
brew link tcl-tk@8
4144
- name: Configure CPython
4245
run: |
4346
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
@@ -69,4 +72,4 @@ jobs:
6972
--fail-on-improvement
7073
--path-prefix="./"
7174
- name: Tests
72-
run: make test
75+
run: make ci

.github/workflows/reusable-tsan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
jobs:
2222
build_tsan_reusable:
2323
name: 'Thread sanitizer'
24-
runs-on: ubuntu-22.04
24+
runs-on: ubuntu-24.04
2525
timeout-minutes: 60
2626
steps:
2727
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)