Skip to content

Commit 7595c18

Browse files
Merge branch 'main' into gh-135755-document-preheader-flag
2 parents e788241 + f278afc commit 7595c18

File tree

1,122 files changed

+47590
-15301
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,122 files changed

+47590
-15301
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"image": "ghcr.io/python/devcontainer:2025.05.29.15334414373",
2+
"image": "ghcr.io/python/devcontainer:latest",
33
"onCreateCommand": [
44
// Install common tooling.
55
"dnf",

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
root = true
22

3-
[*.{py,c,cpp,h,js,rst,md,yml,yaml}]
3+
[*.{py,c,cpp,h,js,rst,md,yml,yaml,gram}]
44
trim_trailing_whitespace = true
55
insert_final_newline = true
66
indent_style = space
77

8-
[*.{py,c,cpp,h}]
8+
[*.{py,c,cpp,h,gram}]
99
indent_size = 4
1010

1111
[*.rst]

.github/CODEOWNERS

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@
44
# It uses the same pattern rule for gitignore file
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

7-
# GitHub
7+
# Azure Pipelines
8+
.azure-pipelines/ @AA-Turner
9+
10+
# GitHub & related scripts
811
.github/** @ezio-melotti @hugovk @AA-Turner
12+
Tools/build/compute-changes.py @AA-Turner
13+
Tools/build/verify_ensurepip_wheels.py @AA-Turner
914

1015
# pre-commit
11-
.pre-commit-config.yaml @hugovk @AlexWaygood
16+
.pre-commit-config.yaml @hugovk
1217
.ruff.toml @hugovk @AlexWaygood @AA-Turner
1318

14-
# Build system
15-
configure* @erlend-aasland @corona10
16-
Makefile.pre.in @erlend-aasland
17-
Modules/Setup* @erlend-aasland
19+
# Build system (autotools)
20+
configure* @erlend-aasland @corona10 @AA-Turner
21+
Makefile.pre.in @erlend-aasland @AA-Turner
22+
Modules/Setup* @erlend-aasland @AA-Turner
23+
Tools/build/regen-configure.sh @AA-Turner
1824

1925
# argparse
2026
**/*argparse* @savannahostrowski
@@ -26,7 +32,8 @@ Modules/Setup* @erlend-aasland
2632
**/*context* @1st1
2733
**/*genobject* @markshannon
2834
**/*hamt* @1st1
29-
**/*jit* @brandtbucher @savannahostrowski
35+
**/*jit* @brandtbucher @savannahostrowski @diegorusso
36+
Python/perf_jit_trampoline.c # Exclude the owners of "**/*jit*", above.
3037
Objects/set* @rhettinger
3138
Objects/dict* @methane @markshannon
3239
Objects/typevarobject.c @JelleZijlstra
@@ -66,6 +73,7 @@ Doc/make.bat @AA-Turner @hugovk
6673
Doc/requirements.txt @AA-Turner @hugovk
6774
Doc/_static/** @AA-Turner @hugovk
6875
Doc/tools/** @AA-Turner @hugovk
76+
.readthedocs.yml @AA-Turner
6977

7078
# runtime state/lifecycle
7179
**/*pylifecycle* @ericsnowcurrently @ZeroIntensity
@@ -154,6 +162,10 @@ Doc/c-api/module.rst @ericsnowcurrently
154162
**/*importlib/resources/* @jaraco @warsaw @FFY00
155163
**/*importlib/metadata/* @jaraco @warsaw
156164

165+
# Calendar
166+
Lib/calendar.py @AA-Turner
167+
Lib/test/test_calendar.py @AA-Turner
168+
157169
# Dates and times
158170
**/*datetime* @pganssle @abalkin
159171
**/*str*time* @pganssle @abalkin
@@ -204,6 +216,11 @@ Lib/test/test_ast/ @eclips4 @tomasr8
204216
# multiprocessing
205217
**/*multiprocessing* @gpshead
206218

219+
# pydoc
220+
Lib/pydoc.py @AA-Turner
221+
Lib/pydoc_data/ @AA-Turner
222+
Lib/test/test_pydoc/ @AA-Turner
223+
207224
# SQLite 3
208225
**/*sqlite* @berkerpeksag @erlend-aasland
209226

@@ -216,6 +233,11 @@ Lib/test/test_ast/ @eclips4 @tomasr8
216233
**/*pdb* @gaogaotiantian
217234
**/*bdb* @gaogaotiantian
218235

236+
# types
237+
Lib/test/test_types.py @AA-Turner
238+
Lib/types.py @AA-Turner
239+
Modules/_typesmodule.c @AA-Turner
240+
219241
# Limited C API & stable ABI
220242
Tools/build/stable_abi.py @encukou
221243
Misc/stable_abi.toml @encukou
@@ -233,6 +255,11 @@ Doc/c-api/stable.rst @encukou
233255
/Tools/msi/ @python/windows-team
234256
/Tools/nuget/ @python/windows-team
235257

258+
# Zstandard
259+
Lib/compression/zstd/ @AA-Turner
260+
Lib/test/test_zstd.py @AA-Turner
261+
Modules/_zstd/ @AA-Turner
262+
236263
# Misc
237264
**/*itertools* @rhettinger
238265
**/*collections* @rhettinger
@@ -265,6 +292,9 @@ Doc/c-api/stable.rst @encukou
265292

266293
**/*cjkcodecs* @corona10
267294

295+
# Patchcheck
296+
Tools/patchcheck/ @AA-Turner
297+
268298
# macOS
269299
/Mac/ @python/macos-team
270300
**/*osx_support* @python/macos-team
@@ -276,9 +306,9 @@ Doc/c-api/stable.rst @encukou
276306
**/*zipfile/_path/* @jaraco
277307

278308
# Argument Clinic
279-
/Tools/clinic/** @erlend-aasland
280-
/Lib/test/test_clinic.py @erlend-aasland
281-
Doc/howto/clinic.rst @erlend-aasland
309+
/Tools/clinic/** @erlend-aasland @AA-Turner
310+
/Lib/test/test_clinic.py @erlend-aasland @AA-Turner
311+
Doc/howto/clinic.rst @erlend-aasland @AA-Turner
282312

283313
# Subinterpreters
284314
**/*interpreteridobject.* @ericsnowcurrently
@@ -322,6 +352,7 @@ Lib/test/test_configparser.py @jaraco
322352

323353
# Doc sections
324354
Doc/reference/ @willingc @AA-Turner
355+
Doc/whatsnew/ @AA-Turner
325356

326357
**/*weakref* @kumaraditya303
327358

@@ -335,7 +366,7 @@ Modules/_xxtestfuzz/ @ammaraskar
335366
# t-strings
336367
**/*interpolationobject* @lysnikolaou
337368
**/*templateobject* @lysnikolaou
338-
**/*templatelib* @lysnikolaou
369+
**/*templatelib* @lysnikolaou @AA-Turner
339370
**/*tstring* @lysnikolaou
340371

341372
# Remote debugging
@@ -345,3 +376,6 @@ Modules/_remote_debugging_module.c @pablogsal @ambv @1st1
345376

346377
# gettext
347378
**/*gettext* @tomasr8
379+
380+
# Internal Docs
381+
InternalDocs/ @AA-Turner

.github/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributing to Python
44
Build Status
55
------------
66

7-
- `Buildbot status overview <https://buildbot.python.org/all/#/release_status>`_
7+
- `Buildbot status overview <https://buildbot.python.org/#/release_status>`_
88

99
- `GitHub Actions status <https://github.com/python/cpython/actions/workflows/build.yml>`_
1010

.github/workflows/build.yml

Lines changed: 125 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ jobs:
178178
free-threading: ${{ matrix.free-threading }}
179179

180180
build-windows-msi:
181-
name: >- # ${{ '' } is a hack to nest jobs under the same sidebar category
182-
Windows MSI${{ '' }}
181+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
182+
name: Windows MSI${{ '' }} # zizmor: ignore[obfuscation]
183183
needs: build-context
184184
if: fromJSON(needs.build-context.outputs.run-windows-msi)
185185
strategy:
@@ -260,7 +260,7 @@ jobs:
260260
free-threading: ${{ matrix.free-threading }}
261261
os: ${{ matrix.os }}
262262

263-
build-ubuntu-ssltests:
263+
build-ubuntu-ssltests-openssl:
264264
name: 'Ubuntu SSL tests with OpenSSL'
265265
runs-on: ${{ matrix.os }}
266266
timeout-minutes: 60
@@ -270,7 +270,7 @@ jobs:
270270
fail-fast: false
271271
matrix:
272272
os: [ubuntu-24.04]
273-
openssl_ver: [3.0.16, 3.1.8, 3.2.4, 3.3.3, 3.4.1]
273+
openssl_ver: [3.0.17, 3.2.5, 3.3.4, 3.4.2, 3.5.2]
274274
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
275275
env:
276276
OPENSSL_VER: ${{ matrix.openssl_ver }}
@@ -322,6 +322,104 @@ jobs:
322322
- name: SSL tests
323323
run: ./python Lib/test/ssltests.py
324324

325+
build-ubuntu-ssltests-awslc:
326+
name: 'Ubuntu SSL tests with AWS-LC'
327+
runs-on: ${{ matrix.os }}
328+
timeout-minutes: 60
329+
needs: build-context
330+
if: needs.build-context.outputs.run-tests == 'true'
331+
strategy:
332+
fail-fast: false
333+
matrix:
334+
os: [ubuntu-24.04]
335+
awslc_ver: [1.55.0]
336+
env:
337+
AWSLC_VER: ${{ matrix.awslc_ver}}
338+
MULTISSL_DIR: ${{ github.workspace }}/multissl
339+
OPENSSL_DIR: ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}
340+
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/aws-lc/${{ matrix.awslc_ver }}/lib
341+
steps:
342+
- uses: actions/checkout@v4
343+
with:
344+
persist-credentials: false
345+
- name: Runner image version
346+
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
347+
- name: Restore config.cache
348+
uses: actions/cache@v4
349+
with:
350+
path: config.cache
351+
key: ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
352+
- name: Register gcc problem matcher
353+
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
354+
- name: Install dependencies
355+
run: sudo ./.github/workflows/posix-deps-apt.sh
356+
- name: Configure SSL lib env vars
357+
run: |
358+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
359+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}" >> "$GITHUB_ENV"
360+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/aws-lc/${AWSLC_VER}/lib" >> "$GITHUB_ENV"
361+
- name: 'Restore AWS-LC build'
362+
id: cache-aws-lc
363+
uses: actions/cache@v4
364+
with:
365+
path: ./multissl/aws-lc/${{ matrix.awslc_ver }}
366+
key: ${{ matrix.os }}-multissl-aws-lc-${{ matrix.awslc_ver }}
367+
- name: Install AWS-LC
368+
if: steps.cache-aws-lc.outputs.cache-hit != 'true'
369+
run: |
370+
python3 Tools/ssl/multissltests.py \
371+
--steps=library \
372+
--base-directory "$MULTISSL_DIR" \
373+
--awslc ${{ matrix.awslc_ver }} \
374+
--system Linux
375+
- name: Add ccache to PATH
376+
run: |
377+
echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
378+
- name: Configure ccache action
379+
uses: hendrikmuhs/[email protected]
380+
with:
381+
save: false
382+
- name: Configure CPython
383+
run: |
384+
./configure CFLAGS="-fdiagnostics-format=json" \
385+
--config-cache \
386+
--enable-slower-safety \
387+
--with-pydebug \
388+
--with-openssl="$OPENSSL_DIR" \
389+
--with-builtin-hashlib-hashes=blake2 \
390+
--with-ssl-default-suites=openssl
391+
- name: Build CPython
392+
run: make -j
393+
- name: Display build info
394+
run: make pythoninfo
395+
- name: Verify python is linked to AWS-LC
396+
run: ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' | grep AWS-LC
397+
- name: SSL tests
398+
run: ./python Lib/test/ssltests.py
399+
400+
build-android:
401+
name: Android (${{ matrix.arch }})
402+
needs: build-context
403+
if: needs.build-context.outputs.run-tests == 'true'
404+
timeout-minutes: 60
405+
strategy:
406+
fail-fast: false
407+
matrix:
408+
include:
409+
# Use the same runs-on configuration as build-macos and build-ubuntu.
410+
- arch: aarch64
411+
runs-on: ${{ github.repository_owner == 'python' && 'ghcr.io/cirruslabs/macos-runner:sonoma' || 'macos-14' }}
412+
- arch: x86_64
413+
runs-on: ubuntu-24.04
414+
415+
runs-on: ${{ matrix.runs-on }}
416+
steps:
417+
- uses: actions/checkout@v4
418+
with:
419+
persist-credentials: false
420+
- name: Build and test
421+
run: ./Android/android.py ci ${{ matrix.arch }}-linux-android
422+
325423
build-wasi:
326424
name: 'WASI'
327425
needs: build-context
@@ -510,31 +608,31 @@ jobs:
510608
- name: Tests
511609
run: xvfb-run make ci
512610

513-
build-tsan:
514-
name: >-
515-
Thread sanitizer
516-
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
611+
build-san:
612+
# ${{ '' } is a hack to nest jobs under the same sidebar category.
613+
name: Sanitizers${{ '' }} # zizmor: ignore[obfuscation]
517614
needs: build-context
518615
if: needs.build-context.outputs.run-tests == 'true'
519616
strategy:
520617
fail-fast: false
521618
matrix:
619+
check-name:
620+
- Thread
522621
free-threading:
523622
- false
524623
- true
525-
uses: ./.github/workflows/reusable-tsan.yml
624+
sanitizer:
625+
- TSan
626+
include:
627+
- check-name: Undefined behavior
628+
sanitizer: UBSan
629+
free-threading: false
630+
uses: ./.github/workflows/reusable-san.yml
526631
with:
632+
sanitizer: ${{ matrix.sanitizer }}
527633
config_hash: ${{ needs.build-context.outputs.config-hash }}
528634
free-threading: ${{ matrix.free-threading }}
529635

530-
build-ubsan:
531-
name: Undefined behavior sanitizer
532-
needs: build-context
533-
if: needs.build-context.outputs.run-tests == 'true'
534-
uses: ./.github/workflows/reusable-ubsan.yml
535-
with:
536-
config_hash: ${{ needs.build-context.outputs.config-hash }}
537-
538636
cross-build-linux:
539637
name: Cross build Linux
540638
runs-on: ubuntu-latest
@@ -628,11 +726,13 @@ jobs:
628726
- build-windows-msi
629727
- build-macos
630728
- build-ubuntu
631-
- build-ubuntu-ssltests
729+
- build-ubuntu-ssltests-awslc
730+
- build-ubuntu-ssltests-openssl
731+
- build-android
632732
- build-wasi
633733
- test-hypothesis
634734
- build-asan
635-
- build-tsan
735+
- build-san
636736
- cross-build-linux
637737
- cifuzz
638738
if: always()
@@ -643,7 +743,8 @@ jobs:
643743
with:
644744
allowed-failures: >-
645745
build-windows-msi,
646-
build-ubuntu-ssltests,
746+
build-ubuntu-ssltests-awslc,
747+
build-ubuntu-ssltests-openssl,
647748
test-hypothesis,
648749
cifuzz,
649750
allowed-skips: >-
@@ -661,11 +762,13 @@ jobs:
661762
check-generated-files,
662763
build-macos,
663764
build-ubuntu,
664-
build-ubuntu-ssltests,
765+
build-ubuntu-ssltests-awslc,
766+
build-ubuntu-ssltests-openssl,
767+
build-android,
665768
build-wasi,
666769
test-hypothesis,
667770
build-asan,
668-
build-tsan,
771+
build-san,
669772
cross-build-linux,
670773
'
671774
|| ''

0 commit comments

Comments
 (0)