Skip to content

Commit c21bafb

Browse files
authored
Merge branch 'main' into gh-75221-runpy-main-search
2 parents 8ab0abb + be3dfe5 commit c21bafb

2,618 files changed

Lines changed: 207227 additions & 106430 deletions

File tree

Some content is hidden

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

‎.gitattributes‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ Include/internal/pycore_ast_state.h generated
8080
Include/internal/pycore_opcode.h generated
8181
Include/internal/pycore_opcode_metadata.h generated
8282
Include/internal/pycore_*_generated.h generated
83+
Include/internal/pycore_token.h generated
8384
Include/internal/pycore_uop_ids.h generated
8485
Include/internal/pycore_uop_metadata.h generated
8586
Include/opcode.h generated
8687
Include/opcode_ids.h generated
8788
Include/slots_generated.h generated
88-
Include/token.h generated
8989
Lib/_opcode_metadata.py generated
9090
Lib/idlelib/help.html generated
9191
Lib/keyword.py generated
@@ -102,6 +102,7 @@ Modules/_testinternalcapi/test_cases.c.h generated
102102
Modules/_testinternalcapi/test_targets.h generated
103103
PC/python3dll.c generated
104104
Parser/parser.c generated
105+
Parser/parser_invalid.c generated
105106
Parser/token.c generated
106107
Programs/test_frozenmain.h generated
107108
Python/Python-ast.c generated

‎.github/CODEOWNERS‎

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@
6363
.azure-pipelines/ @AA-Turner
6464

6565
# GitHub & related scripts
66-
.github/ @ezio-melotti @hugovk @AA-Turner @webknjaz @itamaro @JacobCoffee
67-
Tools/build/compute-changes.py @AA-Turner @hugovk @webknjaz
68-
Lib/test/test_tools/test_compute_changes.py @AA-Turner @hugovk @webknjaz
66+
.github/ @ezio-melotti @hugovk @AA-Turner @webknjaz @itamaro @JacobCoffee @StanFromIreland
67+
Tools/build/compute-changes.py @AA-Turner @hugovk @webknjaz @StanFromIreland
68+
Lib/test/test_tools/test_compute_changes.py @AA-Turner @hugovk @webknjaz @StanFromIreland
6969
Tools/build/verify_ensurepip_wheels.py @AA-Turner @pfmoore @pradyunsg
7070

7171
# Pre-commit
72-
.pre-commit-config.yaml @hugovk @JacobCoffee
73-
.ruff.toml @hugovk @AlexWaygood @AA-Turner @JacobCoffee
72+
.pre-commit-config.yaml @hugovk @JacobCoffee @StanFromIreland
73+
.ruff.toml @hugovk @AlexWaygood @AA-Turner @JacobCoffee @StanFromIreland
7474

7575
# Patchcheck
7676
Tools/patchcheck/ @AA-Turner @itamaro
@@ -172,8 +172,12 @@ Lib/_osx_support.py @python/macos-team
172172
Lib/test/test__osx_support.py @python/macos-team
173173

174174
# WebAssembly (Emscripten)
175-
Platforms/emscripten @freakboy3742 @emmatyping
176-
Tools/wasm/emscripten @freakboy3742 @emmatyping
175+
Platforms/emscripten @freakboy3742 @emmatyping @hoodmane
176+
Tools/wasm/emscripten @freakboy3742 @emmatyping @hoodmane
177+
Python/wasm_trampoline.c @hoodmane
178+
Python/emscripten_signal.c @hoodmane
179+
Python/emscripten_syscalls.c @hoodmane
180+
.github/workflows/reusable-emscripten.yml @hoodmane
177181

178182
# WebAssembly (WASI)
179183
Platforms/WASI @brettcannon @emmatyping @savannahostrowski
@@ -223,7 +227,7 @@ Tools/cases_generator/ @markshannon
223227
Python/assemble.c @markshannon @iritkatriel
224228
Python/codegen.c @markshannon @iritkatriel
225229
Python/compile.c @markshannon @iritkatriel
226-
Python/flowgraph.c @markshannon @iritkatriel
230+
Python/flowgraph.c @markshannon @iritkatriel @eclips4
227231
Python/instruction_sequence.c @iritkatriel
228232
Python/symtable.c @JelleZijlstra @carljm
229233

@@ -283,25 +287,26 @@ Programs/_bootstrap_python.c @ericsnowcurrently @FFY00
283287
Programs/python.c @ericsnowcurrently @FFY00
284288

285289
# JIT
286-
.github/workflows/jit.yml @savannahostrowski
287-
Include/internal/pycore_jit.h @brandtbucher @savannahostrowski @diegorusso
288-
Python/jit.c @brandtbucher @savannahostrowski @diegorusso
289-
Tools/jit/ @brandtbucher @savannahostrowski @diegorusso
290-
InternalDocs/jit.md @brandtbucher @savannahostrowski @diegorusso @AA-Turner
290+
Include/internal/pycore_jit.h @brandtbucher @diegorusso
291+
Python/jit.c @brandtbucher @diegorusso
292+
Tools/jit/ @brandtbucher @diegorusso
293+
InternalDocs/jit.md @brandtbucher @diegorusso @AA-Turner
291294

292295
# Lazy imports (PEP 810)
293-
Objects/lazyimportobject.c @yhg1s @DinoV @pablogsal
294-
Include/internal/pycore_lazyimportobject.h @yhg1s @DinoV @pablogsal
295-
Lib/test/test_lazy_import @yhg1s @DinoV @pablogsal
296+
.github/workflows/reusable-test-lazy-imports-all.yml @yhg1s @DinoV @pablogsal
297+
Objects/lazyimportobject.c @yhg1s @DinoV @pablogsal
298+
Include/internal/pycore_lazyimportobject.h @yhg1s @DinoV @pablogsal
299+
Lib/test/test_lazy_import @yhg1s @DinoV @pablogsal
296300

297301
# Micro-op / μop / Tier 2 Optimiser
298302
Python/optimizer.c @markshannon @Fidget-Spinner
299-
Python/optimizer_analysis.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
300-
Python/optimizer_bytecodes.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
301-
Python/optimizer_symbols.c @markshannon @tomasr8 @Fidget-Spinner @savannahostrowski
303+
Python/optimizer_analysis.c @markshannon @tomasr8 @Fidget-Spinner
304+
Python/optimizer_bytecodes.c @markshannon @tomasr8 @Fidget-Spinner
305+
Python/optimizer_symbols.c @markshannon @tomasr8 @Fidget-Spinner
302306

303307
# Parser, Lexer, and Grammar
304308
Grammar/python.gram @pablogsal @lysnikolaou
309+
Grammar/invalid.gram @pablogsal @lysnikolaou
305310
Lib/test/test_peg_generator/ @pablogsal @lysnikolaou
306311
Lib/test/test_tokenize.py @pablogsal @lysnikolaou
307312
Lib/tokenize.py @pablogsal @lysnikolaou
@@ -431,6 +436,7 @@ Lib/test/test_*time.py @pganssle @StanFromIreland
431436
Modules/*zoneinfo* @pganssle @StanFromIreland
432437
Modules/*time* @pganssle @StanFromIreland
433438
Python/pytime.c @pganssle @StanFromIreland
439+
Python/_strptime.c @pganssle @StanFromIreland
434440

435441
# Dbm
436442
Doc/library/dbm.rst @corona10 @erlend-aasland @serhiy-storchaka
@@ -492,6 +498,11 @@ Lib/_markupbase.py @ezio-melotti
492498
Lib/test/test_html*.py @ezio-melotti
493499
Tools/build/parse_html5_entities.py @ezio-melotti
494500

501+
# HTTP
502+
Doc/library/http* @orsenthil
503+
Lib/http/ @orsenthil
504+
Lib/test/test_http*.py @orsenthil
505+
495506
# IDLE
496507
Doc/library/idle.rst @terryjreedy
497508
Lib/idlelib/ @terryjreedy
@@ -508,6 +519,13 @@ Doc/library/importlib.resources.rst @jaraco @warsaw @FFY00
508519
Lib/importlib/resources/ @jaraco @warsaw @FFY00
509520
Lib/test/test_importlib/resources/ @jaraco @warsaw @FFY00
510521

522+
# IO
523+
Doc/library/io.rst @cmaloney
524+
Lib/_pyio.py @cmaloney
525+
Lib/io.py @cmaloney
526+
Lib/test/test_io/ @cmaloney
527+
Modules/_io/ @cmaloney
528+
511529
# Itertools
512530
Doc/library/itertools.rst @rhettinger
513531
Lib/test/test_itertools.py @rhettinger
@@ -598,6 +616,12 @@ Doc/library/tomllib.rst @encukou @hauntsaninja
598616
Lib/test/test_tomllib/ @encukou @hauntsaninja
599617
Lib/tomllib/ @encukou @hauntsaninja
600618

619+
# Turtle
620+
Doc/library/turtle.rst @StanFromIreland
621+
Doc/library/turtle-star.png @StanFromIreland
622+
Lib/test/test_turtle.py @StanFromIreland
623+
Lib/turtle.py @StanFromIreland
624+
601625
# Typing
602626
Doc/library/typing.rst @JelleZijlstra @AlexWaygood
603627
Lib/test/test_typing.py @JelleZijlstra @AlexWaygood
@@ -614,12 +638,23 @@ Modules/_typesmodule.c @AA-Turner
614638
Lib/unittest/mock.py @cjw296
615639
Lib/test/test_unittest/testmock/ @cjw296
616640

641+
# Urllib
642+
Doc/library/urllib* @orsenthil
643+
Lib/urllib/ @orsenthil
644+
Lib/test/test_urllib*.py @orsenthil
645+
617646
# Venv
618647
**/*venv* @vsajip @FFY00
619648

620649
# Weakref
621650
**/*weakref* @kumaraditya303
622651

652+
# Zlib
653+
Doc/library/zlib.rst @StanFromIreland
654+
Lib/compression/zlib.py @StanFromIreland
655+
Lib/test/test_zlib.py @StanFromIreland
656+
Modules/zlibmodule.c @StanFromIreland
657+
623658
# Zipfile.Path
624659
Lib/test/test_zipfile/_path/ @jaraco
625660
Lib/zipfile/_path/ @jaraco
@@ -643,5 +678,8 @@ Objects/**/clinic/
643678
PC/**/clinic/
644679
Python/**/clinic/
645680

681+
# Exclude Lazy Imports=all CI carve out file
682+
Lib/test/lazy_imports_all_exclude.txt
683+
646684
# Exclude HTML IDs list
647685
Doc/tools/removed-ids.txt

‎.github/ISSUE_TEMPLATE/bug.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ body:
1616
Make sure to also search the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc) to check that the bug has not already been reported.
1717
- type: textarea
1818
attributes:
19-
label: "Bug description:"
19+
label: "Bug report"
2020
description: >
2121
Give a clear and concise description of what happened.
2222
Include a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) if possible.
@@ -34,7 +34,6 @@ body:
3434
label: "CPython versions tested on:"
3535
multiple: true
3636
options:
37-
- "3.10"
3837
- "3.11"
3938
- "3.12"
4039
- "3.13"

‎.github/ISSUE_TEMPLATE/crash.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ body:
1010
The CPython interpreter is written in a different programming language, C. A "CPython crash" is when Python itself fails, leading to a traceback in the C stack.
1111
- type: textarea
1212
attributes:
13-
label: What happened?
13+
label: Crash report
1414
description: >
15+
Give a clear and concise description of what happened.
1516
Include a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) if possible.
1617
[Copy and paste code where possible rather than using screenshots](https://meta.stackoverflow.com/a/285557/13990016),
1718
and put any code blocks inside triple backticks.
@@ -27,7 +28,6 @@ body:
2728
label: "CPython versions tested on:"
2829
multiple: true
2930
options:
30-
- "3.10"
3131
- "3.11"
3232
- "3.12"
3333
- "3.13"

‎.github/ISSUE_TEMPLATE/documentation.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ body:
77
value: |
88
> [!NOTE]
99
> Trivial changes (for example typos) don’t require an issue before opening a PR.
10+
- type: input
11+
id: url
12+
attributes:
13+
label: "Documentation URL"
14+
description: "A link to the relevant documentation page, if applicable."
15+
placeholder: "https://docs.python.org/3/..."
1016
- type: textarea
1117
id: description
1218
attributes:
1319
label: "Documentation"
14-
description: "A clear and concise description of the issue. Include a link to the page."
20+
description: "A clear and concise description of the issue."
1521
validations:
1622
required: true

‎.github/ISSUE_TEMPLATE/feature.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
Major feature proposals should generally be discussed on [Discourse](https://discuss.python.org/c/ideas/6) before opening a GitHub issue. Wait until it's clear that most people support your idea before filling in this form.
1313
- type: textarea
1414
attributes:
15-
label: "Proposal:"
15+
label: "Feature or enhancement"
1616
description: >
1717
Explain your proposal, why it should be implemented, and how it would be used.
1818
Add examples, if applicable.

‎.github/VULNERABILITY_REPORT.yml‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Vulnerability report
2+
description: Privately report a potential security vulnerability in CPython
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
**Not all bugs are vulnerabilities.** Before submitting, read the [Python security policy](https://devguide.python.org/security/policy/) to understand which issues are vulnerabilities and what versions of Python accept reports.
8+
9+
Keep the report short and in plain text: no headers, tables, PDFs, binaries, or severity and CVSS information.
10+
11+
Reports that do not contain a potential security vulnerability will be discarded without a reply.
12+
13+
To report vulnerabilities that affect other projects (such as pip or python.org), or if you are not sure where to send your report, email [security@python.org](mailto:security@python.org).
14+
- type: textarea
15+
id: summary
16+
attributes:
17+
label: Summary
18+
description: A few sentences describing the vulnerability.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: threat_model
23+
attributes:
24+
label: Threat model
25+
description: >
26+
What does the attacker control, and what do they gain? Describe the code, configuration, or deployment that may exist in the real world and is exploitable. Where possible, cite the relevant part of the [security policy](https://devguide.python.org/security/policy/#what-types-of-bugs-are-vulnerabilities).
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: proof_of_concept
31+
attributes:
32+
label: Proof of concept
33+
description: >
34+
A script that reproduces the issue and clearly indicates whether the vulnerability is present, such as exiting with `1` if vulnerable and `0` if not. If it depends on a specially constructed binary file, include a script to construct the file rather than the file itself.
35+
36+
Wrap scripts longer than a few lines in a [collapsed section](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections) using `<details> ... </details>`.
37+
validations:
38+
required: true
39+
- type: dropdown
40+
id: versions
41+
attributes:
42+
label: "CPython versions tested on:"
43+
description: >
44+
If any tested version was not vulnerable, say which in the summary. Only [supported versions](https://devguide.python.org/versions/) accept reports.
45+
multiple: true
46+
options:
47+
- "3.11"
48+
- "3.12"
49+
- "3.13"
50+
- "3.14"
51+
- "3.15"
52+
- "3.16"
53+
- "CPython main branch"
54+
- type: textarea
55+
id: patch
56+
attributes:
57+
label: Suggested fix
58+
description: Ideally, a minimal patch with the mitigation.
59+
validations:
60+
required: false
61+
- type: checkboxes
62+
id: checklist
63+
attributes:
64+
label: Before submitting
65+
options:
66+
- label: I have read the security policy and evaluated this report against it.
67+
required: true
68+
- label: I have checked that this issue is not already resolved on the `main` branch.
69+
required: true
70+
- label: I have verified the factual validity of everything in this report, including any content produced by an LLM.
71+
required: true

‎.github/actionlint.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ paths:
1212
ignore:
1313
- 1st argument of function call is not assignable
1414
- SC2(015|038|086|091|097|098|129|155)
15+
# Pending release of actionlint > 1.7.12 for `$/` self-repository syntax:
16+
# https://github.com/rhysd/actionlint/issues/711
17+
- reusable workflow call "\$/[^"]+" at "uses" is not following the format

0 commit comments

Comments
 (0)