[3.12] gh-110631: fix wrong indentation in the Doc/whatsnew dir (GH-110632) (#110690)

fix wrong indentation in the `Doc/whatsnew` dir (#110632)
This commit is contained in:
Ezio Melotti 2023-10-11 11:53:17 +02:00 committed by GitHub
parent ca971d12ed
commit 1ea4cb1a66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 191 additions and 191 deletions

View file

@ -875,11 +875,11 @@ The signature of the new function is::
The parameters are: The parameters are:
* *args*: positional arguments whose values will be printed out. * *args*: positional arguments whose values will be printed out.
* *sep*: the separator, which will be printed between arguments. * *sep*: the separator, which will be printed between arguments.
* *end*: the ending text, which will be printed after all of the * *end*: the ending text, which will be printed after all of the
arguments have been output. arguments have been output.
* *file*: the file object to which the output will be sent. * *file*: the file object to which the output will be sent.
.. seealso:: .. seealso::
@ -1138,11 +1138,11 @@ indicate that the external caller is done.
The *flags* argument to :c:func:`PyObject_GetBuffer` specifies The *flags* argument to :c:func:`PyObject_GetBuffer` specifies
constraints upon the memory returned. Some examples are: constraints upon the memory returned. Some examples are:
* :c:macro:`PyBUF_WRITABLE` indicates that the memory must be writable. * :c:macro:`PyBUF_WRITABLE` indicates that the memory must be writable.
* :c:macro:`PyBUF_LOCK` requests a read-only or exclusive lock on the memory. * :c:macro:`PyBUF_LOCK` requests a read-only or exclusive lock on the memory.
* :c:macro:`PyBUF_C_CONTIGUOUS` and :c:macro:`PyBUF_F_CONTIGUOUS` * :c:macro:`PyBUF_C_CONTIGUOUS` and :c:macro:`PyBUF_F_CONTIGUOUS`
requests a C-contiguous (last dimension varies the fastest) or requests a C-contiguous (last dimension varies the fastest) or
Fortran-contiguous (first dimension varies the fastest) array layout. Fortran-contiguous (first dimension varies the fastest) array layout.

View file

@ -365,7 +365,7 @@ raised from:
(Contributed by Pablo Galindo in :issue:`38530`.) (Contributed by Pablo Galindo in :issue:`38530`.)
.. warning:: .. warning::
Notice this won't work if :c:func:`PyErr_Display` is not called to display the error Notice this won't work if :c:func:`PyErr_Display` is not called to display the error
which can happen if some other custom error display function is used. This is a common which can happen if some other custom error display function is used. This is a common
scenario in some REPLs like IPython. scenario in some REPLs like IPython.
@ -387,7 +387,7 @@ was raised from:
(Contributed by Pablo Galindo in :issue:`38530`.) (Contributed by Pablo Galindo in :issue:`38530`.)
.. warning:: .. warning::
Notice this won't work if :c:func:`PyErr_Display` is not called to display the error, Notice this won't work if :c:func:`PyErr_Display` is not called to display the error,
which can happen if some other custom error display function is used. This is a common which can happen if some other custom error display function is used. This is a common
scenario in some REPLs like IPython. scenario in some REPLs like IPython.
@ -433,13 +433,13 @@ A match statement takes an expression and compares its value to successive
patterns given as one or more case blocks. Specifically, pattern matching patterns given as one or more case blocks. Specifically, pattern matching
operates by: operates by:
1. using data with type and shape (the ``subject``) 1. using data with type and shape (the ``subject``)
2. evaluating the ``subject`` in the ``match`` statement 2. evaluating the ``subject`` in the ``match`` statement
3. comparing the subject with each pattern in a ``case`` statement 3. comparing the subject with each pattern in a ``case`` statement
from top to bottom until a match is confirmed. from top to bottom until a match is confirmed.
4. executing the action associated with the pattern of the confirmed 4. executing the action associated with the pattern of the confirmed
match match
5. If an exact match is not confirmed, the last case, a wildcard ``_``, 5. If an exact match is not confirmed, the last case, a wildcard ``_``,
if provided, will be used as the matching case. If an exact match is if provided, will be used as the matching case. If an exact match is
not confirmed and a wildcard case does not exist, the entire match not confirmed and a wildcard case does not exist, the entire match
block is a no-op. block is a no-op.

View file

@ -917,11 +917,11 @@ abstract methods. The recommended approach to declaring abstract descriptors is
now to provide :attr:`__isabstractmethod__` as a dynamically updated now to provide :attr:`__isabstractmethod__` as a dynamically updated
property. The built-in descriptors have been updated accordingly. property. The built-in descriptors have been updated accordingly.
* :class:`abc.abstractproperty` has been deprecated, use :class:`property` * :class:`abc.abstractproperty` has been deprecated, use :class:`property`
with :func:`abc.abstractmethod` instead. with :func:`abc.abstractmethod` instead.
* :class:`abc.abstractclassmethod` has been deprecated, use * :class:`abc.abstractclassmethod` has been deprecated, use
:class:`classmethod` with :func:`abc.abstractmethod` instead. :class:`classmethod` with :func:`abc.abstractmethod` instead.
* :class:`abc.abstractstaticmethod` has been deprecated, use * :class:`abc.abstractstaticmethod` has been deprecated, use
:class:`staticmethod` with :func:`abc.abstractmethod` instead. :class:`staticmethod` with :func:`abc.abstractmethod` instead.
(Contributed by Darren Dale in :issue:`11610`.) (Contributed by Darren Dale in :issue:`11610`.)
@ -1060,14 +1060,14 @@ function to the :mod:`crypt` module.
curses curses
------ ------
* If the :mod:`curses` module is linked to the ncursesw library, use Unicode * If the :mod:`curses` module is linked to the ncursesw library, use Unicode
functions when Unicode strings or characters are passed (e.g. functions when Unicode strings or characters are passed (e.g.
:c:func:`waddwstr`), and bytes functions otherwise (e.g. :c:func:`waddstr`). :c:func:`waddwstr`), and bytes functions otherwise (e.g. :c:func:`waddstr`).
* Use the locale encoding instead of ``utf-8`` to encode Unicode strings. * Use the locale encoding instead of ``utf-8`` to encode Unicode strings.
* :class:`curses.window` has a new :attr:`curses.window.encoding` attribute. * :class:`curses.window` has a new :attr:`curses.window.encoding` attribute.
* The :class:`curses.window` class has a new :meth:`~curses.window.get_wch` * The :class:`curses.window` class has a new :meth:`~curses.window.get_wch`
method to get a wide character method to get a wide character
* The :mod:`curses` module has a new :meth:`~curses.unget_wch` function to * The :mod:`curses` module has a new :meth:`~curses.unget_wch` function to
push a wide character so the next :meth:`~curses.window.get_wch` will return push a wide character so the next :meth:`~curses.window.get_wch` will return
it it
@ -1076,14 +1076,14 @@ curses
datetime datetime
-------- --------
* Equality comparisons between naive and aware :class:`~datetime.datetime` * Equality comparisons between naive and aware :class:`~datetime.datetime`
instances now return :const:`False` instead of raising :exc:`TypeError` instances now return :const:`False` instead of raising :exc:`TypeError`
(:issue:`15006`). (:issue:`15006`).
* New :meth:`datetime.datetime.timestamp` method: Return POSIX timestamp * New :meth:`datetime.datetime.timestamp` method: Return POSIX timestamp
corresponding to the :class:`~datetime.datetime` instance. corresponding to the :class:`~datetime.datetime` instance.
* The :meth:`datetime.datetime.strftime` method supports formatting years * The :meth:`datetime.datetime.strftime` method supports formatting years
older than 1000. older than 1000.
* The :meth:`datetime.datetime.astimezone` method can now be * The :meth:`datetime.datetime.astimezone` method can now be
called without arguments to convert datetime instance to the system called without arguments to convert datetime instance to the system
timezone. timezone.
@ -1210,25 +1210,25 @@ the ``Message`` object it is serializing. The default policy is
The minimum set of controls implemented by all ``policy`` objects are: The minimum set of controls implemented by all ``policy`` objects are:
.. tabularcolumns:: |l|L| .. tabularcolumns:: |l|L|
=============== ======================================================= =============== =======================================================
max_line_length The maximum length, excluding the linesep character(s), max_line_length The maximum length, excluding the linesep character(s),
individual lines may have when a ``Message`` is individual lines may have when a ``Message`` is
serialized. Defaults to 78. serialized. Defaults to 78.
linesep The character used to separate individual lines when a linesep The character used to separate individual lines when a
``Message`` is serialized. Defaults to ``\n``. ``Message`` is serialized. Defaults to ``\n``.
cte_type ``7bit`` or ``8bit``. ``8bit`` applies only to a cte_type ``7bit`` or ``8bit``. ``8bit`` applies only to a
``Bytes`` ``generator``, and means that non-ASCII may ``Bytes`` ``generator``, and means that non-ASCII may
be used where allowed by the protocol (or where it be used where allowed by the protocol (or where it
exists in the original input). exists in the original input).
raise_on_defect Causes a ``parser`` to raise error when defects are raise_on_defect Causes a ``parser`` to raise error when defects are
encountered instead of adding them to the ``Message`` encountered instead of adding them to the ``Message``
object's ``defects`` list. object's ``defects`` list.
=============== ======================================================= =============== =======================================================
A new policy instance, with new settings, is created using the A new policy instance, with new settings, is created using the
:meth:`~email.policy.Policy.clone` method of policy objects. ``clone`` takes :meth:`~email.policy.Policy.clone` method of policy objects. ``clone`` takes
@ -1263,10 +1263,10 @@ removal of the code) may occur if deemed necessary by the core developers.
The new policies are instances of :class:`~email.policy.EmailPolicy`, The new policies are instances of :class:`~email.policy.EmailPolicy`,
and add the following additional controls: and add the following additional controls:
.. tabularcolumns:: |l|L| .. tabularcolumns:: |l|L|
=============== ======================================================= =============== =======================================================
refold_source Controls whether or not headers parsed by a refold_source Controls whether or not headers parsed by a
:mod:`~email.parser` are refolded by the :mod:`~email.parser` are refolded by the
:mod:`~email.generator`. It can be ``none``, ``long``, :mod:`~email.generator`. It can be ``none``, ``long``,
or ``all``. The default is ``long``, which means that or ``all``. The default is ``long``, which means that
@ -1275,9 +1275,9 @@ and add the following additional controls:
line get refolded, and ``all`` means that all lines line get refolded, and ``all`` means that all lines
get refolded. get refolded.
header_factory A callable that take a ``name`` and ``value`` and header_factory A callable that take a ``name`` and ``value`` and
produces a custom header object. produces a custom header object.
=============== ======================================================= =============== =======================================================
The ``header_factory`` is the key to the new features provided by the new The ``header_factory`` is the key to the new features provided by the new
policies. When one of the new policies is used, any header retrieved from policies. When one of the new policies is used, any header retrieved from
@ -1352,14 +1352,14 @@ API.
New utility functions: New utility functions:
* :func:`~email.utils.format_datetime`: given a :class:`~datetime.datetime`, * :func:`~email.utils.format_datetime`: given a :class:`~datetime.datetime`,
produce a string formatted for use in an email header. produce a string formatted for use in an email header.
* :func:`~email.utils.parsedate_to_datetime`: given a date string from * :func:`~email.utils.parsedate_to_datetime`: given a date string from
an email header, convert it into an aware :class:`~datetime.datetime`, an email header, convert it into an aware :class:`~datetime.datetime`,
or a naive :class:`~datetime.datetime` if the offset is ``-0000``. or a naive :class:`~datetime.datetime` if the offset is ``-0000``.
* :func:`~email.utils.localtime`: With no argument, returns the * :func:`~email.utils.localtime`: With no argument, returns the
current local time as an aware :class:`~datetime.datetime` using the local current local time as an aware :class:`~datetime.datetime` using the local
:class:`~datetime.timezone`. Given an aware :class:`~datetime.datetime`, :class:`~datetime.timezone`. Given an aware :class:`~datetime.datetime`,
converts it into an aware :class:`~datetime.datetime` using the converts it into an aware :class:`~datetime.datetime` using the