Skip to content

Commit e8f0532

Browse files
author
Forest
committed
Merge branch 'main' into imaplib-idle
2 parents 8d78010 + 285c1c4 commit e8f0532

File tree

1,162 files changed

+68894
-44625
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,162 files changed

+68894
-44625
lines changed

.github/CODEOWNERS

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

77
# GitHub
8-
.github/** @ezio-melotti @hugovk
8+
.github/** @ezio-melotti @hugovk @AA-Turner
99

1010
# pre-commit
1111
.pre-commit-config.yaml @hugovk @AlexWaygood
12-
.ruff.toml @hugovk @AlexWaygood
12+
.ruff.toml @hugovk @AlexWaygood @AA-Turner
1313

1414
# Build system
1515
configure* @erlend-aasland @corona10
@@ -56,6 +56,14 @@ Tools/c-analyzer/ @ericsnowcurrently
5656
# dbm
5757
**/*dbm* @corona10 @erlend-aasland @serhiy-storchaka
5858

59+
# Doc/ tools
60+
Doc/conf.py @AA-Turner @hugovk
61+
Doc/Makefile @AA-Turner @hugovk
62+
Doc/make.bat @AA-Turner @hugovk
63+
Doc/requirements.txt @AA-Turner @hugovk
64+
Doc/_static/** @AA-Turner @hugovk
65+
Doc/tools/** @AA-Turner @hugovk
66+
5967
# runtime state/lifecycle
6068
**/*pylifecycle* @ericsnowcurrently
6169
**/*pystate* @ericsnowcurrently
@@ -96,13 +104,14 @@ Doc/library/site.rst @FFY00
96104
Lib/test/test_except*.py @iritkatriel
97105
Objects/exceptions.c @iritkatriel
98106

99-
# Hashing
100-
**/*hashlib* @gpshead @tiran
107+
# Hashing & cryptographic primitives
108+
**/*hashlib* @gpshead @tiran @picnixz
101109
**/*pyhash* @gpshead @tiran
102-
**/sha* @gpshead @tiran
103-
Modules/md5* @gpshead @tiran
104-
**/*blake* @gpshead @tiran
110+
**/sha* @gpshead @tiran @picnixz
111+
Modules/md5* @gpshead @tiran @picnixz
112+
**/*blake* @gpshead @tiran @picnixz
105113
Modules/_hacl/** @gpshead
114+
**/*hmac* @gpshead @picnixz
106115

107116
# logging
108117
**/*logging* @vsajip
@@ -292,6 +301,10 @@ Lib/configparser.py @jaraco
292301
Lib/test/test_configparser.py @jaraco
293302

294303
# Doc sections
295-
Doc/reference/ @willingc
304+
Doc/reference/ @willingc @AA-Turner
296305

297306
**/*weakref* @kumaraditya303
307+
308+
# Colorize
309+
Lib/_colorize.py @hugovk
310+
Lib/test/test__colorize.py @hugovk

.github/actionlint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
self-hosted-runner:
2-
labels: ["ubuntu-24.04-aarch64", "windows-aarch64"]
2+
labels: ["windows-aarch64"]
33

44
config-variables: null
55

66
paths:
77
.github/workflows/**/*.yml:
88
ignore:
99
- 1st argument of function call is not assignable
10-
- SC2(015|038|086|091|097|098|129|155)
10+
- SC2(015|038|086|091|097|098|129|155)

.github/workflows/build.yml

Lines changed: 77 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ concurrency:
1818
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
1919
cancel-in-progress: true
2020

21+
env:
22+
FORCE_COLOR: 1
23+
2124
jobs:
2225
check_source:
2326
name: Change detection
@@ -46,7 +49,7 @@ jobs:
4649
# reproducible: to get the same tools versions (autoconf, aclocal, ...)
4750
runs-on: ubuntu-24.04
4851
container:
49-
image: ghcr.io/python/autoconf:2024.11.11.11786316759
52+
image: ghcr.io/python/autoconf:2025.01.02.12581854023
5053
timeout-minutes: 60
5154
needs: check_source
5255
if: needs.check_source.outputs.run_tests == 'true'
@@ -58,11 +61,12 @@ jobs:
5861
- uses: actions/checkout@v4
5962
with:
6063
fetch-depth: 1
64+
persist-credentials: false
6165
- name: Runner image version
6266
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6367
- name: Check Autoconf and aclocal versions
6468
run: |
65-
grep "Generated by GNU Autoconf 2.71" configure
69+
grep "Generated by GNU Autoconf 2.72" configure
6670
grep "aclocal 1.16.5" aclocal.m4
6771
grep -q "runstatedir" configure
6872
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
@@ -94,6 +98,8 @@ jobs:
9498
if: needs.check_source.outputs.run_tests == 'true'
9599
steps:
96100
- uses: actions/checkout@v4
101+
with:
102+
persist-credentials: false
97103
- uses: actions/setup-python@v5
98104
with:
99105
python-version: '3.x'
@@ -120,7 +126,7 @@ jobs:
120126
- name: Build CPython
121127
run: |
122128
make -j4 regen-all
123-
make regen-stdlib-module-names regen-sbom
129+
make regen-stdlib-module-names regen-sbom regen-unicodedata
124130
- name: Check for changes
125131
run: |
126132
git add -u
@@ -228,17 +234,33 @@ jobs:
228234
name: >-
229235
Ubuntu
230236
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
237+
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
231238
needs: check_source
232239
if: needs.check_source.outputs.run_tests == 'true'
233240
strategy:
234241
matrix:
242+
bolt:
243+
- false
244+
- true
235245
free-threading:
236246
- false
237247
- true
248+
os:
249+
- ubuntu-24.04
250+
- ubuntu-24.04-arm
251+
exclude:
252+
# Do not test BOLT with free-threading, to conserve resources
253+
- bolt: true
254+
free-threading: true
255+
# BOLT currently crashes during instrumentation on aarch64
256+
- os: ubuntu-24.04-arm
257+
bolt: true
238258
uses: ./.github/workflows/reusable-ubuntu.yml
239259
with:
240260
config_hash: ${{ needs.check_source.outputs.config_hash }}
261+
bolt-optimizations: ${{ matrix.bolt }}
241262
free-threading: ${{ matrix.free-threading }}
263+
os: ${{ matrix.os }}
242264

243265
build_ubuntu_ssltests:
244266
name: 'Ubuntu SSL tests with OpenSSL'
@@ -259,6 +281,8 @@ jobs:
259281
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
260282
steps:
261283
- uses: actions/checkout@v4
284+
with:
285+
persist-credentials: false
262286
- name: Runner image version
263287
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
264288
- name: Restore config.cache
@@ -319,6 +343,8 @@ jobs:
319343
PYTHONSTRICTEXTENSIONBUILD: 1
320344
steps:
321345
- uses: actions/checkout@v4
346+
with:
347+
persist-credentials: false
322348
- name: Register gcc problem matcher
323349
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
324350
- name: Install Dependencies
@@ -402,7 +428,7 @@ jobs:
402428
#
403429
# (GH-104097) test_sysconfig is skipped because it has tests that are
404430
# failing when executed from inside a virtual environment.
405-
${{ env.VENV_PYTHON }} -m test \
431+
"${VENV_PYTHON}" -m test \
406432
-W \
407433
-o \
408434
-j4 \
@@ -437,6 +463,8 @@ jobs:
437463
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
438464
steps:
439465
- uses: actions/checkout@v4
466+
with:
467+
persist-credentials: false
440468
- name: Runner image version
441469
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
442470
- name: Restore config.cache
@@ -484,26 +512,59 @@ jobs:
484512
run: xvfb-run make ci
485513

486514
build_tsan:
487-
name: 'Thread sanitizer'
515+
name: >-
516+
Thread sanitizer
517+
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
488518
needs: check_source
489519
if: needs.check_source.outputs.run_tests == 'true'
520+
strategy:
521+
matrix:
522+
free-threading:
523+
- false
524+
- true
490525
uses: ./.github/workflows/reusable-tsan.yml
491526
with:
492527
config_hash: ${{ needs.check_source.outputs.config_hash }}
493-
options: ./configure --config-cache --with-thread-sanitizer --with-pydebug
494-
suppressions_path: Tools/tsan/supressions.txt
495-
tsan_logs_artifact_name: tsan-logs-default
528+
free-threading: ${{ matrix.free-threading }}
496529

497-
build_tsan_free_threading:
498-
name: 'Thread sanitizer (free-threading)'
530+
cross-build-linux:
531+
name: Cross build Linux
532+
runs-on: ubuntu-latest
499533
needs: check_source
500534
if: needs.check_source.outputs.run_tests == 'true'
501-
uses: ./.github/workflows/reusable-tsan.yml
502-
with:
503-
config_hash: ${{ needs.check_source.outputs.config_hash }}
504-
options: ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
505-
suppressions_path: Tools/tsan/suppressions_free_threading.txt
506-
tsan_logs_artifact_name: tsan-logs-free-threading
535+
steps:
536+
- uses: actions/checkout@v4
537+
with:
538+
persist-credentials: false
539+
- name: Runner image version
540+
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
541+
- name: Restore config.cache
542+
uses: actions/cache@v4
543+
with:
544+
path: config.cache
545+
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
546+
- name: Register gcc problem matcher
547+
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
548+
- name: Set build dir
549+
run:
550+
# an absolute path outside of the working directoy
551+
echo "BUILD_DIR=$(realpath ${{ github.workspace }}/../build)" >> "$GITHUB_ENV"
552+
- name: Install Dependencies
553+
run: sudo ./.github/workflows/posix-deps-apt.sh
554+
- name: Configure host build
555+
run: ./configure --prefix="$BUILD_DIR/host-python"
556+
- name: Install host Python
557+
run: make -j8 install
558+
- name: Run test subset with host build
559+
run: |
560+
"$BUILD_DIR/host-python/bin/python3" -m test test_sysconfig test_site test_embed
561+
- name: Configure cross build
562+
run: ./configure --prefix="$BUILD_DIR/cross-python" --with-build-python="$BUILD_DIR/host-python/bin/python3"
563+
- name: Install cross Python
564+
run: make -j8 install
565+
- name: Run test subset with host build
566+
run: |
567+
"$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed
507568
508569
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
509570
cifuzz:
@@ -563,7 +624,6 @@ jobs:
563624
- test_hypothesis
564625
- build_asan
565626
- build_tsan
566-
- build_tsan_free_threading
567627
- cifuzz
568628

569629
runs-on: ubuntu-latest
@@ -597,7 +657,6 @@ jobs:
597657
build_windows,
598658
build_asan,
599659
build_tsan,
600-
build_tsan_free_threading,
601660
'
602661
|| ''
603662
}}

.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: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,18 @@ concurrency:
2525
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2626
cancel-in-progress: true
2727

28+
env:
29+
FORCE_COLOR: 1
30+
2831
jobs:
2932
interpreter:
3033
name: Interpreter (Debug)
31-
runs-on: ubuntu-22.04
34+
runs-on: ubuntu-24.04
3235
timeout-minutes: 90
3336
steps:
3437
- uses: actions/checkout@v4
38+
with:
39+
persist-credentials: false
3540
- name: Build tier two interpreter
3641
run: |
3742
./configure --enable-experimental-jit=interpreter --with-pydebug
@@ -78,12 +83,14 @@ jobs:
7883
runner: macos-14
7984
- target: x86_64-unknown-linux-gnu/gcc
8085
architecture: x86_64
81-
runner: ubuntu-22.04
86+
runner: ubuntu-24.04
8287
- target: aarch64-unknown-linux-gnu/gcc
8388
architecture: aarch64
84-
runner: ubuntu-22.04
89+
runner: ubuntu-24.04-arm
8590
steps:
8691
- uses: actions/checkout@v4
92+
with:
93+
persist-credentials: false
8794
- uses: actions/setup-python@v5
8895
with:
8996
python-version: '3.11'
@@ -104,7 +111,7 @@ jobs:
104111
105112
# The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966.
106113
# This is a bug in the macOS runner image where the pre-installed Python is installed in the same
107-
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
114+
# directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes
108115
# the symlink to the pre-installed Python so that the Homebrew Python is used instead.
109116
- name: Native macOS
110117
if: runner.os == 'macOS'
@@ -118,43 +125,26 @@ jobs:
118125
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
119126
120127
- name: Native Linux
121-
if: runner.os == 'Linux' && matrix.architecture == 'x86_64'
128+
if: runner.os == 'Linux'
122129
run: |
123130
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
124131
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
125132
./configure --enable-experimental-jit ${{ matrix.debug && '--with-pydebug' || '' }}
126133
make all --jobs 4
127134
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
128135
129-
- name: Emulated Linux
130-
if: runner.os == 'Linux' && matrix.architecture != 'x86_64'
131-
# The --ignorefile on ./python -m test is used to exclude tests known to fail when running on an emulated Linux.
132-
run: |
133-
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
134-
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
135-
./configure --prefix="$(pwd)/../build"
136-
make install --jobs 4
137-
make clean --jobs 4
138-
export HOST=${{ matrix.architecture }}-linux-gnu
139-
sudo apt install --yes "gcc-$HOST" qemu-user
140-
export QEMU_LD_PREFIX="/usr/$HOST"
141-
CC="$HOST-gcc" \
142-
CPP="$HOST-gcc --preprocess" \
143-
HOSTRUNNER=qemu-${{ matrix.architecture }} \
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
145-
make all --jobs 4
146-
./python -m test --ignorefile=Tools/jit/ignore-tests-emulated-linux.txt --multiprocess 0 --timeout 4500 --verbose2 --verbose3
147-
148136
jit-with-disabled-gil:
149137
name: Free-Threaded (Debug)
150138
needs: interpreter
151-
runs-on: ubuntu-22.04
139+
runs-on: ubuntu-24.04
152140
strategy:
153141
matrix:
154142
llvm:
155143
- 19
156144
steps:
157145
- uses: actions/checkout@v4
146+
with:
147+
persist-credentials: false
158148
- uses: actions/setup-python@v5
159149
with:
160150
python-version: '3.11'

0 commit comments

Comments
 (0)