Skip to content

Commit a8b2d12

Browse files
authored
[3.11] gh-110631: fix wrong indentation in the Doc/whatsnew dir (GH-110632) (#110691)
fix wrong indentation in the `Doc/whatsnew` dir (#110632)
1 parent c6d5628 commit a8b2d12

File tree

5 files changed

+182
-182
lines changed

5 files changed

+182
-182
lines changed

Doc/whatsnew/2.6.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -875,11 +875,11 @@ The signature of the new function is::
875875

876876
The parameters are:
877877

878-
* *args*: positional arguments whose values will be printed out.
879-
* *sep*: the separator, which will be printed between arguments.
880-
* *end*: the ending text, which will be printed after all of the
881-
arguments have been output.
882-
* *file*: the file object to which the output will be sent.
878+
* *args*: positional arguments whose values will be printed out.
879+
* *sep*: the separator, which will be printed between arguments.
880+
* *end*: the ending text, which will be printed after all of the
881+
arguments have been output.
882+
* *file*: the file object to which the output will be sent.
883883

884884
.. seealso::
885885

@@ -1138,13 +1138,13 @@ indicate that the external caller is done.
11381138
The *flags* argument to :c:func:`PyObject_GetBuffer` specifies
11391139
constraints upon the memory returned. Some examples are:
11401140

1141-
* :c:macro:`PyBUF_WRITABLE` indicates that the memory must be writable.
1141+
* :c:macro:`PyBUF_WRITABLE` indicates that the memory must be writable.
11421142

1143-
* :c:macro:`PyBUF_LOCK` requests a read-only or exclusive lock on the memory.
1143+
* :c:macro:`PyBUF_LOCK` requests a read-only or exclusive lock on the memory.
11441144

1145-
* :c:macro:`PyBUF_C_CONTIGUOUS` and :c:macro:`PyBUF_F_CONTIGUOUS`
1146-
requests a C-contiguous (last dimension varies the fastest) or
1147-
Fortran-contiguous (first dimension varies the fastest) array layout.
1145+
* :c:macro:`PyBUF_C_CONTIGUOUS` and :c:macro:`PyBUF_F_CONTIGUOUS`
1146+
requests a C-contiguous (last dimension varies the fastest) or
1147+
Fortran-contiguous (first dimension varies the fastest) array layout.
11481148

11491149
Two new argument codes for :c:func:`PyArg_ParseTuple`,
11501150
``s*`` and ``z*``, return locked buffer objects for a parameter.

Doc/whatsnew/2.7.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,7 @@ Port-Specific Changes: Mac OS X
23672367
installation and a user-installed copy of the same version.
23682368
(Changed by Ronald Oussoren; :issue:`4865`.)
23692369

2370-
.. versionchanged:: 2.7.13
2370+
.. versionchanged:: 2.7.13
23712371

23722372
As of 2.7.13, this change was removed.
23732373
``/Library/Python/2.7/site-packages``, the site-packages directory

Doc/whatsnew/3.10.rst

+100-100
Original file line numberDiff line numberDiff line change
@@ -221,116 +221,116 @@ have been incorporated. Some of the most notable ones are as follows:
221221
222222
* Missing ``:`` before blocks:
223223
224-
.. code-block:: python
224+
.. code-block:: python
225225
226-
>>> if rocket.position > event_horizon
227-
File "<stdin>", line 1
228-
if rocket.position > event_horizon
229-
^
230-
SyntaxError: expected ':'
226+
>>> if rocket.position > event_horizon
227+
File "<stdin>", line 1
228+
if rocket.position > event_horizon
229+
^
230+
SyntaxError: expected ':'
231231
232-
(Contributed by Pablo Galindo in :issue:`42997`.)
232+
(Contributed by Pablo Galindo in :issue:`42997`.)
233233
234234
* Unparenthesised tuples in comprehensions targets:
235235
236-
.. code-block:: python
236+
.. code-block:: python
237237
238-
>>> {x,y for x,y in zip('abcd', '1234')}
239-
File "<stdin>", line 1
240-
{x,y for x,y in zip('abcd', '1234')}
241-
^
242-
SyntaxError: did you forget parentheses around the comprehension target?
238+
>>> {x,y for x,y in zip('abcd', '1234')}
239+
File "<stdin>", line 1
240+
{x,y for x,y in zip('abcd', '1234')}
241+
^
242+
SyntaxError: did you forget parentheses around the comprehension target?
243243
244-
(Contributed by Pablo Galindo in :issue:`43017`.)
244+
(Contributed by Pablo Galindo in :issue:`43017`.)
245245
246246
* Missing commas in collection literals and between expressions:
247247
248-
.. code-block:: python
248+
.. code-block:: python
249249
250-
>>> items = {
251-
... x: 1,
252-
... y: 2
253-
... z: 3,
254-
File "<stdin>", line 3
255-
y: 2
256-
^
257-
SyntaxError: invalid syntax. Perhaps you forgot a comma?
250+
>>> items = {
251+
... x: 1,
252+
... y: 2
253+
... z: 3,
254+
File "<stdin>", line 3
255+
y: 2
256+
^
257+
SyntaxError: invalid syntax. Perhaps you forgot a comma?
258258
259-
(Contributed by Pablo Galindo in :issue:`43822`.)
259+
(Contributed by Pablo Galindo in :issue:`43822`.)
260260
261261
* Multiple Exception types without parentheses:
262262
263-
.. code-block:: python
263+
.. code-block:: python
264264
265-
>>> try:
266-
... build_dyson_sphere()
267-
... except NotEnoughScienceError, NotEnoughResourcesError:
268-
File "<stdin>", line 3
269-
except NotEnoughScienceError, NotEnoughResourcesError:
270-
^
271-
SyntaxError: multiple exception types must be parenthesized
265+
>>> try:
266+
... build_dyson_sphere()
267+
... except NotEnoughScienceError, NotEnoughResourcesError:
268+
File "<stdin>", line 3
269+
except NotEnoughScienceError, NotEnoughResourcesError:
270+
^
271+
SyntaxError: multiple exception types must be parenthesized
272272
273-
(Contributed by Pablo Galindo in :issue:`43149`.)
273+
(Contributed by Pablo Galindo in :issue:`43149`.)
274274
275275
* Missing ``:`` and values in dictionary literals:
276276
277-
.. code-block:: python
277+
.. code-block:: python
278278
279-
>>> values = {
280-
... x: 1,
281-
... y: 2,
282-
... z:
283-
... }
284-
File "<stdin>", line 4
285-
z:
286-
^
287-
SyntaxError: expression expected after dictionary key and ':'
279+
>>> values = {
280+
... x: 1,
281+
... y: 2,
282+
... z:
283+
... }
284+
File "<stdin>", line 4
285+
z:
286+
^
287+
SyntaxError: expression expected after dictionary key and ':'
288288
289-
>>> values = {x:1, y:2, z w:3}
290-
File "<stdin>", line 1
291-
values = {x:1, y:2, z w:3}
292-
^
293-
SyntaxError: ':' expected after dictionary key
289+
>>> values = {x:1, y:2, z w:3}
290+
File "<stdin>", line 1
291+
values = {x:1, y:2, z w:3}
292+
^
293+
SyntaxError: ':' expected after dictionary key
294294
295-
(Contributed by Pablo Galindo in :issue:`43823`.)
295+
(Contributed by Pablo Galindo in :issue:`43823`.)
296296
297297
* ``try`` blocks without ``except`` or ``finally`` blocks:
298298
299-
.. code-block:: python
299+
.. code-block:: python
300300
301-
>>> try:
302-
... x = 2
303-
... something = 3
304-
File "<stdin>", line 3
305-
something = 3
306-
^^^^^^^^^
307-
SyntaxError: expected 'except' or 'finally' block
301+
>>> try:
302+
... x = 2
303+
... something = 3
304+
File "<stdin>", line 3
305+
something = 3
306+
^^^^^^^^^
307+
SyntaxError: expected 'except' or 'finally' block
308308
309-
(Contributed by Pablo Galindo in :issue:`44305`.)
309+
(Contributed by Pablo Galindo in :issue:`44305`.)
310310
311311
* Usage of ``=`` instead of ``==`` in comparisons:
312312
313-
.. code-block:: python
313+
.. code-block:: python
314314
315-
>>> if rocket.position = event_horizon:
316-
File "<stdin>", line 1
317-
if rocket.position = event_horizon:
318-
^
319-
SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='?
315+
>>> if rocket.position = event_horizon:
316+
File "<stdin>", line 1
317+
if rocket.position = event_horizon:
318+
^
319+
SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='?
320320
321-
(Contributed by Pablo Galindo in :issue:`43797`.)
321+
(Contributed by Pablo Galindo in :issue:`43797`.)
322322
323323
* Usage of ``*`` in f-strings:
324324
325-
.. code-block:: python
325+
.. code-block:: python
326326
327-
>>> f"Black holes {*all_black_holes} and revelations"
328-
File "<stdin>", line 1
329-
(*all_black_holes)
330-
^
331-
SyntaxError: f-string: cannot use starred expression here
327+
>>> f"Black holes {*all_black_holes} and revelations"
328+
File "<stdin>", line 1
329+
(*all_black_holes)
330+
^
331+
SyntaxError: f-string: cannot use starred expression here
332332
333-
(Contributed by Pablo Galindo in :issue:`41064`.)
333+
(Contributed by Pablo Galindo in :issue:`41064`.)
334334
335335
IndentationErrors
336336
~~~~~~~~~~~~~~~~~
@@ -365,10 +365,10 @@ raised from:
365365
366366
(Contributed by Pablo Galindo in :issue:`38530`.)
367367
368-
.. warning::
369-
Notice this won't work if :c:func:`PyErr_Display` is not called to display the error
370-
which can happen if some other custom error display function is used. This is a common
371-
scenario in some REPLs like IPython.
368+
.. warning::
369+
Notice this won't work if :c:func:`PyErr_Display` is not called to display the error
370+
which can happen if some other custom error display function is used. This is a common
371+
scenario in some REPLs like IPython.
372372
373373
NameErrors
374374
~~~~~~~~~~
@@ -387,10 +387,10 @@ was raised from:
387387
388388
(Contributed by Pablo Galindo in :issue:`38530`.)
389389
390-
.. warning::
391-
Notice this won't work if :c:func:`PyErr_Display` is not called to display the error,
392-
which can happen if some other custom error display function is used. This is a common
393-
scenario in some REPLs like IPython.
390+
.. warning::
391+
Notice this won't work if :c:func:`PyErr_Display` is not called to display the error,
392+
which can happen if some other custom error display function is used. This is a common
393+
scenario in some REPLs like IPython.
394394
395395
396396
PEP 626: Precise line numbers for debugging and other tools
@@ -433,16 +433,16 @@ A match statement takes an expression and compares its value to successive
433433
patterns given as one or more case blocks. Specifically, pattern matching
434434
operates by:
435435
436-
1. using data with type and shape (the ``subject``)
437-
2. evaluating the ``subject`` in the ``match`` statement
438-
3. comparing the subject with each pattern in a ``case`` statement
439-
from top to bottom until a match is confirmed.
440-
4. executing the action associated with the pattern of the confirmed
441-
match
442-
5. If an exact match is not confirmed, the last case, a wildcard ``_``,
443-
if provided, will be used as the matching case. If an exact match is
444-
not confirmed and a wildcard case does not exist, the entire match
445-
block is a no-op.
436+
1. using data with type and shape (the ``subject``)
437+
2. evaluating the ``subject`` in the ``match`` statement
438+
3. comparing the subject with each pattern in a ``case`` statement
439+
from top to bottom until a match is confirmed.
440+
4. executing the action associated with the pattern of the confirmed
441+
match
442+
5. If an exact match is not confirmed, the last case, a wildcard ``_``,
443+
if provided, will be used as the matching case. If an exact match is
444+
not confirmed and a wildcard case does not exist, the entire match
445+
block is a no-op.
446446
447447
Declarative approach
448448
~~~~~~~~~~~~~~~~~~~~
@@ -2210,16 +2210,16 @@ Removed
22102210
* Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings.
22112211
(Contributed by Inada Naoki in :issue:`41123`.)
22122212
2213-
* ``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or
2214-
:c:macro:`PyUnicode_GET_LENGTH`
2215-
* ``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or
2216-
:c:func:`PyUnicode_FromFormat`
2217-
* ``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use
2218-
:c:func:`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`
2219-
* ``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`
2220-
* ``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`
2221-
* ``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use
2222-
:c:func:`PyUnicode_FindChar`
2213+
* ``Py_UNICODE_strlen``: use :c:func:`PyUnicode_GetLength` or
2214+
:c:macro:`PyUnicode_GET_LENGTH`
2215+
* ``Py_UNICODE_strcat``: use :c:func:`PyUnicode_CopyCharacters` or
2216+
:c:func:`PyUnicode_FromFormat`
2217+
* ``Py_UNICODE_strcpy``, ``Py_UNICODE_strncpy``: use
2218+
:c:func:`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`
2219+
* ``Py_UNICODE_strcmp``: use :c:func:`PyUnicode_Compare`
2220+
* ``Py_UNICODE_strncmp``: use :c:func:`PyUnicode_Tailmatch`
2221+
* ``Py_UNICODE_strchr``, ``Py_UNICODE_strrchr``: use
2222+
:c:func:`PyUnicode_FindChar`
22232223
22242224
* Removed ``PyUnicode_GetMax()``. Please migrate to new (:pep:`393`) APIs.
22252225
(Contributed by Inada Naoki in :issue:`41103`.)

0 commit comments

Comments
 (0)