Skip to content

Commit 76a4032

Browse files
authored
Merge branch '3.14' into backport-ff2577f-3.14
2 parents 81b24a9 + 1b2f0bd commit 76a4032

File tree

660 files changed

+20153
-12708
lines changed

Some content is hidden

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

660 files changed

+20153
-12708
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
# GitHub
88
.github/** @ezio-melotti @hugovk @AA-Turner @webknjaz
9+
.github/workflows/jit.yml @savannahostrowski
10+
Tools/build/compute-changes.py @AA-Turner @hugovk @webknjaz
11+
Lib/test/test_tools/test_compute_changes.py @AA-Turner @hugovk @webknjaz
912

1013
# pre-commit
1114
.pre-commit-config.yaml @hugovk
@@ -161,6 +164,7 @@ Doc/c-api/module.rst @ericsnowcurrently
161164
# Dates and times
162165
**/*datetime* @pganssle @abalkin
163166
**/*str*time* @pganssle @abalkin
167+
Doc/library/datetime-* @pganssle
164168
Doc/library/time.rst @pganssle @abalkin
165169
Lib/test/test_time.py @pganssle @abalkin
166170
Modules/timemodule.c @pganssle @abalkin

.github/actionlint.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
self-hosted-runner:
2-
# Pending https://github.com/rhysd/actionlint/issues/533
3-
# and https://github.com/rhysd/actionlint/issues/571
4-
labels: ["windows-11-arm", "macos-15-intel"]
5-
61
config-variables: null
72

83
paths:

.github/workflows/build.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Install dependencies
6565
run: |
6666
sudo ./.github/workflows/posix-deps-apt.sh
67-
sudo apt-get install -yq abigail-tools
67+
sudo apt-get install -yq --no-install-recommends abigail-tools
6868
- name: Build CPython
6969
env:
7070
CFLAGS: -g3 -O0
@@ -158,8 +158,6 @@ jobs:
158158
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
159159
- name: Install dependencies
160160
run: sudo ./.github/workflows/posix-deps-apt.sh
161-
- name: Add ccache to PATH
162-
run: echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
163161
- name: Configure CPython
164162
run: |
165163
# Build Python with the libpython dynamic library
@@ -303,7 +301,7 @@ jobs:
303301
# Keep 1.1.1w in our list despite it being upstream EOL and otherwise
304302
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
305303
# supported by important vendors such as AWS-LC.
306-
openssl_ver: [1.1.1w, 3.0.18, 3.2.6, 3.3.5, 3.4.3, 3.5.4]
304+
openssl_ver: [1.1.1w, 3.0.19, 3.3.6, 3.4.4, 3.5.5, 3.6.1]
307305
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
308306
env:
309307
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -334,9 +332,6 @@ jobs:
334332
- name: Install OpenSSL
335333
if: steps.cache-openssl.outputs.cache-hit != 'true'
336334
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
337-
- name: Add ccache to PATH
338-
run: |
339-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
340335
- name: Configure CPython
341336
run: ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
342337
- name: Build CPython
@@ -428,9 +423,6 @@ jobs:
428423
- name: Install OpenSSL
429424
if: steps.cache-openssl.outputs.cache-hit != 'true'
430425
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
431-
- name: Add ccache to PATH
432-
run: |
433-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
434426
- name: Setup directory envs for out-of-tree builds
435427
run: |
436428
echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -546,9 +538,6 @@ jobs:
546538
- name: Install OpenSSL
547539
if: steps.cache-openssl.outputs.cache-hit != 'true'
548540
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
549-
- name: Add ccache to PATH
550-
run: |
551-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
552541
- name: Configure CPython
553542
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
554543
- name: Build CPython

.github/workflows/jit.yml

Lines changed: 98 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
11
name: JIT
22
on:
33
pull_request:
4-
paths:
4+
paths: &paths
55
- '**jit**'
66
- 'Python/bytecodes.c'
77
- 'Python/optimizer*.c'
88
- '!Python/perf_jit_trampoline.c'
99
- '!**/*.md'
1010
- '!**/*.ini'
1111
push:
12-
paths:
13-
- '**jit**'
14-
- 'Python/bytecodes.c'
15-
- 'Python/optimizer*.c'
16-
- '!Python/perf_jit_trampoline.c'
17-
- '!**/*.md'
18-
- '!**/*.ini'
12+
paths: *paths
1913
workflow_dispatch:
2014

2115
permissions:
@@ -27,12 +21,13 @@ concurrency:
2721

2822
env:
2923
FORCE_COLOR: 1
24+
LLVM_VERSION: 19
3025

3126
jobs:
3227
interpreter:
3328
name: Interpreter (Debug)
3429
runs-on: ubuntu-24.04
35-
timeout-minutes: 90
30+
timeout-minutes: 60
3631
steps:
3732
- uses: actions/checkout@v6
3833
with:
@@ -44,27 +39,22 @@ jobs:
4439
- name: Test tier two interpreter
4540
run: |
4641
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
47-
jit:
42+
43+
windows:
4844
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
49-
needs: interpreter
45+
5046
runs-on: ${{ matrix.runner }}
51-
timeout-minutes: 90
47+
timeout-minutes: 60
5248
strategy:
5349
fail-fast: false
5450
matrix:
5551
target:
5652
- i686-pc-windows-msvc/msvc
5753
- x86_64-pc-windows-msvc/msvc
5854
- aarch64-pc-windows-msvc/msvc
59-
- x86_64-apple-darwin/clang
60-
- aarch64-apple-darwin/clang
61-
- x86_64-unknown-linux-gnu/gcc
62-
- aarch64-unknown-linux-gnu/gcc
6355
debug:
6456
- true
6557
- false
66-
llvm:
67-
- 19
6858
include:
6959
- target: i686-pc-windows-msvc/msvc
7060
architecture: Win32
@@ -75,103 +65,134 @@ jobs:
7565
- target: aarch64-pc-windows-msvc/msvc
7666
architecture: ARM64
7767
runner: windows-11-arm
78-
- target: x86_64-apple-darwin/clang
79-
architecture: x86_64
80-
runner: macos-15-intel
81-
- target: aarch64-apple-darwin/clang
82-
architecture: aarch64
83-
runner: macos-14
84-
- target: x86_64-unknown-linux-gnu/gcc
85-
architecture: x86_64
86-
runner: ubuntu-24.04
87-
- target: aarch64-unknown-linux-gnu/gcc
88-
architecture: aarch64
89-
runner: ubuntu-24.04-arm
9068
steps:
9169
- uses: actions/checkout@v6
9270
with:
9371
persist-credentials: false
9472
- uses: actions/setup-python@v6
9573
with:
9674
python-version: '3.11'
97-
9875
# PCbuild downloads LLVM automatically:
99-
- name: Windows
100-
if: runner.os == 'Windows'
76+
- name: Build
10177
run: |
10278
./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }}
79+
- name: Test
80+
run: |
10381
./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
10482
105-
- name: macOS
106-
if: runner.os == 'macOS'
83+
macos:
84+
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
85+
86+
runs-on: ${{ matrix.runner }}
87+
timeout-minutes: 60
88+
strategy:
89+
fail-fast: false
90+
matrix:
91+
target:
92+
- x86_64-apple-darwin/clang
93+
- aarch64-apple-darwin/clang
94+
debug:
95+
- true
96+
- false
97+
include:
98+
- target: x86_64-apple-darwin/clang
99+
runner: macos-15-intel
100+
- target: aarch64-apple-darwin/clang
101+
runner: macos-14
102+
steps:
103+
- uses: actions/checkout@v6
104+
with:
105+
persist-credentials: false
106+
- uses: actions/setup-python@v6
107+
with:
108+
python-version: '3.11'
109+
- name: Install LLVM
107110
run: |
108111
brew update
109-
brew install llvm@${{ matrix.llvm }}
112+
brew install llvm@${{ env.LLVM_VERSION }}
113+
- name: Build
114+
run: |
110115
export SDKROOT="$(xcrun --show-sdk-path)"
111116
# Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to
112117
# make sure we don't break downstream distributors (like uv):
113118
export CFLAGS_JIT='-Werror=unguarded-availability'
114119
export MACOSX_DEPLOYMENT_TARGET=10.15
115120
./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }}
116121
make all --jobs 4
122+
- name: Test
123+
run: |
117124
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
118125
119-
- name: Linux
120-
if: runner.os == 'Linux'
126+
linux:
127+
name: ${{ matrix.target }} (${{ matrix.debug && 'Debug' || 'Release' }})
128+
129+
runs-on: ${{ matrix.runner }}
130+
timeout-minutes: 60
131+
strategy:
132+
fail-fast: false
133+
matrix:
134+
target:
135+
- x86_64-unknown-linux-gnu/gcc
136+
- aarch64-unknown-linux-gnu/gcc
137+
debug:
138+
- true
139+
- false
140+
include:
141+
- target: x86_64-unknown-linux-gnu/gcc
142+
runner: ubuntu-24.04
143+
- target: aarch64-unknown-linux-gnu/gcc
144+
runner: ubuntu-24.04-arm
145+
steps:
146+
- uses: actions/checkout@v6
147+
with:
148+
persist-credentials: false
149+
- uses: actions/setup-python@v6
150+
with:
151+
python-version: '3.11'
152+
- name: Build
121153
run: |
122-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
123-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
154+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
155+
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
124156
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
125157
make all --jobs 4
158+
- name: Test
159+
run: |
126160
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
127161
128-
# XXX: GH-133171
129-
# jit-with-disabled-gil:
130-
# name: Free-Threaded (Debug)
131-
# needs: interpreter
132-
# runs-on: ubuntu-24.04
133-
# timeout-minutes: 90
134-
# strategy:
135-
# fail-fast: false
136-
# matrix:
137-
# llvm:
138-
# - 19
139-
# steps:
140-
# - uses: actions/checkout@v6
141-
# with:
142-
# persist-credentials: false
143-
# - uses: actions/setup-python@v6
144-
# with:
145-
# python-version: '3.11'
146-
# - name: Build with JIT enabled and GIL disabled
147-
# run: |
148-
# sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
149-
# export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
150-
# ./configure --enable-experimental-jit --with-pydebug --disable-gil
151-
# make all --jobs 4
152-
# - name: Run tests
153-
# run: |
154-
# ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
155-
tail-call-jit:
156-
name: JIT with tail calling interpreter
157-
needs: interpreter
162+
linux-extras:
163+
name: ${{ matrix.name }}
164+
158165
runs-on: ubuntu-24.04
159-
timeout-minutes: 90
166+
timeout-minutes: 60
160167
strategy:
161168
fail-fast: false
162169
matrix:
163-
llvm:
164-
- 19
170+
include:
171+
172+
- name: JIT without optimizations (Debug)
173+
configure_flags: --enable-experimental-jit --with-pydebug
174+
test_env: "PYTHON_UOPS_OPTIMIZE=0"
175+
- name: JIT with tail calling interpreter
176+
configure_flags: --enable-experimental-jit --with-tail-call-interp --with-pydebug
177+
use_clang: true
178+
run_tests: false
165179
steps:
166180
- uses: actions/checkout@v6
167181
with:
168182
persist-credentials: false
169183
- uses: actions/setup-python@v6
170184
with:
171185
python-version: '3.11'
172-
- name: Build with JIT and tailcall
186+
- name: Build
173187
run: |
174-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
175-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
176-
CC=clang-${{ matrix.llvm }} ./configure --enable-experimental-jit --with-tail-call-interp --with-pydebug
188+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
189+
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
190+
if [ "${{ matrix.use_clang }}" = "true" ]; then
191+
export CC=clang-${{ env.LLVM_VERSION }}
192+
fi
193+
./configure ${{ matrix.configure_flags }}
177194
make all --jobs 4
195+
- name: Test
196+
if: matrix.run_tests != false
197+
run: |
198+
${{ matrix.test_env }} ./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/bin/sh
22
apt-get update
33

4-
apt-get -yq install \
4+
apt-get -yq --no-install-recommends install \
55
build-essential \
66
pkg-config \
7-
ccache \
87
gdb \
98
lcov \
109
libb2-dev \

.github/workflows/regen-abidump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ set -ex
22

33
export DEBIAN_FRONTEND=noninteractive
44
./.github/workflows/posix-deps-apt.sh
5-
apt-get install -yq abigail-tools python3
5+
apt-get install -yq --no-install-recommends abigail-tools python3
66
export CFLAGS="-g3 -O0"
77
./configure --enable-shared && make
88
make regen-abidump

.github/workflows/reusable-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
restore-keys: |
9393
ubuntu-doc-
9494
- name: 'Install Dependencies'
95-
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican
95+
run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install --no-install-recommends wamerican
9696
- name: 'Configure CPython'
9797
run: ./configure --with-pydebug
9898
- name: 'Build CPython'

.github/workflows/reusable-san.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ jobs:
6666
env:
6767
SANITIZER: ${{ inputs.sanitizer }}
6868
SAN_LOG_OPTION: log_path=${{ github.workspace }}/san_log
69-
- name: Add ccache to PATH
70-
run: |
71-
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
7269
- name: Configure CPython
7370
run: >-
7471
./configure

0 commit comments

Comments
 (0)