Skip to content

Commit 40c99d7

Browse files
authored
Merge branch 'main' into fix/hashlib/error-branches-127667
2 parents d72c096 + 75f59bb commit 40c99d7

File tree

687 files changed

+44277
-34017
lines changed

Some content is hidden

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

687 files changed

+44277
-34017
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: 17 additions & 7 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'
@@ -63,7 +66,7 @@ jobs:
6366
run: echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
6467
- name: Check Autoconf and aclocal versions
6568
run: |
66-
grep "Generated by GNU Autoconf 2.71" configure
69+
grep "Generated by GNU Autoconf 2.72" configure
6770
grep "aclocal 1.16.5" aclocal.m4
6871
grep -q "runstatedir" configure
6972
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
@@ -231,24 +234,31 @@ jobs:
231234
name: >-
232235
Ubuntu
233236
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
237+
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
234238
needs: check_source
235239
if: needs.check_source.outputs.run_tests == 'true'
236240
strategy:
237241
matrix:
242+
bolt:
243+
- false
244+
- true
238245
free-threading:
239246
- false
240247
- true
241248
os:
242249
- ubuntu-24.04
243-
- ubuntu-24.04-aarch64
244-
is-fork: # only used for the exclusion trick
245-
- ${{ github.repository_owner != 'python' }}
250+
- ubuntu-24.04-arm
246251
exclude:
247-
- os: ubuntu-24.04-aarch64
248-
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
249258
uses: ./.github/workflows/reusable-ubuntu.yml
250259
with:
251260
config_hash: ${{ needs.check_source.outputs.config_hash }}
261+
bolt-optimizations: ${{ matrix.bolt }}
252262
free-threading: ${{ matrix.free-threading }}
253263
os: ${{ matrix.os }}
254264

.github/workflows/jit.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ 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)
@@ -83,8 +86,7 @@ jobs:
8386
runner: ubuntu-24.04
8487
- target: aarch64-unknown-linux-gnu/gcc
8588
architecture: aarch64
86-
# Forks don't have access to our paid AArch64 runners. These jobs are skipped below:
87-
runner: ${{ github.repository_owner == 'python' && 'ubuntu-24.04-aarch64' || 'ubuntu-24.04' }}
89+
runner: ubuntu-24.04-arm
8890
steps:
8991
- uses: actions/checkout@v4
9092
with:
@@ -123,8 +125,7 @@ jobs:
123125
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
124126
125127
- name: Native Linux
126-
# Forks don't have access to our paid AArch64 runners. Skip those:
127-
if: runner.os == 'Linux' && (matrix.architecture == 'x86_64' || github.repository_owner == 'python')
128+
if: runner.os == 'Linux'
128129
run: |
129130
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
130131
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,22 @@ jobs:
8383
# into the PR branch anyway.
8484
#
8585
# https://github.com/python/core-workflow/issues/373
86-
git diff --name-only "origin/$GITHUB_BASE_REF.." | grep -qvE '(\.rst$|^Doc|^Misc|^\.pre-commit-config\.yaml$|\.ruff\.toml$|\.md$|mypy\.ini$)' && echo "run-tests=true" >> "$GITHUB_OUTPUT" || true
86+
grep_ignore_args=(
87+
# file extensions
88+
-e '\.md$'
89+
-e '\.rst$'
90+
# top-level folders
91+
-e '^Doc/'
92+
-e '^Misc/'
93+
# configuration files
94+
-e '^\.github/CODEOWNERS$'
95+
-e '^\.pre-commit-config\.yaml$'
96+
-e '\.ruff\.toml$'
97+
-e 'mypy\.ini$'
98+
)
99+
git diff --name-only "origin/$GITHUB_BASE_REF.." \
100+
| grep -qvE "${grep_ignore_args[@]}" \
101+
&& echo "run-tests=true" >> "$GITHUB_OUTPUT" || true
87102
fi
88103
89104
# Check if we should run hypothesis tests

.github/workflows/reusable-docs.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
continue-on-error: true
6666
run: |
6767
set -Eeuo pipefail
68-
# Build docs with the '-n' (nit-picky) option; write warnings to file
69-
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going -w sphinx-warnings.txt" html
68+
# Build docs with the nit-picky option; write warnings to file
69+
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --keep-going --warning-file sphinx-warnings.txt" html
7070
- name: 'Check warnings'
7171
if: github.event_name == 'pull_request'
7272
run: |
@@ -76,30 +76,10 @@ jobs:
7676
--fail-if-improved \
7777
--fail-if-new-news-nit
7878
79-
# This build doesn't use problem matchers or check annotations
80-
build_doc_oldest_supported_sphinx:
81-
name: 'Docs (Oldest Sphinx)'
82-
runs-on: ubuntu-latest
83-
timeout-minutes: 60
84-
steps:
85-
- uses: actions/checkout@v4
86-
with:
87-
persist-credentials: false
88-
- name: 'Set up Python'
89-
uses: actions/setup-python@v5
90-
with:
91-
python-version: '3.13' # known to work with Sphinx 7.2.6
92-
cache: 'pip'
93-
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
94-
- name: 'Install build dependencies'
95-
run: make -C Doc/ venv REQUIREMENTS="requirements-oldest-sphinx.txt"
96-
- name: 'Build HTML documentation'
97-
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
98-
9979
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
10080
doctest:
10181
name: 'Doctest'
102-
runs-on: ubuntu-22.04
82+
runs-on: ubuntu-24.04
10383
timeout-minutes: 60
10484
steps:
10585
- uses: actions/checkout@v4
@@ -121,4 +101,4 @@ jobs:
121101
run: make -C Doc/ PYTHON=../python venv
122102
# Use "xvfb-run" since some doctest tests open GUI windows
123103
- name: 'Run documentation doctest'
124-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="-W --keep-going" doctest
104+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning --keep-going" doctest

.github/workflows/reusable-macos.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
required: true
1616
type: string
1717

18+
env:
19+
FORCE_COLOR: 1
20+
1821
jobs:
1922
build_macos:
2023
name: build and test (${{ inputs.os }})
@@ -45,6 +48,7 @@ jobs:
4548
brew link --overwrite tcl-tk@8
4649
- name: Configure CPython
4750
run: |
51+
MACOSX_DEPLOYMENT_TARGET=10.15 \
4852
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
4953
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \
5054
./configure \

.github/workflows/reusable-tsan.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818
required: true
1919
type: string
2020

21+
env:
22+
FORCE_COLOR: 1
23+
2124
jobs:
2225
build_tsan_reusable:
2326
name: 'Thread sanitizer'

.github/workflows/reusable-ubuntu.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
config_hash:
77
required: true
88
type: string
9+
bolt-optimizations:
10+
description: Whether to enable BOLT optimizations
11+
required: false
12+
type: boolean
13+
default: false
914
free-threading:
1015
description: Whether to use free-threaded mode
1116
required: false
@@ -16,13 +21,15 @@ on:
1621
required: true
1722
type: string
1823

24+
env:
25+
FORCE_COLOR: 1
26+
1927
jobs:
2028
build_ubuntu_reusable:
2129
name: build and test (${{ inputs.os }})
2230
timeout-minutes: 60
2331
runs-on: ${{ inputs.os }}
2432
env:
25-
FORCE_COLOR: 1
2633
OPENSSL_VER: 3.0.15
2734
PYTHONSTRICTEXTENSIONBUILD: 1
2835
TERM: linux
@@ -34,6 +41,12 @@ jobs:
3441
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
3542
- name: Install dependencies
3643
run: sudo ./.github/workflows/posix-deps-apt.sh
44+
- name: Install Clang and BOLT
45+
if: ${{ fromJSON(inputs.bolt-optimizations) }}
46+
run: |
47+
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh 19
48+
sudo apt-get install bolt-19
49+
echo PATH="$(llvm-config-19 --bindir):$PATH" >> $GITHUB_ENV
3750
- name: Configure OpenSSL env vars
3851
run: |
3952
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
@@ -73,14 +86,18 @@ jobs:
7386
key: ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ inputs.config_hash }}
7487
- name: Configure CPython out-of-tree
7588
working-directory: ${{ env.CPYTHON_BUILDDIR }}
89+
# `test_unpickle_module_race` writes to the source directory, which is
90+
# read-only during builds — so we exclude it from profiling with BOLT.
7691
run: >-
92+
PROFILE_TASK='-m test --pgo --ignore test_unpickle_module_race'
7793
../cpython-ro-srcdir/configure
7894
--config-cache
7995
--with-pydebug
8096
--enable-slower-safety
8197
--enable-safety
8298
--with-openssl="$OPENSSL_DIR"
8399
${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }}
100+
${{ fromJSON(inputs.bolt-optimizations) && '--enable-bolt' || '' }}
84101
- name: Build CPython out-of-tree
85102
if: ${{ inputs.free-threading }}
86103
working-directory: ${{ env.CPYTHON_BUILDDIR }}

.github/workflows/reusable-wasi.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
required: true
88
type: string
99

10+
env:
11+
FORCE_COLOR: 1
12+
1013
jobs:
1114
build_wasi_reusable:
1215
name: 'build and test'

0 commit comments

Comments
 (0)