Skip to content

Commit 597d4f8

Browse files
authored
Merge branch 'main' into dict_fromkeys_opt
2 parents 1877a30 + 28aa32d commit 597d4f8

248 files changed

Lines changed: 6340 additions & 3017 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.

.github/actionlint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
config-variables: null
22

3+
# Pending release of actionlint > 1.7.12 for ubuntu-26.04* support:
4+
# https://github.com/rhysd/actionlint/pull/683
5+
self-hosted-runner:
6+
labels:
7+
- ubuntu-26.04
8+
- ubuntu-26.04-arm
9+
310
paths:
411
.github/workflows/**/*.yml:
512
ignore:

.github/workflows/add-issue-header.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ permissions:
1717

1818
jobs:
1919
add-header:
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-slim
2121
permissions:
2222
issues: write
2323
timeout-minutes: 5
2424
steps:
25-
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
25+
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
2626
with:
2727
# language=JavaScript
2828
script: |

.github/workflows/build.yml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
name: 'Check if Autoconf files are up to date'
5454
# Don't use ubuntu-latest but a specific version to make the job
5555
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
56-
runs-on: ubuntu-24.04
56+
runs-on: ubuntu-26.04
5757
container:
5858
image: ghcr.io/python/autoconf:2025.01.02.12581854023
5959
timeout-minutes: 60
@@ -64,7 +64,7 @@ jobs:
6464
run: |
6565
apt update && apt install git -yq
6666
git config --global --add safe.directory "$GITHUB_WORKSPACE"
67-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
67+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6868
with:
6969
fetch-depth: 1
7070
persist-credentials: false
@@ -96,12 +96,12 @@ jobs:
9696
name: 'Check if generated files are up to date'
9797
# Don't use ubuntu-latest but a specific version to make the job
9898
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
99-
runs-on: ubuntu-24.04
99+
runs-on: ubuntu-26.04
100100
timeout-minutes: 60
101101
needs: build-context
102102
if: needs.build-context.outputs.run-tests == 'true'
103103
steps:
104-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
104+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
105105
with:
106106
persist-credentials: false
107107
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -239,18 +239,18 @@ jobs:
239239
- false
240240
- true
241241
os:
242-
- ubuntu-24.04
243-
- ubuntu-24.04-arm
242+
- ubuntu-26.04
243+
- ubuntu-26.04-arm
244244
exclude:
245245
# Do not test BOLT with free-threading, to conserve resources
246246
- bolt: true
247247
free-threading: true
248248
# BOLT currently crashes during instrumentation on aarch64
249-
- os: ubuntu-24.04-arm
249+
- os: ubuntu-26.04-arm
250250
bolt: true
251251
include:
252252
# Enable CPU-intensive tests on ARM (default build only)
253-
- os: ubuntu-24.04-arm
253+
- os: ubuntu-26.04-arm
254254
bolt: false
255255
free-threading: false
256256
test-opts: '-u cpu'
@@ -270,7 +270,7 @@ jobs:
270270
strategy:
271271
fail-fast: false
272272
matrix:
273-
os: [ubuntu-24.04]
273+
os: [ubuntu-26.04]
274274
ssllib:
275275
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
276276
## OpenSSL
@@ -291,7 +291,7 @@ jobs:
291291
SSLLIB_DIR: ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}
292292
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}/lib
293293
steps:
294-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
294+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
295295
with:
296296
persist-credentials: false
297297
- name: Runner image version
@@ -346,15 +346,15 @@ jobs:
346346
- arch: aarch64
347347
runs-on: macos-26
348348
- arch: x86_64
349-
runs-on: ubuntu-24.04
349+
runs-on: ubuntu-26.04
350350

351351
runs-on: ${{ matrix.runs-on }}
352352
steps:
353-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
353+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
354354
with:
355355
persist-credentials: false
356356
- name: Build and test
357-
run: python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
357+
run: JAVA_HOME="${JAVA_HOME_21_X64:-$JAVA_HOME_21_arm64}" python3 Platforms/Android ci --fast-ci ${{ matrix.arch }}-linux-android
358358

359359
build-ios:
360360
name: iOS
@@ -363,7 +363,7 @@ jobs:
363363
timeout-minutes: 60
364364
runs-on: macos-14
365365
steps:
366-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
366+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
367367
with:
368368
persist-credentials: false
369369

@@ -393,15 +393,15 @@ jobs:
393393

394394
test-hypothesis:
395395
name: "Hypothesis tests on Ubuntu"
396-
runs-on: ubuntu-24.04
396+
runs-on: ubuntu-26.04
397397
timeout-minutes: 60
398398
needs: build-context
399399
if: needs.build-context.outputs.run-ubuntu == 'true'
400400
env:
401401
OPENSSL_VER: 3.5.7
402402
PYTHONSTRICTEXTENSIONBUILD: 1
403403
steps:
404-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
404+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
405405
with:
406406
persist-credentials: false
407407
- name: Register gcc problem matcher
@@ -504,13 +504,13 @@ jobs:
504504
strategy:
505505
fail-fast: false
506506
matrix:
507-
os: [ubuntu-24.04]
507+
os: [ubuntu-26.04]
508508
env:
509509
OPENSSL_VER: 3.5.7
510510
PYTHONSTRICTEXTENSIONBUILD: 1
511511
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
512512
steps:
513-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
513+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
514514
with:
515515
persist-credentials: false
516516
- name: Runner image version
@@ -519,10 +519,6 @@ jobs:
519519
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
520520
- name: Install dependencies
521521
run: sudo ./.github/workflows/posix-deps-apt.sh
522-
- name: Set up GCC-10 for ASAN
523-
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
524-
with:
525-
version: 10
526522
- name: Configure OpenSSL env vars
527523
run: |
528524
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
@@ -572,12 +568,12 @@ jobs:
572568

573569
cross-build-linux:
574570
name: Cross build Linux
575-
runs-on: ubuntu-latest
571+
runs-on: ubuntu-26.04
576572
timeout-minutes: 60
577573
needs: build-context
578574
if: needs.build-context.outputs.run-ubuntu == 'true'
579575
steps:
580-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
576+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
581577
with:
582578
persist-credentials: false
583579
- name: Runner image version

.github/workflows/jit.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ env:
2929
jobs:
3030
interpreter:
3131
name: Interpreter (Debug)
32-
runs-on: ubuntu-24.04
32+
runs-on: ubuntu-26.04
3333
timeout-minutes: 60
3434
steps:
35-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
35+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3636
with:
3737
persist-credentials: false
3838
- name: Install dependencies
@@ -72,7 +72,7 @@ jobs:
7272
architecture: ARM64
7373
runner: windows-11-arm
7474
steps:
75-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
75+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7676
with:
7777
persist-credentials: false
7878
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -102,11 +102,11 @@ jobs:
102102
- false
103103
include:
104104
- target: x86_64-apple-darwin/clang
105-
runner: macos-15-intel
105+
runner: macos-26-intel
106106
- target: aarch64-apple-darwin/clang
107-
runner: macos-15
107+
runner: macos-26
108108
steps:
109-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
109+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
110110
with:
111111
persist-credentials: false
112112
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -145,11 +145,11 @@ jobs:
145145
- false
146146
include:
147147
- target: x86_64-unknown-linux-gnu/gcc
148-
runner: ubuntu-24.04
148+
runner: ubuntu-26.04
149149
- target: aarch64-unknown-linux-gnu/gcc
150-
runner: ubuntu-24.04-arm
150+
runner: ubuntu-26.04-arm
151151
steps:
152-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
152+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
153153
with:
154154
persist-credentials: false
155155
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -160,8 +160,7 @@ jobs:
160160
sudo ./.github/workflows/posix-deps-apt.sh
161161
- name: Build
162162
run: |
163-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
164-
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
163+
# On ubuntu-26.04 image, clang is clang-21 by default
165164
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
166165
make all --jobs 4
167166
- name: Test
@@ -171,7 +170,7 @@ jobs:
171170
linux-extras:
172171
name: ${{ matrix.name }}
173172

174-
runs-on: ubuntu-24.04
173+
runs-on: ubuntu-26.04
175174
timeout-minutes: 60
176175
strategy:
177176
fail-fast: false
@@ -191,7 +190,7 @@ jobs:
191190
use_clang: true
192191
run_tests: false
193192
steps:
194-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
193+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
195194
with:
196195
persist-credentials: false
197196
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -202,8 +201,7 @@ jobs:
202201
sudo ./.github/workflows/posix-deps-apt.sh
203202
- name: Build
204203
run: |
205-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ env.LLVM_VERSION }}
206-
export PATH="$(llvm-config-${{ env.LLVM_VERSION }} --bindir):$PATH"
204+
# On ubuntu-26.04 image, clang is clang-21 by default
207205
if [ "${{ matrix.use_clang }}" = "true" ]; then
208206
export CC=clang-${{ env.LLVM_VERSION }}
209207
fi

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
timeout-minutes: 10
2020

2121
steps:
22-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2323
with:
2424
persist-credentials: false
25-
- uses: j178/prek-action@0bb87d7f00b0c99306c8bcb8b8beba1eb581c037 # v1.1.1
25+
- uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
"Tools/peg_generator",
6767
]
6868
steps:
69-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
69+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
7070
with:
7171
persist-credentials: false
7272
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

.github/workflows/new-bugs-announce-notifier.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
notify-new-bugs-announce:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-slim
1414
permissions:
1515
issues: read
1616
timeout-minutes: 10
@@ -20,7 +20,7 @@ jobs:
2020
node-version: 20
2121
- run: npm install mailgun.js form-data
2222
- name: Send notification
23-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
23+
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
2424
env:
2525
MAILGUN_API_KEY: ${{ secrets.MAILGUN_PYTHON_ORG_MAILGUN_KEY }}
2626
with:

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,23 @@ apt-get -yq --no-install-recommends install \
55
build-essential \
66
pkg-config \
77
cmake \
8+
curl \
89
gdb \
910
lcov \
1011
libb2-dev \
1112
libbz2-dev \
1213
libffi-dev \
13-
libgdbm-dev \
1414
libgdbm-compat-dev \
15+
libgdbm-dev \
1516
liblzma-dev \
17+
libmpdec-dev \
1618
libncurses5-dev \
1719
libreadline6-dev \
1820
libsqlite3-dev \
1921
libssl-dev \
2022
libzstd-dev \
21-
lzma \
22-
lzma-dev \
2323
strace \
2424
tk-dev \
2525
uuid-dev \
2626
xvfb \
2727
zlib1g-dev
28-
29-
# Workaround missing libmpdec-dev on ubuntu 24.04 by building mpdecimal
30-
# from source. ppa:ondrej/php (launchpad.net) are unreliable
31-
# (https://status.canonical.com) so fetch the tarball directly
32-
# from the upstream host.
33-
# https://www.bytereef.org/mpdecimal/
34-
MPDECIMAL_VERSION=4.0.1
35-
curl -fsSL "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${MPDECIMAL_VERSION}.tar.gz" \
36-
| tar -xz -C /tmp
37-
(cd "/tmp/mpdecimal-${MPDECIMAL_VERSION}" \
38-
&& ./configure --prefix=/usr/local \
39-
&& make -j"$(nproc)" \
40-
&& make install)
41-
ldconfig

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
label-dnm:
1212
name: DO-NOT-MERGE
1313
if: github.repository_owner == 'python'
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-slim
1515
permissions:
1616
pull-requests: read
1717
timeout-minutes: 10
@@ -28,7 +28,7 @@ jobs:
2828
label-reviews:
2929
name: Unresolved review
3030
if: github.repository_owner == 'python'
31-
runs-on: ubuntu-latest
31+
runs-on: ubuntu-slim
3232
permissions:
3333
pull-requests: read
3434
timeout-minutes: 10

.github/workflows/reusable-check-c-api-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 5
1717
steps:
18-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1919
with:
2020
persist-credentials: false
2121
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0

0 commit comments

Comments
 (0)