Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit caf95e0

Browse filesBrowse files
authored
Merge branch 'main' into fix-issue-57531
2 parents 3ae14cc + b4d8897 commit caf95e0
Copy full SHA for caf95e0

File tree

Expand file treeCollapse file tree

940 files changed

+26377
-15174
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

940 files changed

+26377
-15174
lines changed

‎.coveragerc

Copy file name to clipboard
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
# Regexes for lines to exclude from consideration
6+
exclude_lines =
7+
# Don't complain if non-runnable code isn't run:
8+
if 0:
9+
if __name__ == .__main__.:
10+
11+
.*# pragma: no cover
12+
.*# pragma: no branch
13+
14+
# Additions for IDLE:
15+
.*# htest #
16+
if not (_htest or _utest):
17+
if not .*_utest:
18+
if .*_htest:
19+

‎.gitattributes

Copy file name to clipboardExpand all lines: .gitattributes
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ Parser/parser.c generated
8585
Parser/token.c generated
8686
Programs/test_frozenmain.h generated
8787
Python/Python-ast.c generated
88-
Python/generated_cases.c.h generated
8988
Python/executor_cases.c.h generated
89+
Python/generated_cases.c.h generated
9090
Python/opcode_targets.h generated
9191
Python/stdlib_module_names.h generated
9292
Tools/peg_generator/pegen/grammar_parser.py generated

‎.github/CODEOWNERS

Copy file name to clipboardExpand all lines: .github/CODEOWNERS
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Python/traceback.c @iritkatriel
6969

7070
# Import (including importlib).
7171
**/*import* @brettcannon @ericsnowcurrently @ncoghlan @warsaw
72+
/Python/import.c @kumaraditya303
7273
**/*importlib/resources/* @jaraco @warsaw @FFY00
7374
**/importlib/metadata/* @jaraco @warsaw
7475

@@ -79,7 +80,7 @@ Doc/library/time.rst @pganssle @abalkin
7980
Lib/test/test_time.py @pganssle @abalkin
8081
Modules/timemodule.c @pganssle @abalkin
8182
Python/pytime.c @pganssle @abalkin
82-
Include/pytime.h @pganssle @abalkin
83+
Include/internal/pycore_time.h @pganssle @abalkin
8384

8485
# Email and related
8586
**/*mail* @python/email-team
@@ -172,4 +173,9 @@ Doc/c-api/stable.rst @encukou
172173
**/*pathlib* @barneygale
173174

174175
# zipfile.Path
175-
**/*zipfile/*_path.py @jaraco
176+
**/*zipfile/_path/* @jaraco
177+
178+
# Argument Clinic
179+
/Tools/clinic/** @erlend-aasland @AlexWaygood
180+
/Lib/test/test_clinic.py @erlend-aasland @AlexWaygood
181+
Doc/howto/clinic.rst @erlend-aasland

‎.github/ISSUE_TEMPLATE/bug.md

Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/bug.md
+28-10Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,46 @@ labels: "type-bug"
55
---
66

77
<!--
8-
If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not
9-
the right place to seek help. Consider the following options instead:
8+
New to Python? The issue tracker isn't the right place to get help.
9+
Consider instead:
1010
1111
- reading the Python tutorial: https://docs.python.org/3/tutorial/
12-
- posting in the "Users" category on discuss.python.org: https://discuss.python.org/c/users/7
13-
- emailing the Python-list mailing list: https://mail.python.org/mailman/listinfo/python-list
14-
- searching our issue tracker (https://github.com/python/cpython/issues) to see if
15-
your problem has already been reported
12+
- posting at https://discuss.python.org/c/users/7
13+
- emailing https://mail.python.org/mailman/listinfo/python-list
1614
-->
1715

1816
# Bug report
1917

20-
A clear and concise description of what the bug is.
21-
Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.
18+
## Checklist
19+
20+
<!-- Bugs in third-party projects (e.g. `requests`) do not belong in the CPython issue tracker -->
21+
22+
- [ ] I am confident this is a bug in CPython, not a bug in a third-party project
23+
- [ ] I have searched the CPython issue tracker, and am confident this bug has not been reported before
24+
25+
## A clear and concise description of the bug
26+
27+
<!--
28+
Include a minimal, reproducible example if possible.
29+
(https://stackoverflow.com/help/minimal-reproducible-example)
30+
31+
Put any code blocks inside triple backticks:
32+
33+
```py
34+
your code here
35+
```
36+
37+
-->
38+
39+
2240

2341
# Your environment
2442

25-
<!-- Include as many relevant details as possible about the environment you experienced the bug in -->
43+
<!-- Include all relevant details about the environment you experienced the bug in -->
2644

2745
- CPython versions tested on:
2846
- Operating system and architecture:
2947

3048
<!--
31-
You can freely edit this text. Remove any lines you believe are unnecessary.
49+
You can freely edit this form. Remove any lines you believe are unnecessary.
3250
-->

‎.github/ISSUE_TEMPLATE/crash.md

Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/crash.md
+24-9Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,44 @@ labels: "type-crash"
55
---
66

77
<!--
8-
Use this template for hard crashes of the interpreter, segmentation faults, failed C-level assertions, and similar.
9-
Do not submit this form if you encounter an exception being unexpectedly raised from a Python function.
10-
Most of the time, these should be filed as bugs, rather than crashes.
8+
This form is for hard crashes of the Python interpreter, segmentation faults,
9+
failed C-level assertions, and similar.
10+
Exceptions unexpectedly raised from stdlib Python functions
11+
count as bugs rather than crashes.
1112
12-
The CPython interpreter is itself written in a different programming language, C.
13-
For CPython, a "crash" is when Python itself fails, leading to a traceback in the C stack.
13+
The CPython interpreter is written in a different programming language, C.
14+
A "CPython crash" is when Python itself fails, leading to a traceback in the C stack.
1415
-->
1516

1617
# Crash report
1718

18-
Tell us what happened, ideally including a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example).
19+
<!--
20+
Tell us what happened. Ideally, include a minimal, reproducible example.
21+
(https://stackoverflow.com/help/minimal-reproducible-example)
22+
23+
Put any code blocks inside triple backticks:
24+
25+
```py
26+
your code here
27+
```
28+
29+
-->
30+
31+
1932

2033
# Error messages
2134

22-
Enter any relevant error message caused by the crash, including a core dump if there is one.
35+
<!-- Enter any error messages caused by the crash, including a core dump if there is one -->
36+
37+
2338

2439
# Your environment
2540

26-
<!-- Include as many relevant details as possible about the environment you experienced the bug in -->
41+
<!-- Include all relevant details about the environment you experienced the crash in -->
2742

2843
- CPython versions tested on:
2944
- Operating system and architecture:
3045

3146
<!--
32-
You can freely edit this text. Remove any lines you believe are unnecessary.
47+
You can freely edit this form. Remove any lines you believe are unnecessary.
3348
-->

‎.github/ISSUE_TEMPLATE/feature.md

Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/feature.md
+30-8Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,47 @@ about: Submit a proposal for a new CPython feature or enhancement
44
labels: "type-feature"
55
---
66

7+
<!--
8+
Proposing a new feature for Python?
9+
You'll need to demonstrate widespread support for your idea among the community.
10+
11+
Major feature proposals should generally be discussed at
12+
https://discuss.python.org/c/ideas/6 before opening a GitHub issue.
13+
Wait until it's clear that most people support your idea
14+
before filling in this form.
15+
-->
16+
717
# Feature or enhancement
818

9-
(A clear and concise description of your proposal.)
19+
<!-- A clear and concise description of your proposal. -->
20+
21+
1022

1123
# Pitch
1224

13-
(Explain why this feature or enhancement should be implemented and how it would be used.
14-
Add examples, if applicable.)
25+
<!--
26+
Explain why this feature or enhancement should be implemented and how it would be used.
27+
Add examples, if applicable.
28+
29+
Put any code blocks inside triple backticks:
30+
31+
```py
32+
your code here
33+
```
34+
35+
-->
36+
37+
1538

1639
# Previous discussion
1740

1841
<!--
19-
New features to Python should first be discussed elsewhere before creating issues on GitHub,
20-
for example in the "ideas" category (https://discuss.python.org/c/ideas/6) of discuss.python.org,
21-
or the python-ideas mailing list (https://mail.python.org/mailman3/lists/python-ideas.python.org/).
22-
Use this space to post links to the places where you have already discussed this feature proposal:
42+
Use this space to post links to the places
43+
where you have already discussed your feature proposal:
2344
-->
2445

2546

47+
2648
<!--
27-
You can freely edit this text. Remove any lines you believe are unnecessary.
49+
You can freely edit this form. Remove any lines you believe are unnecessary.
2850
-->

‎.github/workflows/build.yml

Copy file name to clipboardExpand all lines: .github/workflows/build.yml
+57Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,3 +519,60 @@ jobs:
519519
run: make pythoninfo
520520
- name: Tests
521521
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
522+
523+
all-required-green: # This job does nothing and is only used for the branch protection
524+
name: All required checks pass
525+
if: always()
526+
527+
needs:
528+
- check_source # Transitive dependency, needed to access `run_tests` value
529+
- check-docs
530+
- check_generated_files
531+
- build_win32
532+
- build_win_amd64
533+
- build_macos
534+
- build_ubuntu
535+
- build_ubuntu_ssltests
536+
- test_hypothesis
537+
- build_asan
538+
539+
runs-on: ubuntu-latest
540+
541+
steps:
542+
- name: Check whether the needed jobs succeeded or failed
543+
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
544+
with:
545+
allowed-failures: >-
546+
build_macos,
547+
build_ubuntu_ssltests,
548+
build_win32,
549+
test_hypothesis,
550+
allowed-skips: >-
551+
${{
552+
!fromJSON(needs.check_source.outputs.run-docs)
553+
&& '
554+
check-docs,
555+
'
556+
|| ''
557+
}}
558+
${{
559+
needs.check_source.outputs.run_tests != 'true'
560+
&& '
561+
check_generated_files,
562+
build_win32,
563+
build_win_amd64,
564+
build_macos,
565+
build_ubuntu,
566+
build_ubuntu_ssltests,
567+
build_asan,
568+
'
569+
|| ''
570+
}}
571+
${{
572+
!fromJSON(needs.check_source.outputs.run_hypothesis)
573+
&& '
574+
test_hypothesis,
575+
'
576+
|| ''
577+
}}
578+
jobs: ${{ toJSON(needs) }}

‎.github/workflows/new-bugs-announce-notifier.yml

Copy file name to clipboardExpand all lines: .github/workflows/new-bugs-announce-notifier.yml
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ jobs:
4141
url : issue.data.html_url,
4242
labels : issue.data.labels.map(label => { return label.name }).join(", "),
4343
assignee : issue.data.assignees.map(assignee => { return assignee.login }),
44-
body : issue.data.body
44+
// We need to truncate the body size, because the max size for
45+
// the whole payload is 16kb. We want to be safe and assume that
46+
// body can take up to ~8kb of space.
47+
body : issue.data.body.substring(0, 8000)
4548
};
4649
4750
const data = {

‎.github/workflows/require-pr-label.yml

Copy file name to clipboardExpand all lines: .github/workflows/require-pr-label.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
timeout-minutes: 10
1616

1717
steps:
18-
- uses: mheap/github-action-required-labels@v4
18+
- uses: mheap/github-action-required-labels@v5
1919
with:
2020
mode: exactly
2121
count: 0

‎.github/workflows/reusable-docs.yml

Copy file name to clipboardExpand all lines: .github/workflows/reusable-docs.yml
+10-17Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,28 @@ jobs:
2828
cache-dependency-path: 'Doc/requirements.txt'
2929
- name: 'Install build dependencies'
3030
run: make -C Doc/ venv
31-
- name: 'Build HTML documentation'
32-
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
3331

34-
# Add pull request annotations for Sphinx nitpicks (missing references)
32+
# To annotate PRs with Sphinx nitpicks (missing references)
3533
- name: 'Get list of changed files'
3634
if: github.event_name == 'pull_request'
3735
id: changed_files
3836
uses: Ana06/get-changed-files@v2.2.0
3937
with:
4038
filter: "Doc/**"
4139
format: csv # works for paths with spaces
42-
- name: 'Build changed files in nit-picky mode'
43-
if: github.event_name == 'pull_request'
40+
- name: 'Build HTML documentation'
4441
continue-on-error: true
4542
run: |
4643
set -Eeuo pipefail
47-
# Mark files the pull request modified
48-
python Doc/tools/touch-clean-files.py --clean '${{ steps.changed_files.outputs.added_modified }}'
49-
# Build docs with the '-n' (nit-picky) option; convert warnings to annotations
50-
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n --keep-going" html 2>&1 |
51-
python Doc/tools/warnings-to-gh-actions.py
52-
53-
# Ensure some files always pass Sphinx nit-picky mode (no missing references)
54-
- name: 'Build known-good files in nit-picky mode'
44+
# Build docs with the '-n' (nit-picky) option; write warnings to file
45+
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going -w sphinx-warnings.txt" html
46+
- name: 'Check warnings'
47+
if: github.event_name == 'pull_request'
5548
run: |
56-
# Mark files that must pass nit-picky
57-
python Doc/tools/touch-clean-files.py
58-
# Build docs with the '-n' (nit-picky) option, convert warnings to errors (-W)
59-
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going" html 2>&1
49+
python Doc/tools/check-warnings.py \
50+
--check-and-annotate '${{ steps.changed_files.outputs.added_modified }}' \
51+
--fail-if-regression \
52+
--fail-if-improved
6053
6154
# This build doesn't use problem matchers or check annotations
6255
build_doc_oldest_supported_sphinx:

‎.pre-commit-config.yaml

Copy file name to clipboardExpand all lines: .pre-commit-config.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
types_or: [c, python, rst]
1111

1212
- repo: https://github.com/sphinx-contrib/sphinx-lint
13-
rev: v0.6.7
13+
rev: v0.6.8
1414
hooks:
1515
- id: sphinx-lint
1616
args: [--enable=default-role]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.