Skip to content

Commit c162e7e

Browse files
authored
Merge branch 'main' into main
2 parents ade12b9 + a327810 commit c162e7e

File tree

1,069 files changed

+37583
-16142
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,069 files changed

+37583
-16142
lines changed

.github/CODEOWNERS

Lines changed: 16 additions & 2 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
@@ -94,7 +108,7 @@ Modules/_hacl/** @gpshead
94108
**/*logging* @vsajip
95109

96110
# venv
97-
**/*venv* @vsajip
111+
**/*venv* @vsajip @FFY00
98112

99113
# Launcher
100114
/PC/launcher.c @vsajip

.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: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,19 @@ 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:
6060
fetch-depth: 1
61+
persist-credentials: false
6162
- name: Runner image version
6263
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6364
- name: Check Autoconf and aclocal versions
@@ -76,7 +77,7 @@ jobs:
7677
# Check for changes in regenerated files
7778
if test -n "$changes"; then
7879
echo "Generated files not up to date."
79-
echo "Perhaps you forgot to run make regen-all or build.bat --regen. ;)"
80+
echo "Perhaps you forgot to run make regen-configure ;)"
8081
echo "configure files must be regenerated with a specific version of autoconf."
8182
echo "$changes"
8283
echo ""
@@ -94,6 +95,8 @@ jobs:
9495
if: needs.check_source.outputs.run_tests == 'true'
9596
steps:
9697
- uses: actions/checkout@v4
98+
with:
99+
persist-credentials: false
97100
- uses: actions/setup-python@v5
98101
with:
99102
python-version: '3.x'
@@ -120,7 +123,7 @@ jobs:
120123
- name: Build CPython
121124
run: |
122125
make -j4 regen-all
123-
make regen-stdlib-module-names regen-sbom
126+
make regen-stdlib-module-names regen-sbom regen-unicodedata
124127
- name: Check for changes
125128
run: |
126129
git add -u
@@ -150,16 +153,28 @@ jobs:
150153
needs: check_source
151154
if: fromJSON(needs.check_source.outputs.run_tests)
152155
strategy:
156+
fail-fast: false
153157
matrix:
158+
os:
159+
- windows-latest
154160
arch:
155-
- Win32
156-
- x64
157-
- arm64
161+
- x64
158162
free-threading:
159-
- false
160-
- true
163+
- false
164+
- true
165+
include:
166+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
167+
arch: arm64
168+
free-threading: false
169+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
170+
arch: arm64
171+
free-threading: true
172+
- os: windows-latest
173+
arch: Win32
174+
free-threading: false
161175
uses: ./.github/workflows/reusable-windows.yml
162176
with:
177+
os: ${{ matrix.os }}
163178
arch: ${{ matrix.arch }}
164179
free-threading: ${{ matrix.free-threading }}
165180

@@ -223,10 +238,19 @@ jobs:
223238
free-threading:
224239
- false
225240
- true
241+
os:
242+
- ubuntu-24.04
243+
- ubuntu-24.04-aarch64
244+
is-fork: # only used for the exclusion trick
245+
- ${{ github.repository_owner != 'python' }}
246+
exclude:
247+
- os: ubuntu-24.04-aarch64
248+
is-fork: true
226249
uses: ./.github/workflows/reusable-ubuntu.yml
227250
with:
228251
config_hash: ${{ needs.check_source.outputs.config_hash }}
229252
free-threading: ${{ matrix.free-threading }}
253+
os: ${{ matrix.os }}
230254

231255
build_ubuntu_ssltests:
232256
name: 'Ubuntu SSL tests with OpenSSL'
@@ -238,14 +262,17 @@ jobs:
238262
fail-fast: false
239263
matrix:
240264
os: [ubuntu-24.04]
241-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
265+
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
266+
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
242267
env:
243268
OPENSSL_VER: ${{ matrix.openssl_ver }}
244269
MULTISSL_DIR: ${{ github.workspace }}/multissl
245270
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
246271
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
247272
steps:
248273
- uses: actions/checkout@v4
274+
with:
275+
persist-credentials: false
249276
- name: Runner image version
250277
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
251278
- name: Restore config.cache
@@ -306,6 +333,8 @@ jobs:
306333
PYTHONSTRICTEXTENSIONBUILD: 1
307334
steps:
308335
- uses: actions/checkout@v4
336+
with:
337+
persist-credentials: false
309338
- name: Register gcc problem matcher
310339
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
311340
- name: Install Dependencies
@@ -389,7 +418,7 @@ jobs:
389418
#
390419
# (GH-104097) test_sysconfig is skipped because it has tests that are
391420
# failing when executed from inside a virtual environment.
392-
${{ env.VENV_PYTHON }} -m test \
421+
"${VENV_PYTHON}" -m test \
393422
-W \
394423
-o \
395424
-j4 \
@@ -424,6 +453,8 @@ jobs:
424453
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
425454
steps:
426455
- uses: actions/checkout@v4
456+
with:
457+
persist-credentials: false
427458
- name: Runner image version
428459
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
429460
- name: Restore config.cache

.github/workflows/documentation-links.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ on:
1010
- 'Doc/**'
1111
- '.github/workflows/doc.yml'
1212

13-
permissions:
14-
pull-requests: write
15-
1613
concurrency:
1714
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1815
cancel-in-progress: true
1916

2017
jobs:
2118
documentation-links:
2219
runs-on: ubuntu-latest
20+
permissions:
21+
pull-requests: write
22+
2323
steps:
2424
- uses: readthedocs/actions/preview@v1
2525
with:

.github/workflows/jit.yml

Lines changed: 23 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ concurrency:
2828
jobs:
2929
interpreter:
3030
name: Interpreter (Debug)
31-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-24.04
3232
timeout-minutes: 90
3333
steps:
3434
- uses: actions/checkout@v4
35+
with:
36+
persist-credentials: false
3537
- name: Build tier two interpreter
3638
run: |
3739
./configure --enable-experimental-jit=interpreter --with-pydebug
@@ -52,11 +54,9 @@ jobs:
5254
- x86_64-pc-windows-msvc/msvc
5355
- aarch64-pc-windows-msvc/msvc
5456
- x86_64-apple-darwin/clang
55-
# - aarch64-apple-darwin/clang
57+
- aarch64-apple-darwin/clang
5658
- x86_64-unknown-linux-gnu/gcc
57-
- x86_64-unknown-linux-gnu/clang
5859
- aarch64-unknown-linux-gnu/gcc
59-
- aarch64-unknown-linux-gnu/clang
6060
debug:
6161
- true
6262
- false
@@ -66,44 +66,29 @@ jobs:
6666
- target: i686-pc-windows-msvc/msvc
6767
architecture: Win32
6868
runner: windows-latest
69-
compiler: msvc
7069
- target: x86_64-pc-windows-msvc/msvc
7170
architecture: x64
7271
runner: windows-latest
73-
compiler: msvc
7472
- target: aarch64-pc-windows-msvc/msvc
7573
architecture: ARM64
7674
runner: windows-latest
77-
compiler: msvc
7875
- target: x86_64-apple-darwin/clang
7976
architecture: x86_64
8077
runner: macos-13
81-
compiler: clang
82-
# GH-126464: A recent change to either GHA or LLVM broke this job:
83-
# - target: aarch64-apple-darwin/clang
84-
# architecture: aarch64
85-
# runner: macos-14
86-
# compiler: clang
78+
- target: aarch64-apple-darwin/clang
79+
architecture: aarch64
80+
runner: macos-14
8781
- target: x86_64-unknown-linux-gnu/gcc
8882
architecture: x86_64
89-
runner: ubuntu-22.04
90-
compiler: gcc
91-
- target: x86_64-unknown-linux-gnu/clang
92-
architecture: x86_64
93-
runner: ubuntu-22.04
94-
compiler: clang
83+
runner: ubuntu-24.04
9584
- target: aarch64-unknown-linux-gnu/gcc
9685
architecture: aarch64
97-
runner: ubuntu-22.04
98-
compiler: gcc
99-
- target: aarch64-unknown-linux-gnu/clang
100-
architecture: aarch64
101-
runner: ubuntu-22.04
102-
compiler: clang
103-
env:
104-
CC: ${{ matrix.compiler }}
86+
# Forks don't have access to our paid AArch64 runners. These jobs are skipped below:
87+
runner: ${{ github.repository_owner == 'python' && 'ubuntu-24.04-aarch64' || 'ubuntu-24.04' }}
10588
steps:
10689
- uses: actions/checkout@v4
90+
with:
91+
persist-credentials: false
10792
- uses: actions/setup-python@v5
10893
with:
10994
python-version: '3.11'
@@ -112,10 +97,10 @@ jobs:
11297
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
11398
run: |
11499
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
115-
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '--pgo' }} -p ${{ matrix.architecture }}
100+
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
116101
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
117102
118-
# No PGO or tests (yet):
103+
# No tests (yet):
119104
- name: Emulated Windows
120105
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
121106
run: |
@@ -124,59 +109,41 @@ jobs:
124109
125110
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
126111
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
127-
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
112+
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
128113
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
129114
- name: Native macOS
130115
if: runner.os == 'macOS'
131116
run: |
132117
brew update
133118
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
134119
brew install llvm@${{ matrix.llvm }}
135-
SDKROOT="$(xcrun --show-sdk-path)" \
136-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
120+
export SDKROOT="$(xcrun --show-sdk-path)"
121+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
137122
make all --jobs 4
138123
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
139124
140125
- name: Native Linux
141-
if: runner.os == 'Linux' && matrix.architecture == 'x86_64'
126+
# Forks don't have access to our paid AArch64 runners. Skip those:
127+
if: runner.os == 'Linux' && (matrix.architecture == 'x86_64' || github.repository_owner == 'python')
142128
run: |
143129
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
144130
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
145-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
131+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
146132
make all --jobs 4
147133
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
148134
149-
- name: Emulated Linux
150-
if: runner.os == 'Linux' && matrix.architecture != 'x86_64'
151-
# The --ignorefile on ./python -m test is used to exclude tests known to fail when running on an emulated Linux.
152-
run: |
153-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
154-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
155-
./configure --prefix="$(pwd)/../build"
156-
make install --jobs 4
157-
make clean --jobs 4
158-
export HOST=${{ matrix.architecture }}-linux-gnu
159-
sudo apt install --yes "gcc-$HOST" qemu-user
160-
${{ !matrix.debug && matrix.compiler == 'clang' && './configure --enable-optimizations' || '' }}
161-
${{ !matrix.debug && matrix.compiler == 'clang' && 'make profile-run-stamp --jobs 4' || '' }}
162-
export QEMU_LD_PREFIX="/usr/$HOST"
163-
CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
164-
CPP="$CC --preprocess" \
165-
HOSTRUNNER=qemu-${{ matrix.architecture }} \
166-
./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
167-
make all --jobs 4
168-
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
169-
170135
jit-with-disabled-gil:
171136
name: Free-Threaded (Debug)
172137
needs: interpreter
173-
runs-on: ubuntu-22.04
138+
runs-on: ubuntu-24.04
174139
strategy:
175140
matrix:
176141
llvm:
177142
- 19
178143
steps:
179144
- uses: actions/checkout@v4
145+
with:
146+
persist-credentials: false
180147
- uses: actions/setup-python@v5
181148
with:
182149
python-version: '3.11'

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v4
23+
with:
24+
persist-credentials: false
2325
- uses: actions/setup-python@v5
2426
with:
2527
python-version: "3.x"

0 commit comments

Comments
 (0)