Skip to content

Commit 1925c7d

Browse files
authored
Merge branch 'main' into gh-127975
2 parents 5e870a0 + c07ac3c commit 1925c7d

File tree

1,031 files changed

+59303
-39850
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,031 files changed

+59303
-39850
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: 72 additions & 22 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'
@@ -228,24 +234,31 @@ 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
238248
os:
239249
- ubuntu-24.04
240-
- ubuntu-24.04-aarch64
241-
is-fork: # only used for the exclusion trick
242-
- ${{ github.repository_owner != 'python' }}
250+
- ubuntu-24.04-arm
243251
exclude:
244-
- os: ubuntu-24.04-aarch64
245-
is-fork: true
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
246258
uses: ./.github/workflows/reusable-ubuntu.yml
247259
with:
248260
config_hash: ${{ needs.check_source.outputs.config_hash }}
261+
bolt-optimizations: ${{ matrix.bolt }}
249262
free-threading: ${{ matrix.free-threading }}
250263
os: ${{ matrix.os }}
251264

@@ -268,6 +281,8 @@ jobs:
268281
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
269282
steps:
270283
- uses: actions/checkout@v4
284+
with:
285+
persist-credentials: false
271286
- name: Runner image version
272287
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
273288
- name: Restore config.cache
@@ -328,6 +343,8 @@ jobs:
328343
PYTHONSTRICTEXTENSIONBUILD: 1
329344
steps:
330345
- uses: actions/checkout@v4
346+
with:
347+
persist-credentials: false
331348
- name: Register gcc problem matcher
332349
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
333350
- name: Install Dependencies
@@ -411,7 +428,7 @@ jobs:
411428
#
412429
# (GH-104097) test_sysconfig is skipped because it has tests that are
413430
# failing when executed from inside a virtual environment.
414-
${{ env.VENV_PYTHON }} -m test \
431+
"${VENV_PYTHON}" -m test \
415432
-W \
416433
-o \
417434
-j4 \
@@ -446,6 +463,8 @@ jobs:
446463
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
447464
steps:
448465
- uses: actions/checkout@v4
466+
with:
467+
persist-credentials: false
449468
- name: Runner image version
450469
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
451470
- name: Restore config.cache
@@ -493,26 +512,59 @@ jobs:
493512
run: xvfb-run make ci
494513

495514
build_tsan:
496-
name: 'Thread sanitizer'
515+
name: >-
516+
Thread sanitizer
517+
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
497518
needs: check_source
498519
if: needs.check_source.outputs.run_tests == 'true'
520+
strategy:
521+
matrix:
522+
free-threading:
523+
- false
524+
- true
499525
uses: ./.github/workflows/reusable-tsan.yml
500526
with:
501527
config_hash: ${{ needs.check_source.outputs.config_hash }}
502-
options: ./configure --config-cache --with-thread-sanitizer --with-pydebug
503-
suppressions_path: Tools/tsan/supressions.txt
504-
tsan_logs_artifact_name: tsan-logs-default
528+
free-threading: ${{ matrix.free-threading }}
505529

506-
build_tsan_free_threading:
507-
name: 'Thread sanitizer (free-threading)'
530+
cross-build-linux:
531+
name: Cross build Linux
532+
runs-on: ubuntu-latest
508533
needs: check_source
509534
if: needs.check_source.outputs.run_tests == 'true'
510-
uses: ./.github/workflows/reusable-tsan.yml
511-
with:
512-
config_hash: ${{ needs.check_source.outputs.config_hash }}
513-
options: ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
514-
suppressions_path: Tools/tsan/suppressions_free_threading.txt
515-
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
516568
517569
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
518570
cifuzz:
@@ -572,7 +624,6 @@ jobs:
572624
- test_hypothesis
573625
- build_asan
574626
- build_tsan
575-
- build_tsan_free_threading
576627
- cifuzz
577628

578629
runs-on: ubuntu-latest
@@ -606,7 +657,6 @@ jobs:
606657
build_windows,
607658
build_asan,
608659
build_tsan,
609-
build_tsan_free_threading,
610660
'
611661
|| ''
612662
}}

.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: 11 additions & 4 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)
3134
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
@@ -81,10 +86,11 @@ jobs:
8186
runner: ubuntu-24.04
8287
- target: aarch64-unknown-linux-gnu/gcc
8388
architecture: aarch64
84-
# Forks don't have access to our paid AArch64 runners. These jobs are skipped below:
85-
runner: ${{ github.repository_owner == 'python' && 'ubuntu-24.04-aarch64' || 'ubuntu-24.04' }}
89+
runner: ubuntu-24.04-arm
8690
steps:
8791
- uses: actions/checkout@v4
92+
with:
93+
persist-credentials: false
8894
- uses: actions/setup-python@v5
8995
with:
9096
python-version: '3.11'
@@ -119,8 +125,7 @@ jobs:
119125
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
120126
121127
- name: Native Linux
122-
# Forks don't have access to our paid AArch64 runners. Skip those:
123-
if: runner.os == 'Linux' && (matrix.architecture == 'x86_64' || github.repository_owner == 'python')
128+
if: runner.os == 'Linux'
124129
run: |
125130
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
126131
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"
@@ -138,6 +143,8 @@ jobs:
138143
- 19
139144
steps:
140145
- uses: actions/checkout@v4
146+
with:
147+
persist-credentials: false
141148
- uses: actions/setup-python@v5
142149
with:
143150
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ 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:
5658
python-version: "3.13"

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

Lines changed: 6 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-dnm:
139
name: DO-NOT-MERGE
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:
@@ -28,6 +27,9 @@ jobs:
2827
name: Unresolved review
2928
if: github.repository_owner == 'python'
3029
runs-on: ubuntu-latest
30+
permissions:
31+
issues: write
32+
pull-requests: write
3133
timeout-minutes: 10
3234

3335
steps:

0 commit comments

Comments
 (0)