Skip to content

Commit 1e62876

Browse files
committed
Merge remote-tracking branch 'upstream/main' into call-uops
2 parents cf8e2c0 + e28b0dc commit 1e62876

File tree

136 files changed

+5263
-2371
lines changed

Some content is hidden

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

136 files changed

+5263
-2371
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Include/internal/pycore_opcode.h generated
7575
Include/internal/pycore_opcode_metadata.h generated
7676
Include/internal/pycore_*_generated.h generated
7777
Include/opcode.h generated
78+
Include/opcode_ids.h generated
7879
Include/token.h generated
7980
Lib/_opcode_metadata.py generated
8081
Lib/keyword.py generated
@@ -89,6 +90,7 @@ Programs/test_frozenmain.h generated
8990
Python/Python-ast.c generated
9091
Python/executor_cases.c.h generated
9192
Python/generated_cases.c.h generated
93+
Python/abstract_interp_cases.c.h generated
9294
Python/opcode_targets.h generated
9395
Python/stdlib_module_names.h generated
9496
Tools/peg_generator/pegen/grammar_parser.py generated

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Bug report
2+
description: Submit a bug report
3+
labels: ["type-bug"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
**New to Python?**
9+
10+
For help or advice on using Python, try one of the following options instead of opening a GitHub issue:
11+
12+
- Posting on [Discourse](https://discuss.python.org/c/users/7)
13+
- Reading the [Python tutorial](https://docs.python.org/3/tutorial/)
14+
- Emailing [python-list](https://mail.python.org/mailman/listinfo/python-list)
15+
- type: checkboxes
16+
attributes:
17+
label: Checklist
18+
description: A bug in a third-party project (for example, `pip` or `requests`) should be reported to that project's issue tracker, not CPython
19+
options:
20+
- label: I am confident this is a bug in CPython, not a bug in a third-party project
21+
required: false
22+
- label: |
23+
I have searched the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc),
24+
and am confident this bug has not been reported before
25+
required: false
26+
- type: dropdown
27+
attributes:
28+
label: "CPython versions tested on:"
29+
multiple: true
30+
options:
31+
- "3.8"
32+
- "3.9"
33+
- "3.10"
34+
- "3.11"
35+
- "3.12"
36+
- "CPython main branch"
37+
validations:
38+
required: true
39+
- type: dropdown
40+
attributes:
41+
label: "Operating systems tested on:"
42+
multiple: true
43+
options:
44+
- Linux
45+
- macOS
46+
- Windows
47+
- Other
48+
validations:
49+
required: false
50+
- type: input
51+
attributes:
52+
label: "Output from running 'python -VV' on the command line:"
53+
description: If you tested with multiple operating systems or architectures, feel free to provide details in the main bug description.
54+
validations:
55+
required: false
56+
- type: textarea
57+
attributes:
58+
label: "A clear and concise description of the bug:"
59+
description: >
60+
Tell us what happened.
61+
Include a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) if possible.
62+
Put any code blocks inside triple backticks.
63+
64+
value: |
65+
```python
66+
# Add a code block here, if required
67+
```
68+
validations:
69+
required: true

.github/ISSUE_TEMPLATE/crash.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/crash.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Crash report
2+
description: A hard crash of the interpreter, possibly with a core dump
3+
labels: ["type-crash"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
This form is for hard crashes of the Python interpreter, segmentation faults, failed C-level assertions, and similar. Unexpected exceptions raised from Python functions in the standard library count as bugs rather than crashes.
9+
10+
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.
11+
- type: dropdown
12+
attributes:
13+
label: "CPython versions tested on:"
14+
multiple: true
15+
options:
16+
- "3.8"
17+
- "3.9"
18+
- "3.10"
19+
- "3.11"
20+
- "3.12"
21+
- "CPython main branch"
22+
validations:
23+
required: true
24+
- type: dropdown
25+
attributes:
26+
label: "Operating systems tested on:"
27+
multiple: true
28+
options:
29+
- Linux
30+
- macOS
31+
- Windows
32+
- Other
33+
validations:
34+
required: false
35+
- type: input
36+
attributes:
37+
label: "Output from running 'python -VV' on the command line:"
38+
description: If you tested with multiple operating systems or architectures, feel free to provide details in the main bug description.
39+
validations:
40+
required: false
41+
- type: textarea
42+
attributes:
43+
label: What happened?
44+
description: >
45+
Include a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) if possible.
46+
Put any code blocks inside triple backticks.
47+
48+
value: |
49+
```python
50+
# Add a code block here, if required
51+
```
52+
validations:
53+
required: true
54+
- type: textarea
55+
attributes:
56+
label: Error messages
57+
description: >
58+
Enter any error messages caused by the crash, including a core dump if there is one.
59+
Feel free to leave this bit blank if it isn't relevant.
60+
placeholder: |
61+
Error messages should be formatted like this:
62+
63+
<details>
64+
<summary>Error messages/core dump</summary>
65+
66+
```
67+
# paste errors here, if you have any
68+
```
69+
</details>
70+
validations:
71+
required: false

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Feature or enhancement
2+
description: Submit a proposal for a new CPython feature or enhancement
3+
labels: ["type-feature"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
# Proposing a feature to CPython?
9+
10+
You'll need to demonstrate widespread support for your idea among the community.
11+
12+
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.
13+
- type: checkboxes
14+
attributes:
15+
label: Has this already been discussed elsewhere?
16+
options:
17+
- label: I have already discussed this feature proposal on Discourse
18+
- label: This is a minor feature, which does not need previous discussion elsewhere
19+
- type: textarea
20+
attributes:
21+
label: "Links to previous discussion of this feature:"
22+
validations:
23+
required: false
24+
- type: input
25+
attributes:
26+
label: "Summary of proposal:"
27+
description: A one-line summary of your proposal.
28+
validations:
29+
required: true
30+
- type: textarea
31+
attributes:
32+
label: "Pitch:"
33+
description: >
34+
Explain why this feature or enhancement should be implemented and how it would be used.
35+
Add examples, if applicable.
36+
Put any code blocks inside triple backticks.
37+
value: |
38+
```python
39+
# Add a code block here, if required
40+
```
41+
validations:
42+
required: true

Doc/c-api/buffer.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,14 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
161161
If it is ``0``, :c:member:`~Py_buffer.buf` points to a single item representing
162162
a scalar. In this case, :c:member:`~Py_buffer.shape`, :c:member:`~Py_buffer.strides`
163163
and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``.
164+
The maximum number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`.
164165

165-
The macro :c:macro:`PyBUF_MAX_NDIM` limits the maximum number of dimensions
166-
to 64. Exporters MUST respect this limit, consumers of multi-dimensional
167-
buffers SHOULD be able to handle up to :c:macro:`PyBUF_MAX_NDIM` dimensions.
166+
.. :c:macro:: PyBUF_MAX_NDIM
167+
168+
The maximum number of dimensions the memory represents.
169+
Exporters MUST respect this limit, consumers of multi-dimensional
170+
buffers SHOULD be able to handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions.
171+
Currently set to 64.
168172
169173
.. c:member:: Py_ssize_t *shape
170174

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Quick Reference
147147
+------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
148148
| :c:member:`~PyTypeObject.tp_vectorcall` | :c:type:`vectorcallfunc` | | | | | |
149149
+------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
150-
| [:c:member:`~PyTypeObject.tp_watched`] | char | | | | | |
150+
| [:c:member:`~PyTypeObject.tp_watched`] | unsigned char | | | | | |
151151
+------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
152152

153153
.. [#slots]
@@ -2141,7 +2141,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
21412141
.. versionadded:: 3.9 (the field exists since 3.8 but it's only used since 3.9)
21422142

21432143

2144-
.. c:member:: char PyTypeObject.tp_watched
2144+
.. c:member:: unsigned char PyTypeObject.tp_watched
21452145
21462146
Internal. Do not use.
21472147

Doc/includes/typestruct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ typedef struct _typeobject {
8282
vectorcallfunc tp_vectorcall;
8383

8484
/* bitset of which type-watchers care about this type */
85-
char tp_watched;
85+
unsigned char tp_watched;
8686
} PyTypeObject;

0 commit comments

Comments
 (0)