Skip to content

Commit 139d470

Browse files
authored
Merge branch 'main' into 106318.casefold_and_lower
2 parents 053f77a + b866a1c commit 139d470

File tree

773 files changed

+95939
-17093
lines changed

Some content is hidden

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

773 files changed

+95939
-17093
lines changed

.gitattributes

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ PCbuild/readme.txt dos
6868
**/clinic/*.cpp.h generated
6969
**/clinic/*.h.h generated
7070
*_db.h generated
71+
Doc/_static/tachyon-example-*.html generated
7172
Doc/c-api/lifecycle.dot.svg generated
7273
Doc/data/stable_abi.dat generated
7374
Doc/library/token-list.inc generated
@@ -82,12 +83,15 @@ Include/opcode.h generated
8283
Include/opcode_ids.h generated
8384
Include/token.h generated
8485
Lib/_opcode_metadata.py generated
85-
Lib/keyword.py generated
8686
Lib/idlelib/help.html generated
87+
Lib/keyword.py generated
88+
Lib/pydoc_data/topics.py generated
89+
Lib/pydoc_data/module_docs.py generated
8790
Lib/test/certdata/*.pem generated
8891
Lib/test/certdata/*.0 generated
8992
Lib/test/levenshtein_examples.json generated
9093
Lib/test/test_stable_abi_ctypes.py generated
94+
Lib/test/test_zoneinfo/data/*.json generated
9195
Lib/token.py generated
9296
Misc/sbom.spdx.json generated
9397
Objects/typeslots.inc generated

.github/CODEOWNERS

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ Doc/howto/clinic.rst @erlend-aasland @AA-Turner
126126
# C Analyser
127127
Tools/c-analyzer/ @ericsnowcurrently
128128

129+
# C API Documentation Checks
130+
Tools/check-c-api-docs/ @ZeroIntensity
131+
129132
# Fuzzing
130133
Modules/_xxtestfuzz/ @ammaraskar
131134

@@ -286,10 +289,10 @@ Tools/jit/ @brandtbucher @savannahostrowski @diegorusso
286289
InternalDocs/jit.md @brandtbucher @savannahostrowski @diegorusso @AA-Turner
287290

288291
# Micro-op / μop / Tier 2 Optimiser
289-
Python/optimizer.c @markshannon
292+
Python/optimizer.c @markshannon @Fidget-Spinner
290293
Python/optimizer_analysis.c @markshannon @tomasr8 @Fidget-Spinner
291294
Python/optimizer_bytecodes.c @markshannon @tomasr8 @Fidget-Spinner
292-
Python/optimizer_symbols.c @markshannon @tomasr8
295+
Python/optimizer_symbols.c @markshannon @tomasr8 @Fidget-Spinner
293296

294297
# Parser, Lexer, and Grammar
295298
Grammar/python.gram @pablogsal @lysnikolaou
@@ -319,7 +322,7 @@ Tools/build/generate_global_objects.py @ericsnowcurrently
319322
# Remote Debugging
320323
Python/remote_debug.h @pablogsal
321324
Python/remote_debugging.c @pablogsal
322-
Modules/_remote_debugging_module.c @pablogsal @ambv @1st1
325+
Modules/_remote_debugging/ @pablogsal
323326

324327
# Sub-Interpreters
325328
**/*crossinterp* @ericsnowcurrently
@@ -534,6 +537,11 @@ Lib/pydoc.py @AA-Turner
534537
Lib/pydoc_data/ @AA-Turner
535538
Lib/test/test_pydoc/ @AA-Turner
536539

540+
# Profiling (Sampling)
541+
Doc/library/profiling*.rst @pablogsal
542+
Lib/profiling/ @pablogsal
543+
Lib/test/test_profiling/ @pablogsal
544+
537545
# PyREPL
538546
Lib/_pyrepl/ @pablogsal @lysnikolaou @ambv
539547
Lib/test/test_pyrepl/ @pablogsal @lysnikolaou @ambv

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ contact_links:
55
- name: "Proposing new features"
66
about: "Submit major feature proposal (e.g. syntax changes) to an ideas forum first."
77
url: "https://discuss.python.org/c/ideas/6"
8+
- name: "Python Install Manager issues"
9+
about: "Report issues with the Python Install Manager (for Windows)"
10+
url: "https://github.com/python/pymanager/issues"

.github/workflows/build.yml

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ jobs:
142142
- name: Check for unsupported C global variables
143143
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
144144
run: make check-c-globals
145+
- name: Check for undocumented C APIs
146+
run: make check-c-api-docs
147+
145148

146149
build-windows:
147150
name: >-
@@ -188,7 +191,7 @@ jobs:
188191
macOS
189192
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
190193
needs: build-context
191-
if: needs.build-context.outputs.run-tests == 'true'
194+
if: needs.build-context.outputs.run-macos == 'true'
192195
strategy:
193196
fail-fast: false
194197
matrix:
@@ -214,7 +217,7 @@ jobs:
214217
${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
215218
${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
216219
needs: build-context
217-
if: needs.build-context.outputs.run-tests == 'true'
220+
if: needs.build-context.outputs.run-ubuntu == 'true'
218221
strategy:
219222
fail-fast: false
220223
matrix:
@@ -245,7 +248,7 @@ jobs:
245248
runs-on: ${{ matrix.os }}
246249
timeout-minutes: 60
247250
needs: build-context
248-
if: needs.build-context.outputs.run-tests == 'true'
251+
if: needs.build-context.outputs.run-ubuntu == 'true'
249252
strategy:
250253
fail-fast: false
251254
matrix:
@@ -301,7 +304,7 @@ jobs:
301304
runs-on: ${{ matrix.os }}
302305
timeout-minutes: 60
303306
needs: build-context
304-
if: needs.build-context.outputs.run-tests == 'true'
307+
if: needs.build-context.outputs.run-ubuntu == 'true'
305308
strategy:
306309
fail-fast: false
307310
matrix:
@@ -365,7 +368,7 @@ jobs:
365368
build-android:
366369
name: Android (${{ matrix.arch }})
367370
needs: build-context
368-
if: needs.build-context.outputs.run-tests == 'true'
371+
if: needs.build-context.outputs.run-android == 'true'
369372
timeout-minutes: 60
370373
strategy:
371374
fail-fast: false
@@ -387,9 +390,9 @@ jobs:
387390
build-ios:
388391
name: iOS
389392
needs: build-context
390-
if: needs.build-context.outputs.run-tests == 'true'
393+
if: needs.build-context.outputs.run-ios == 'true'
391394
timeout-minutes: 60
392-
runs-on: macos-15
395+
runs-on: macos-14
393396
steps:
394397
- uses: actions/checkout@v4
395398
with:
@@ -402,23 +405,23 @@ jobs:
402405
# https://github.com/actions/runner-images/issues/12751.
403406
- name: Select Xcode version
404407
run: |
405-
sudo xcode-select --switch /Applications/Xcode_16.4.app
408+
sudo xcode-select --switch /Applications/Xcode_15.4.app
406409
407410
- name: Build and test
408-
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone 16e,OS=18.5'
411+
run: python3 Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation),OS=17.5'
409412

410413
build-wasi:
411414
name: 'WASI'
412415
needs: build-context
413-
if: needs.build-context.outputs.run-tests == 'true'
416+
if: needs.build-context.outputs.run-wasi == 'true'
414417
uses: ./.github/workflows/reusable-wasi.yml
415418

416419
test-hypothesis:
417420
name: "Hypothesis tests on Ubuntu"
418421
runs-on: ubuntu-24.04
419422
timeout-minutes: 60
420423
needs: build-context
421-
if: needs.build-context.outputs.run-tests == 'true'
424+
if: needs.build-context.outputs.run-ubuntu == 'true'
422425
env:
423426
OPENSSL_VER: 3.0.18
424427
PYTHONSTRICTEXTENSIONBUILD: 1
@@ -525,7 +528,7 @@ jobs:
525528
runs-on: ${{ matrix.os }}
526529
timeout-minutes: 60
527530
needs: build-context
528-
if: needs.build-context.outputs.run-tests == 'true'
531+
if: needs.build-context.outputs.run-ubuntu == 'true'
529532
strategy:
530533
fail-fast: false
531534
matrix:
@@ -578,7 +581,7 @@ jobs:
578581
# ${{ '' } is a hack to nest jobs under the same sidebar category.
579582
name: Sanitizers${{ '' }} # zizmor: ignore[obfuscation]
580583
needs: build-context
581-
if: needs.build-context.outputs.run-tests == 'true'
584+
if: needs.build-context.outputs.run-ubuntu == 'true'
582585
strategy:
583586
fail-fast: false
584587
matrix:
@@ -603,7 +606,7 @@ jobs:
603606
runs-on: ubuntu-latest
604607
timeout-minutes: 60
605608
needs: build-context
606-
if: needs.build-context.outputs.run-tests == 'true'
609+
if: needs.build-context.outputs.run-ubuntu == 'true'
607610
steps:
608611
- uses: actions/checkout@v4
609612
with:
@@ -688,7 +691,6 @@ jobs:
688691
- build-ubuntu
689692
- build-ubuntu-ssltests-awslc
690693
- build-ubuntu-ssltests-openssl
691-
- build-android
692694
- build-ios
693695
- build-wasi
694696
- test-hypothesis
@@ -703,50 +705,39 @@ jobs:
703705
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
704706
with:
705707
allowed-failures: >-
708+
build-android,
706709
build-windows-msi,
707710
build-ubuntu-ssltests-awslc,
708711
build-ubuntu-ssltests-openssl,
709712
test-hypothesis,
710713
cifuzz,
711714
allowed-skips: >-
715+
${{ !fromJSON(needs.build-context.outputs.run-docs) && 'check-docs,' || '' }}
712716
${{
713-
!fromJSON(needs.build-context.outputs.run-docs)
717+
needs.build-context.outputs.run-tests != 'true'
714718
&& '
715-
check-docs,
719+
check-autoconf-regen,
720+
check-generated-files,
716721
'
717722
|| ''
718723
}}
724+
${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
725+
${{ !fromJSON(needs.build-context.outputs.run-ci-fuzz) && 'cifuzz,' || '' }}
726+
${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }}
719727
${{
720-
needs.build-context.outputs.run-tests != 'true'
728+
!fromJSON(needs.build-context.outputs.run-ubuntu)
721729
&& '
722-
check-autoconf-regen,
723-
check-generated-files,
724-
build-macos,
725730
build-ubuntu,
726731
build-ubuntu-ssltests-awslc,
727732
build-ubuntu-ssltests-openssl,
728-
build-android,
729-
build-ios,
730-
build-wasi,
731733
test-hypothesis,
732734
build-asan,
733735
build-san,
734736
cross-build-linux,
735737
'
736738
|| ''
737739
}}
738-
${{
739-
!fromJSON(needs.build-context.outputs.run-windows-tests)
740-
&& '
741-
build-windows,
742-
'
743-
|| ''
744-
}}
745-
${{
746-
!fromJSON(needs.build-context.outputs.run-ci-fuzz)
747-
&& '
748-
cifuzz,
749-
'
750-
|| ''
751-
}}
740+
${{ !fromJSON(needs.build-context.outputs.run-android) && 'build-android,' || '' }}
741+
${{ !fromJSON(needs.build-context.outputs.run-ios) && 'build-ios,' || '' }}
742+
${{ !fromJSON(needs.build-context.outputs.run-wasi) && 'build-wasi,' || '' }}
752743
jobs: ${{ toJSON(needs) }}

.github/workflows/lint.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,4 @@ jobs:
2222
- uses: actions/checkout@v4
2323
with:
2424
persist-credentials: false
25-
- uses: actions/setup-python@v5
26-
with:
27-
python-version: "3.x"
28-
- uses: pre-commit/action@v3.0.1
25+
- uses: j178/prek-action@v1

.github/workflows/mypy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ on:
2626
- "Tools/build/update_file.py"
2727
- "Tools/build/verify_ensurepip_wheels.py"
2828
- "Tools/cases_generator/**"
29+
- "Tools/check-c-api-docs/**"
2930
- "Tools/clinic/**"
3031
- "Tools/jit/**"
3132
- "Tools/peg_generator/**"
@@ -58,6 +59,7 @@ jobs:
5859
"Lib/tomllib",
5960
"Tools/build",
6061
"Tools/cases_generator",
62+
"Tools/check-c-api-docs",
6163
"Tools/clinic",
6264
"Tools/jit",
6365
"Tools/peg_generator",

.github/workflows/reusable-context.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,51 @@ on: # yamllint disable-line rule:truthy
1717
# || 'falsy-branch'
1818
# }}
1919
#
20+
run-android:
21+
description: Whether to run the Android tests
22+
value: ${{ jobs.compute-changes.outputs.run-android }} # bool
23+
run-ci-fuzz:
24+
description: Whether to run the CIFuzz job
25+
value: ${{ jobs.compute-changes.outputs.run-ci-fuzz }} # bool
2026
run-docs:
2127
description: Whether to build the docs
2228
value: ${{ jobs.compute-changes.outputs.run-docs }} # bool
29+
run-ios:
30+
description: Whether to run the iOS tests
31+
value: ${{ jobs.compute-changes.outputs.run-ios }} # bool
32+
run-macos:
33+
description: Whether to run the macOS tests
34+
value: ${{ jobs.compute-changes.outputs.run-macos }} # bool
2335
run-tests:
2436
description: Whether to run the regular tests
2537
value: ${{ jobs.compute-changes.outputs.run-tests }} # bool
26-
run-windows-tests:
27-
description: Whether to run the Windows tests
28-
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
38+
run-ubuntu:
39+
description: Whether to run the Ubuntu tests
40+
value: ${{ jobs.compute-changes.outputs.run-ubuntu }} # bool
41+
run-wasi:
42+
description: Whether to run the WASI tests
43+
value: ${{ jobs.compute-changes.outputs.run-wasi }} # bool
2944
run-windows-msi:
3045
description: Whether to run the MSI installer smoke tests
3146
value: ${{ jobs.compute-changes.outputs.run-windows-msi }} # bool
32-
run-ci-fuzz:
33-
description: Whether to run the CIFuzz job
34-
value: ${{ jobs.compute-changes.outputs.run-ci-fuzz }} # bool
47+
run-windows-tests:
48+
description: Whether to run the Windows tests
49+
value: ${{ jobs.compute-changes.outputs.run-windows-tests }} # bool
3550

3651
jobs:
3752
compute-changes:
3853
name: Create context from changed files
3954
runs-on: ubuntu-latest
4055
timeout-minutes: 10
4156
outputs:
57+
run-android: ${{ steps.changes.outputs.run-android }}
4258
run-ci-fuzz: ${{ steps.changes.outputs.run-ci-fuzz }}
4359
run-docs: ${{ steps.changes.outputs.run-docs }}
60+
run-ios: ${{ steps.changes.outputs.run-ios }}
61+
run-macos: ${{ steps.changes.outputs.run-macos }}
4462
run-tests: ${{ steps.changes.outputs.run-tests }}
63+
run-ubuntu: ${{ steps.changes.outputs.run-ubuntu }}
64+
run-wasi: ${{ steps.changes.outputs.run-wasi }}
4565
run-windows-msi: ${{ steps.changes.outputs.run-windows-msi }}
4666
run-windows-tests: ${{ steps.changes.outputs.run-windows-tests }}
4767
steps:

.github/workflows/tail-call.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,25 @@ jobs:
7979
with:
8080
python-version: '3.11'
8181

82-
- name: Native Windows (debug)
82+
- name: Native Windows MSVC (release)
8383
if: runner.os == 'Windows' && matrix.architecture != 'ARM64'
84-
shell: cmd
84+
shell: pwsh
8585
run: |
86-
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
87-
set PlatformToolset=clangcl
88-
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
89-
set LLVMInstallDir=C:\Program Files\LLVM
90-
call ./PCbuild/build.bat --tail-call-interp -d -p ${{ matrix.architecture }}
91-
call ./PCbuild/rt.bat -d -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
86+
choco install visualstudio2026buildtools --no-progress -y --force --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --locale en-US --passive"
87+
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\MSBuild\Current\bin;$env:PATH"
88+
$env:PlatformToolset = "v145"
89+
./PCbuild/build.bat --tail-call-interp -c Release -p ${{ matrix.architecture }}
90+
./PCbuild/rt.bat -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3
9291
9392
# No tests (yet):
94-
- name: Emulated Windows (release)
93+
- name: Emulated Windows Clang (release)
9594
if: runner.os == 'Windows' && matrix.architecture == 'ARM64'
96-
shell: cmd
95+
shell: pwsh
9796
run: |
9897
choco install llvm --allow-downgrade --no-progress --version ${{ matrix.llvm }}.1.0
99-
set PlatformToolset=clangcl
100-
set LLVMToolsVersion=${{ matrix.llvm }}.1.0
101-
set LLVMInstallDir=C:\Program Files\LLVM
98+
$env:PlatformToolset = "clangcl"
99+
$env:LLVMToolsVersion = "${{ matrix.llvm }}.1.0"
100+
$env:LLVMInstallDir = "C:\Program Files\LLVM"
102101
./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }}
103102
104103
- name: Native macOS (release)

.github/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Configuration for the zizmor static analysis tool, run via pre-commit in CI
1+
# Configuration for the zizmor static analysis tool, run via prek in CI
22
# https://woodruffw.github.io/zizmor/configuration/
33
rules:
44
dangerous-triggers:

0 commit comments

Comments
 (0)