8000 Pull in main · python/cpython@ce62430 · GitHub
[go: up one dir, main page]

Skip to content

Commit ce62430

Browse files
Pull in main
2 parents 6af3de4 + 199438b commit ce62430

File tree

15 files changed

+177
-169
lines changed

15 files changed

+177
-169
lines changed

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,26 @@ body:
1010
You'll need to demonstrate widespread support for your idea among the community.
1111
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.
13-
- type: checkboxes
13+
- type: dropdown
1414
attributes:
15-
label: Has this already been discussed elsewhere?
15+
label: Has this already been discussed elsewhere?
1616
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
17+
- No response given
18+
- I have already discussed this feature proposal on Discourse
19+
- This is a minor feature, which does not need previous discussion elsewhere
20+
multiple: false
21+
validations:
22+
required: true
1923
- type: textarea
2024
attributes:
2125
label: "Links to previous discussion of this feature:"
2226
validations:
2327
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
3028
- type: textarea
3129
attributes:
32-
label: "Pitch:"
30+
label: "Proposal:"
3331
description: >
34-
Explain why this feature or enhancement should be implemented and how it would be used.
32+
Explain your proposal, why it should be implemented, and how it would be used.
3533
Add examples, if applicable.
3634
Put any code blocks inside triple backticks.
3735
value: |

.github/problem-matchers/sphinx.json

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

.github/workflows/reusable-docs.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
timeout-minutes: 60
1919
steps:
2020
- uses: actions/checkout@v3
21-
- name: Register Sphinx problem matcher
22-
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
2321
- name: 'Set up Python'
2422
uses: actions/setup-python@v4
2523
with:
@@ -76,8 +74,6 @@ jobs:
7674
timeout-minutes: 60
7775
steps:
7876
- uses: actions/checkout@v3
79-
- name: Register Sphinx problem matcher
80-
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
8177
- uses: actions/cache@v3
8278
with:
8379
path: ~/.cache/pip

Doc/c-api/buffer.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,6 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
163163
and :c:member:`~Py_buffer.suboffsets` MUST be ``NULL``.
164164
The maximum number of dimensions is given by :c:macro:`PyBUF_MAX_NDIM`.
165165

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.
172-
173166
.. c:member:: Py_ssize_t *shape
174167
175168
An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`
@@ -221,6 +214,17 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
221214
freed when the buffer is released. The consumer MUST NOT alter this
222215
value.
223216

217+
218+
Constants:
219+
220+
.. c:macro:: PyBUF_MAX_NDIM
221+
222+
The maximum number of dimensions the memory represents.
223+
Exporters MUST respect this limit, consumers of multi-dimensional
224+
buffers SHOULD be able to handle up to :c:macro:`!PyBUF_MAX_NDIM` dimensions.
225+
Currently set to 64.
226+
227+
224228
.. _buffer-request-types:
225229

226230
Buffer request types
@@ -444,7 +448,7 @@ Buffer-related functions
444448
445449
Send a request to *exporter* to fill in *view* as specified by *flags*.
446450
If the exporter cannot provide a buffer of the exact type, it MUST raise
447-
:c:data:`PyExc_BufferError`, set ``view->obj`` to ``NULL`` and
451+
:exc:`BufferError`, set ``view->obj`` to ``NULL`` and
448452
return ``-1``.
449453
450454
On success, fill in *view*, set ``view->obj`` to a new reference
@@ -531,7 +535,7 @@ Buffer-related functions
531535
and :c:macro:`PyBUF_WRITABLE` is set in *flags*.
532536
533537
On success, set ``view->obj`` to a new reference to *exporter* and
534-
return 0. Otherwise, raise :c:data:`PyExc_BufferError`, set
538+
return 0. Otherwise, raise :exc:`BufferError`, set
535539
``view->obj`` to ``NULL`` and return ``-1``;
536540
537541
If this function is used as part of a :ref:`getbufferproc <buffer-structs>`,

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2443,7 +2443,7 @@ Buffer Object Structures
24432443
Except for point (3), an implementation of this function MUST take these
24442444
steps:
24452445

2446-
(1) Check if the request can be met. If not, raise :c:data:`PyExc_BufferError`,
2446+
(1) Check if the request can be met. If not, raise :exc:`BufferError`,
24472447
set :c:expr:`view->obj` to ``NULL`` and return ``-1``.
24482448

24492449
(2) Fill in the requested fields.

Doc/library/site.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Module contents
189189
:func:`getuserbase` hasn't been called yet. Default value is
190190
:file:`~/.local` for UNIX and macOS non-framework builds,
191191
:file:`~/Library/Python/{X.Y}` for macOS framework builds, and
192-
:file:`{%APPDATA%}\\Python` for Windows. This value is used by Distutils to
192+
:file:`{%APPDATA%}\\Python` for Windows. This value is used to
193193
compute the installation directories for scripts, data files, Python modules,
194< 10000 /code>194
etc. for the :ref:`user installation scheme <inst-alt-install-user>`.
195195
See also :envvar:`PYTHONUSERBASE`.

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# as tested on the CI via check-warnings.py in reusable-docs.yml.
33
# Keep lines sorted lexicographically to help avoid merge conflicts.
44

5-
Doc/c-api/buffer.rst
65
Doc/c-api/datetime.rst
76
Doc/c-api/descriptor.rst
87
Doc/c-api/exceptions.rst

Doc/whatsnew/3.13.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,9 @@ Removed
941941
* ``Py_SetPath()``: set :c:member:`PyConfig.module_search_paths` instead.
942942
* ``Py_SetProgramName()``: set :c:member:`PyConfig.program_name` instead.
943943
* ``Py_SetPythonHome()``: set :c:member:`PyConfig.home` instead.
944-
* ``Py_SetStandardStreamEncoding()``: set :c:member:`PyConfig.stdio_encoding` instead.
944+
* ``Py_SetStandardStreamEncoding()``: set :c:member:`PyConfig.stdio_encoding`
945+
instead, and set also maybe :c:member:`PyConfig.legacy_windows_stdio` (on
946+
Windows).
945947
* ``_Py_SetProgramFullPath()``: set :c:member:`PyConfig.executable` instead.
946948

947949
Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization

Lib/test/test_capi/test_watchers.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,10 @@ def test_clear_unassigned_watcher_id(self):
351351
self.clear_watcher(1)
352352

353353
def test_no_more_ids_available(self):
354-
contexts = [self.watcher() for i in range(self.TYPE_MAX_WATCHERS)]
355-
with ExitStack() as stack:
356-
for ctx in contexts:
357-
stack.enter_context(ctx)
358-
with self.assertRaisesRegex(RuntimeError, r"no more type watcher IDs"):
359-
self.add_watcher()
354+
with self.assertRaisesRegex(RuntimeError, r"no more type watcher IDs"):
355+
with ExitStack() as stack:
356+
for _ in range(self.TYPE_MAX_WATCHERS + 1):
357+
stack.enter_context(self.watcher())
360358

361359

362360
class TestCodeObjectWatchers(unittest.TestCase):

Lib/test/test_clinic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ class C "void *" ""
682682
foo2 as .illegal. = foo1
683683
[clinic start generated code]*/
684684
"""
685-
err = "Illegal C basename: '.illegal. = foo1'"
685+
err = "Illegal C basename: '.illegal.'"
686686
self.expect_failure(block, err, lineno=7)
687687

688688

0 commit comments

Comments
 (0)
0