Skip to content

Commit a06e745

Browse files
authored
Merge branch 'main' into fix-issue-43633
2 parents c2842ce + a1c737b commit a06e745

File tree

196 files changed

+2384
-1145
lines changed

Some content is hidden

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

196 files changed

+2384
-1145
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 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

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,48 @@ 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,
23+
not a bug in a third-party project
24+
- [ ] I have searched the CPython issue tracker,
25+
and am confident this bug has not been reported before
26+
27+
## A clear and concise description of the bug
28+
29+
<!--
30+
Include a minimal, reproducible example if possible.
31+
(https://stackoverflow.com/help/minimal-reproducible-example)
32+
33+
Put any code blocks inside triple backticks:
34+
35+
```py
36+
your code here
37+
```
38+
39+
-->
40+
41+
2242

2343
# Your environment
2444

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

2747
- CPython versions tested on:
2848
- Operating system and architecture:
2949

3050
<!--
31-
You can freely edit this text. Remove any lines you believe are unnecessary.
51+
You can freely edit this form. Remove any lines you believe are unnecessary.
3252
-->

.github/ISSUE_TEMPLATE/crash.md

Lines 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

Lines 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
-->

Doc/c-api/bool.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ creation and deletion functions don't apply to booleans. The following macros
1111
are available, however.
1212

1313

14+
.. c:var:: PyTypeObject PyBool_Type
15+
16+
This instance of :c:type:`PyTypeObject` represents the Python boolean type; it
17+
is the same object as :class:`bool` in the Python layer.
18+
19+
1420
.. c:function:: int PyBool_Check(PyObject *o)
1521
1622
Return true if *o* is of type :c:data:`PyBool_Type`. This function always

Doc/c-api/capsule.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
121121
compared.)
122122
123123
In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls to
124-
any of the accessors (any function starting with :c:func:`PyCapsule_Get`) are
124+
any of the accessors (any function starting with ``PyCapsule_Get``) are
125125
guaranteed to succeed.
126126
127127
Return a nonzero value if the object is valid and matches the name passed in.

Doc/c-api/code.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ bound into a function.
3333
3434
Return the number of free variables in *co*.
3535
36-
.. c:function:: PyCodeObject* PyUnstable_Code_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
36+
.. c:function:: PyCodeObject* PyUnstable_Code_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, PyObject *qualname, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
3737
3838
Return a new code object. If you need a dummy code object to create a frame,
3939
use :c:func:`PyCode_NewEmpty` instead.
@@ -46,7 +46,7 @@ bound into a function.
4646
execution or VM crashes. Use this function only with extreme care.
4747
4848
.. versionchanged:: 3.11
49-
Added ``exceptiontable`` parameter.
49+
Added ``qualname`` and ``exceptiontable`` parameters.
5050
5151
.. index:: single: PyCode_New
5252
@@ -56,7 +56,7 @@ bound into a function.
5656
The old name is deprecated, but will remain available until the
5757
signature changes again.
5858
59-
.. c:function:: PyCodeObject* PyUnstable_Code_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
59+
.. c:function:: PyCodeObject* PyUnstable_Code_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, PyObject *qualname, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
6060
6161
Similar to :c:func:`PyUnstable_Code_New`, but with an extra "posonlyargcount" for positional-only arguments.
6262
The same caveats that apply to ``PyUnstable_Code_New`` also apply to this function.
@@ -66,7 +66,7 @@ bound into a function.
6666
.. versionadded:: 3.8 as ``PyCode_NewWithPosOnlyArgs``
6767
6868
.. versionchanged:: 3.11
69-
Added ``exceptiontable`` parameter.
69+
Added ``qualname`` and ``exceptiontable`` parameters.
7070
7171
.. versionchanged:: 3.12
7272

0 commit comments

Comments
 (0)