Skip to content

Commit ff7bf31

Browse files
Merge branch 'main' into ft_lzma_2
2 parents bdc32fe + 103a384 commit ff7bf31

File tree

462 files changed

+24535
-7732
lines changed

Some content is hidden

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

462 files changed

+24535
-7732
lines changed

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ Include/opcode.h generated
8383
Include/opcode_ids.h generated
8484
Include/token.h generated
8585
Lib/_opcode_metadata.py generated
86-
Lib/keyword.py generated
8786
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
8890
Lib/test/certdata/*.pem generated
8991
Lib/test/certdata/*.0 generated
9092
Lib/test/levenshtein_examples.json generated

.github/CODEOWNERS

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ Misc/externals.spdx.json @sethmlarson
143143
Misc/sbom.spdx.json @sethmlarson
144144
Tools/build/generate_sbom.py @sethmlarson
145145

146+
# ABI check
147+
Misc/libabigail.abignore @encukou
148+
146149

147150
# ----------------------------------------------------------------------------
148151
# Platform Support
@@ -290,9 +293,9 @@ InternalDocs/jit.md @brandtbucher @savannahostrowski @diegorusso @AA-T
290293

291294
# Micro-op / μop / Tier 2 Optimiser
292295
Python/optimizer.c @markshannon @Fidget-Spinner
293-
Python/optimizer_analysis.c @markshannon @tomasr8 @Fidget-Spinner
294-
Python/optimizer_bytecodes.c @markshannon @tomasr8 @Fidget-Spinner
295-
Python/optimizer_symbols.c @markshannon @tomasr8 @Fidget-Spinner
296+
Python/optimizer_analysis.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
297+
Python/optimizer_bytecodes.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
298+
Python/optimizer_symbols.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
296299

297300
# Parser, Lexer, and Grammar
298301
Grammar/python.gram @pablogsal @lysnikolaou

.github/workflows/build.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,14 @@ 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
147145

146+
check-c-api-docs:
147+
name: C API Docs
148+
needs: build-context
149+
if: >-
150+
needs.build-context.outputs.run-tests == 'true'
151+
|| needs.build-context.outputs.run-docs == 'true'
152+
uses: ./.github/workflows/reusable-check-c-api-docs.yml
148153

149154
build-windows:
150155
name: >-
@@ -685,13 +690,13 @@ jobs:
685690
- check-docs
686691
- check-autoconf-regen
687692
- check-generated-files
693+
- check-c-api-docs
688694
- build-windows
689695
- build-windows-msi
690696
- build-macos
691697
- build-ubuntu
692698
- build-ubuntu-ssltests-awslc
693699
- build-ubuntu-ssltests-openssl
694-
- build-android
695700
- build-ios
696701
- build-wasi
697702
- test-hypothesis
@@ -706,6 +711,7 @@ jobs:
706711
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
707712
with:
708713
allowed-failures: >-
714+
build-android,
709715
build-windows-msi,
710716
build-ubuntu-ssltests-awslc,
711717
build-ubuntu-ssltests-openssl,
@@ -721,6 +727,12 @@ jobs:
721727
'
722728
|| ''
723729
}}
730+
${{
731+
!fromJSON(needs.build-context.outputs.run-tests)
732+
&& !fromJSON(needs.build-context.outputs.run-docs)
733+
&& 'check-c-api-docs,'
734+
|| ''
735+
}}
724736
${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
725737
${{ !fromJSON(needs.build-context.outputs.run-ci-fuzz) && 'cifuzz,' || '' }}
726738
${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }}

.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
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Reusable C API Docs Check
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
env:
10+
FORCE_COLOR: 1
11+
12+
jobs:
13+
check-c-api-docs:
14+
name: 'Check if all C APIs are documented'
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
- name: Check for undocumented C APIs
25+
run: python Tools/check-c-api-docs/main.py

.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:

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.13.2
3+
rev: v0.14.10
44
hooks:
55
- id: ruff-check
66
name: Run Ruff (lint) on Apple/
@@ -40,19 +40,19 @@ repos:
4040
files: ^Apple
4141
- id: ruff-format
4242
name: Run Ruff (format) on Doc/
43-
args: [--check]
43+
args: [--exit-non-zero-on-fix]
4444
files: ^Doc/
4545
- id: ruff-format
4646
name: Run Ruff (format) on Tools/build/check_warnings.py
47-
args: [--check, --config=Tools/build/.ruff.toml]
47+
args: [--exit-non-zero-on-fix, --config=Tools/build/.ruff.toml]
4848
files: ^Tools/build/check_warnings.py
4949
- id: ruff-format
5050
name: Run Ruff (format) on Tools/wasm/
51-
args: [--check, --config=Tools/wasm/.ruff.toml]
51+
args: [--exit-non-zero-on-fix, --config=Tools/wasm/.ruff.toml]
5252
files: ^Tools/wasm/
5353

5454
- repo: https://github.com/psf/black-pre-commit-mirror
55-
rev: 25.9.0
55+
rev: 25.12.0
5656
hooks:
5757
- id: black
5858
name: Run Black on Tools/jit/
@@ -83,24 +83,24 @@ repos:
8383
files: '^\.github/CODEOWNERS|\.(gram)$'
8484

8585
- repo: https://github.com/python-jsonschema/check-jsonschema
86-
rev: 0.34.0
86+
rev: 0.36.0
8787
hooks:
8888
- id: check-dependabot
8989
- id: check-github-workflows
9090
- id: check-readthedocs
9191

9292
- repo: https://github.com/rhysd/actionlint
93-
rev: v1.7.7
93+
rev: v1.7.9
9494
hooks:
9595
- id: actionlint
9696

9797
- repo: https://github.com/woodruffw/zizmor-pre-commit
98-
rev: v1.14.1
98+
rev: v1.19.0
9999
hooks:
100100
- id: zizmor
101101

102102
- repo: https://github.com/sphinx-contrib/sphinx-lint
103-
rev: v1.0.0
103+
rev: v1.0.2
104104
hooks:
105105
- id: sphinx-lint
106106
args: [--enable=default-role]

Doc/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ doctest:
140140
pydoc-topics: BUILDER = pydoc-topics
141141
pydoc-topics: build
142142
@echo "Building finished; now run this:" \
143-
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
143+
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py" \
144+
"&& cp build/pydoc-topics/module_docs.py ../Lib/pydoc_data/module_docs.py"
144145

145146
.PHONY: gettext
146147
gettext: BUILDER = gettext

Doc/c-api/apiabiversion.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,23 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
3434
This can be ``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for release
3535
candidate or ``0xF`` for final.
3636

37+
38+
.. c:namespace:: NULL
39+
.. c:macro:: PY_RELEASE_LEVEL_ALPHA
40+
:no-typesetting:
41+
.. c:macro:: PY_RELEASE_LEVEL_BETA
42+
:no-typesetting:
43+
.. c:macro:: PY_RELEASE_LEVEL_GAMMA
44+
:no-typesetting:
45+
.. c:macro:: PY_RELEASE_LEVEL_FINAL
46+
:no-typesetting:
47+
48+
For completeness, the values are available as macros:
49+
:c:macro:`!PY_RELEASE_LEVEL_ALPHA` (``0xA``),
50+
:c:macro:`!PY_RELEASE_LEVEL_BETA` (``0xB``),
51+
:c:macro:`!PY_RELEASE_LEVEL_GAMMA` (``0xC``), and
52+
:c:macro:`!PY_RELEASE_LEVEL_FINAL` (``0xF``).
53+
3754
.. c:macro:: PY_RELEASE_SERIAL
3855
3956
The ``2`` in ``3.4.1a2``. Zero for final releases.
@@ -46,6 +63,12 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
4663
Use this for numeric comparisons, for example,
4764
``#if PY_VERSION_HEX >= ...``.
4865

66+
.. c:macro:: PY_VERSION
67+
68+
The Python version as a string, for example, ``"3.4.1a2"``.
69+
70+
These macros are defined in :source:`Include/patchlevel.h`.
71+
4972

5073
Run-time version
5174
----------------

0 commit comments

Comments
 (0)