Skip to content

Commit 6280559

Browse files
authored
Merge branch '3.13' into backport-a53812d-3.13
2 parents 50c8d2d + f6da93a commit 6280559

795 files changed

Lines changed: 55590 additions & 38604 deletions

File tree

Some content is hidden

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

.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

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM docker.io/library/fedora:40
22

33
ENV CC=clang
44

5-
ENV WASI_SDK_VERSION=22
5+
ENV WASI_SDK_VERSION=24
66
ENV WASI_SDK_PATH=/opt/wasi-sdk
77

88
ENV WASMTIME_HOME=/opt/wasmtime
@@ -14,7 +14,7 @@ RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,cla
1414
dnf -y clean all
1515

1616
RUN mkdir ${WASI_SDK_PATH} && \
17-
curl --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-linux.tar.gz | \
17+
curl --location https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz | \
1818
tar --strip-components 1 --directory ${WASI_SDK_PATH} --extract --gunzip
1919

2020
RUN mkdir --parents ${WASMTIME_HOME} && \

.github/workflows/build.yml

Lines changed: 86 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ jobs:
4242

4343
check_abi:
4444
name: 'Check if the ABI has changed'
45-
runs-on: ubuntu-latest
45+
runs-on: ubuntu-22.04 # 24.04 causes spurious errors
4646
needs: check_source
4747
if: needs.check_source.outputs.run_tests == 'true'
4848
steps:
4949
- uses: actions/checkout@v4
50+
with:
51+
persist-credentials: false
5052
- uses: actions/setup-python@v5
5153
- name: Install dependencies
5254
run: |
@@ -83,16 +85,63 @@ jobs:
8385
name: abi-data
8486
path: ./Doc/data/*.abi
8587

88+
check_autoconf_regen:
89+
name: 'Check if Autoconf files are up to date'
90+
# Don't use ubuntu-latest but a specific version to make the job
91+
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
92+
runs-on: ubuntu-24.04
93+
container:
94+
image: ghcr.io/python/autoconf:2024.10.16.11360930377
95+
timeout-minutes: 60
96+
needs: check_source
97+
if: needs.check_source.outputs.run_tests == 'true'
98+
steps:
99+
- name: Install Git
100+
run: |
101+
apt update && apt install git -yq
102+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
103+
- uses: actions/checkout@v4
104+
with:
105+
fetch-depth: 1
106+
persist-credentials: false
107+
- name: Runner image version
108+
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
109+
- name: Check Autoconf and aclocal versions
110+
run: |
111+
grep "Generated by GNU Autoconf 2.71" configure
112+
grep "aclocal 1.16.5" aclocal.m4
113+
grep -q "runstatedir" configure
114+
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
115+
- name: Regenerate autoconf files
116+
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
117+
run: autoreconf -ivf -Werror
118+
- name: Check for changes
119+
run: |
120+
git add -u
121+
changes=$(git status --porcelain)
122+
# Check for changes in regenerated files
123+
if test -n "$changes"; then
124+
echo "Generated files not up to date."
125+
echo "Perhaps you forgot to run make regen-configure ;)"
126+
echo "configure files must be regenerated with a specific version of autoconf."
127+
echo "$changes"
128+
echo ""
129+
git diff --staged || true
130+
exit 1
131+
fi
132+
86133
check_generated_files:
87134
name: 'Check if generated files are up to date'
88135
# Don't use ubuntu-latest but a specific version to make the job
89136
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
90-
runs-on: ubuntu-22.04
137+
runs-on: ubuntu-24.04
91138
timeout-minutes: 60
92139
needs: check_source
93140
if: needs.check_source.outputs.run_tests == 'true'
94141
steps:
95142
- uses: actions/checkout@v4
143+
with:
144+
persist-credentials: false
96145
- uses: actions/setup-python@v5
97146
with:
98147
python-version: '3.x'
@@ -112,19 +161,10 @@ jobs:
112161
uses: hendrikmuhs/ccache-action@v1.2
113162
with:
114163
save: false
115-
- name: Check Autoconf and aclocal versions
116-
run: |
117-
grep "Generated by GNU Autoconf 2.71" configure
118-
grep "aclocal 1.16.5" aclocal.m4
119-
grep -q "runstatedir" configure
120-
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
121164
- name: Configure CPython
122165
run: |
123166
# Build Python with the libpython dynamic library
124167
./configure --config-cache --with-pydebug --enable-shared
125-
- name: Regenerate autoconf files
126-
# Same command used by Tools/build/regen-configure.sh ($AUTORECONF)
127-
run: autoreconf -ivf -Werror
128168
- name: Build CPython
129169
run: |
130170
make -j4 regen-all
@@ -158,16 +198,28 @@ jobs:
158198
needs: check_source
159199
if: fromJSON(needs.check_source.outputs.run_tests)
160200
strategy:
201+
fail-fast: false
161202
matrix:
203+
os:
204+
- windows-latest
162205
arch:
163-
- Win32
164-
- x64
165-
- arm64
206+
- x64
166207
free-threading:
167-
- false
168-
- true
208+
- false
209+
- true
210+
include:
211+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
212+
arch: arm64
213+
free-threading: false
214+
- os: windows-latest # FIXME(diegorusso): change to os: windows-aarch64
215+
arch: arm64
216+
free-threading: true
217+
- os: windows-latest
218+
arch: Win32
219+
free-threading: false
169220
uses: ./.github/workflows/reusable-windows.yml
170221
with:
222+
os: ${{ matrix.os }}
171223
arch: ${{ matrix.arch }}
172224
free-threading: ${{ matrix.free-threading }}
173225

@@ -238,13 +290,14 @@ jobs:
238290

239291
build_ubuntu_ssltests:
240292
name: 'Ubuntu SSL tests with OpenSSL'
241-
runs-on: ubuntu-22.04
293+
runs-on: ${{ matrix.os }}
242294
timeout-minutes: 60
243295
needs: check_source
244296
if: needs.check_source.outputs.run_tests == 'true'
245297
strategy:
246298
fail-fast: false
247299
matrix:
300+
os: [ubuntu-24.04]
248301
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
249302
env:
250303
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -253,6 +306,8 @@ jobs:
253306
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
254307
steps:
255308
- uses: actions/checkout@v4
309+
with:
310+
persist-credentials: false
256311
- name: Runner image version
257312
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
258313
- name: Restore config.cache
@@ -274,7 +329,7 @@ jobs:
274329
uses: actions/cache@v4
275330
with:
276331
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
277-
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
332+
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
278333
- name: Install OpenSSL
279334
if: steps.cache-openssl.outputs.cache-hit != 'true'
280335
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
@@ -304,7 +359,7 @@ jobs:
304359

305360
test_hypothesis:
306361
name: "Hypothesis tests on Ubuntu"
307-
runs-on: ubuntu-22.04
362+
runs-on: ubuntu-24.04
308363
timeout-minutes: 60
309364
needs: check_source
310365
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
@@ -313,6 +368,8 @@ jobs:
313368
PYTHONSTRICTEXTENSIONBUILD: 1
314369
steps:
315370
- uses: actions/checkout@v4
371+
with:
372+
persist-credentials: false
316373
- name: Register gcc problem matcher
317374
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
318375
- name: Install Dependencies
@@ -395,7 +452,7 @@ jobs:
395452
#
396453
# (GH-104097) test_sysconfig is skipped because it has tests that are
397454
# failing when executed from inside a virtual environment.
398-
${{ env.VENV_PYTHON }} -m test \
455+
"${VENV_PYTHON}" -m test \
399456
-W \
400457
-o \
401458
-j4 \
@@ -417,16 +474,21 @@ jobs:
417474

418475
build_asan:
419476
name: 'Address sanitizer'
420-
runs-on: ubuntu-22.04
477+
runs-on: ${{ matrix.os }}
421478
timeout-minutes: 60
422479
needs: check_source
423480
if: needs.check_source.outputs.run_tests == 'true'
481+
strategy:
482+
matrix:
483+
os: [ubuntu-24.04]
424484
env:
425485
OPENSSL_VER: 3.0.15
426486
PYTHONSTRICTEXTENSIONBUILD: 1
427487
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
428488
steps:
429489
- uses: actions/checkout@v4
490+
with:
491+
persist-credentials: false
430492
- name: Runner image version
431493
run: echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
432494
- name: Restore config.cache
@@ -452,7 +514,7 @@ jobs:
452514
uses: actions/cache@v4
453515
with:
454516
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
455-
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
517+
key: ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
456518
- name: Install OpenSSL
457519
if: steps.cache-openssl.outputs.cache-hit != 'true'
458520
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
@@ -542,6 +604,7 @@ jobs:
542604
needs:
543605
- check_source # Transitive dependency, needed to access `run_tests` value
544606
- check-docs
607+
- check_autoconf_regen
545608
- check_generated_files
546609
- build_macos
547610
- build_ubuntu
@@ -577,6 +640,7 @@ jobs:
577640
${{
578641
needs.check_source.outputs.run_tests != 'true'
579642
&& '
643+
check_autoconf_regen,
580644
check_generated_files,
581645
build_macos,
582646
build_ubuntu,

.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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
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
@@ -103,6 +105,8 @@ jobs:
103105
CC: ${{ matrix.compiler }}
104106
steps:
105107
- uses: actions/checkout@v4
108+
with:
109+
persist-credentials: false
106110
- uses: actions/setup-python@v5
107111
with:
108112
python-version: '3.11'
@@ -169,6 +173,8 @@ jobs:
169173
runs-on: ubuntu-latest
170174
steps:
171175
- uses: actions/checkout@v4
176+
with:
177+
persist-credentials: false
172178
- uses: actions/setup-python@v5
173179
with:
174180
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"

.github/workflows/mypy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,11 @@ jobs:
5151
timeout-minutes: 10
5252
steps:
5353
- uses: actions/checkout@v4
54+
with:
55+
persist-credentials: false
5456
- uses: actions/setup-python@v5
5557
with:
56-
python-version: "3.11"
58+
python-version: "3.13"
5759
cache: pip
5860
cache-dependency-path: Tools/requirements-dev.txt
5961
- run: pip install -r Tools/requirements-dev.txt

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

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

4-
# autoconf-archive is needed by autoreconf (check_generated_files job)
54
apt-get -yq install \
65
build-essential \
76
pkg-config \
8-
autoconf-archive \
97
ccache \
108
gdb \
119
lcov \
@@ -15,7 +13,6 @@ apt-get -yq install \
1513
libgdbm-dev \
1614
libgdbm-compat-dev \
1715
liblzma-dev \
18-
libmpdec-dev \
1916
libncurses5-dev \
2017
libreadline6-dev \
2118
libsqlite3-dev \

.github/workflows/require-pr-label.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ on:
44
pull_request:
55
types: [opened, reopened, labeled, unlabeled, synchronize]
66

7-
permissions:
8-
issues: write
9-
pull-requests: write
10-
117
jobs:
128
label:
139
name: DO-NOT-MERGE / unresolved review
1410
if: github.repository_owner == 'python'
1511
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
pull-requests: write
1615
timeout-minutes: 10
1716

1817
steps:

.github/workflows/reusable-change-detection.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
---
2-
3-
name: Change detection
1+
name: Reusable change detection
42

53
on: # yamllint disable-line rule:truthy
64
workflow_call:
@@ -63,6 +61,8 @@ jobs:
6361
- run: >-
6462
echo '${{ github.event_name }}'
6563
- uses: actions/checkout@v4
64+
with:
65+
persist-credentials: false
6666
- name: Check for source changes
6767
id: check
6868
run: |

0 commit comments

Comments
 (0)