Skip to content

Commit cd8c011

Browse files
committed
Merge in the main branch
2 parents 7bc0ceb + ad9d059 commit cd8c011

File tree

583 files changed

+12761
-5530
lines changed

Some content is hidden

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

583 files changed

+12761
-5530
lines changed

.github/CODEOWNERS

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ Programs/_bootstrap_python.c @ericsnowcurrently
8181
Programs/python.c @ericsnowcurrently
8282
Tools/build/generate_global_objects.py @ericsnowcurrently
8383

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+
8495
# Exceptions
8596
Lib/test/test_except*.py @iritkatriel
8697
Objects/exceptions.c @iritkatriel
@@ -97,7 +108,7 @@ Modules/_hacl/** @gpshead
97108
**/*logging* @vsajip
98109

99110
# venv
100-
**/*venv* @vsajip
111+
**/*venv* @vsajip @FFY00
101112

102113
# Launcher
103114
/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: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
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:
@@ -120,7 +120,7 @@ jobs:
120120
- name: Build CPython
121121
run: |
122122
make -j4 regen-all
123-
make regen-stdlib-module-names regen-sbom
123+
make regen-stdlib-module-names regen-sbom regen-unicodedata
124124
- name: Check for changes
125125
run: |
126126
git add -u
@@ -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

@@ -238,7 +250,8 @@ jobs:
238250
fail-fast: false
239251
matrix:
240252
os: [ubuntu-24.04]
241-
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
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

.github/workflows/jit.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ 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
@@ -66,41 +64,24 @@ jobs:
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
8881
runner: ubuntu-22.04
89-
compiler: gcc
90-
- target: x86_64-unknown-linux-gnu/clang
91-
architecture: x86_64
92-
runner: ubuntu-22.04
93-
compiler: clang
9482
- target: aarch64-unknown-linux-gnu/gcc
9583
architecture: aarch64
9684
runner: ubuntu-22.04
97-
compiler: gcc
98-
- target: aarch64-unknown-linux-gnu/clang
99-
architecture: aarch64
100-
runner: ubuntu-22.04
101-
compiler: clang
102-
env:
103-
CC: ${{ matrix.compiler }}
10485
steps:
10586
- uses: actions/checkout@v4
10687
- uses: actions/setup-python@v5
@@ -111,10 +92,10 @@ 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: |
@@ -123,7 +104,7 @@ jobs:
123104
124105
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
125106
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
126-
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
107+
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
127108
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
128109
- name: Native macOS
129110
if: runner.os == 'macOS'
@@ -132,7 +113,7 @@ jobs:
132113
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
133114
brew install llvm@${{ matrix.llvm }}
134115
export SDKROOT="$(xcrun --show-sdk-path)"
135-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
116+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
136117
make all --jobs 4
137118
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
138119
@@ -141,7 +122,7 @@ jobs:
141122
run: |
142123
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
143124
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
144-
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '--enable-optimizations --with-lto' }}
125+
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
145126
make all --jobs 4
146127
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
147128
@@ -156,13 +137,11 @@ jobs:
156137
make clean --jobs 4
157138
export HOST=${{ matrix.architecture }}-linux-gnu
158139
sudo apt install --yes "gcc-$HOST" qemu-user
159-
${{ !matrix.debug && matrix.compiler == 'clang' && './configure --enable-optimizations' || '' }}
160-
${{ !matrix.debug && matrix.compiler == 'clang' && 'make profile-run-stamp --jobs 4' || '' }}
161140
export QEMU_LD_PREFIX="/usr/$HOST"
162-
CC="${{ matrix.compiler == 'clang' && 'clang --target=$HOST' || '$HOST-gcc' }}" \
163-
CPP="$CC --preprocess" \
141+
CC="$HOST-gcc" \
142+
CPP="$HOST-gcc --preprocess" \
164143
HOSTRUNNER=qemu-${{ matrix.architecture }} \
165-
./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
166145
make all --jobs 4
167146
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
168147

.github/workflows/reusable-macos.yml

Lines changed: 4 additions & 1 deletion
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 openssl@3.0 xz gdbm tcl-tk make
40+
run: |
41+
brew install pkg-config openssl@3.0 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" \

.github/workflows/reusable-ubuntu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
os: [ubuntu-24.04]
23+
os: [ubuntu-24.04, ubuntu-24.04-aarch64]
2424
env:
2525
FORCE_COLOR: 1
2626
OPENSSL_VER: 3.0.15
@@ -82,11 +82,11 @@ jobs:
8282
- name: Build CPython out-of-tree
8383
if: ${{ inputs.free-threading }}
8484
working-directory: ${{ env.CPYTHON_BUILDDIR }}
85-
run: make -j4
85+
run: make -j
8686
- name: Build CPython out-of-tree (for compiler warning check)
8787
if: ${{ !inputs.free-threading}}
8888
working-directory: ${{ env.CPYTHON_BUILDDIR }}
89-
run: set -o pipefail; make -j4 --output-sync 2>&1 | tee compiler_output_ubuntu.txt
89+
run: set -o pipefail; make -j --output-sync 2>&1 | tee compiler_output_ubuntu.txt
9090
- name: Display build info
9191
working-directory: ${{ env.CPYTHON_BUILDDIR }}
9292
run: make pythoninfo

.github/workflows/reusable-windows.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Reusable Windows
33
on:
44
workflow_call:
55
inputs:
6+
os:
7+
description: OS to run on
8+
required: true
9+
type: string
610
arch:
711
description: CPU architecture
812
required: true
@@ -19,10 +23,8 @@ env:
1923
2024
jobs:
2125
build:
22-
name: >-
23-
build${{ inputs.arch != 'arm64' && ' and test' || '' }}
24-
(${{ inputs.arch }})
25-
runs-on: windows-latest
26+
name: 'build and test (${{ inputs.arch }})'
27+
runs-on: ${{ inputs.os }}
2628
timeout-minutes: 60
2729
steps:
2830
- uses: actions/checkout@v4
@@ -31,17 +33,17 @@ jobs:
3133
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
3234
- name: Build CPython
3335
run: >-
34-
.\PCbuild\build.bat
36+
.\\PCbuild\\build.bat
3537
-e -d -v
3638
-p ${{ inputs.arch }}
3739
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
38-
- name: Display build info
40+
- name: Display build info # FIXME(diegorusso): remove the `if`
3941
if: inputs.arch != 'arm64'
40-
run: .\python.bat -m test.pythoninfo
41-
- name: Tests
42+
run: .\\python.bat -m test.pythoninfo
43+
- name: Tests # FIXME(diegorusso): remove the `if`
4244
if: inputs.arch != 'arm64'
4345
run: >-
44-
.\PCbuild\rt.bat
46+
.\\PCbuild\\rt.bat
4547
-p ${{ inputs.arch }}
4648
-d -q --fast-ci
4749
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}

.pre-commit-config.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,9 @@ repos:
5757
- id: check-github-workflows
5858

5959
- repo: https://github.com/rhysd/actionlint
60-
rev: v1.7.3
60+
rev: v1.7.4
6161
hooks:
6262
- id: actionlint
63-
args: [
64-
-ignore=1st argument of function call is not assignable,
65-
-ignore=SC2(015|038|086|091|097|098|129|155),
66-
]
6763

6864
- repo: https://github.com/sphinx-contrib/sphinx-lint
6965
rev: v1.0.0

Doc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pydoc-topics: build
144144

145145
.PHONY: gettext
146146
gettext: BUILDER = gettext
147-
gettext: SPHINXOPTS += -d build/doctrees-gettext
147+
gettext: override SPHINXOPTS := -d build/doctrees-gettext $(SPHINXOPTS)
148148
gettext: build
149149

150150
.PHONY: htmlview
@@ -294,7 +294,7 @@ check: _ensure-pre-commit
294294

295295
.PHONY: serve
296296
serve:
297-
@echo "The serve target was removed, use htmlview instead (see bpo-36329)"
297+
@echo "The serve target was removed, use htmllive instead (see gh-80510)"
298298

299299
# Targets for daily automated doc build
300300
# By default, Sphinx only rebuilds pages where the page content has changed.

0 commit comments

Comments
 (0)