Skip to content

Commit

Permalink
pythongh-115664: Merge versionchanged directives for the same version
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Mar 7, 2024
1 parent 882fced commit 35d8dc4
Show file tree
Hide file tree
Showing 30 changed files with 28 additions and 98 deletions.
3 changes: 1 addition & 2 deletions Doc/library/_thread.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,8 @@ Lock objects have the following methods:
``False`` if not.

.. versionchanged:: 3.2
The *timeout* parameter is new.
Added the *timeout* parameter.

.. versionchanged:: 3.2
Lock acquires can now be interrupted by signals on POSIX.


Expand Down
9 changes: 2 additions & 7 deletions Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ All of those tests treat missing elements as having zero counts so that
.. versionchanged:: 3.10
Rich comparison operations were added.

.. versionchanged:: 3.10
In equality tests, missing elements are treated as having zero counts.
Formerly, ``Counter(a=3)`` and ``Counter(a=3, b=0)`` were considered
distinct.
Expand Down Expand Up @@ -887,18 +886,14 @@ they add the ability to access fields by name instead of position index.
Added support for *rename*.

.. versionchanged:: 3.6
Added the *module* parameter.
The *verbose* and *rename* parameters became
:ref:`keyword-only arguments <keyword-only_parameter>`.

.. versionchanged:: 3.6
Added the *module* parameter.

.. versionchanged:: 3.7
Removed the *verbose* parameter and the :attr:`_source` attribute.

.. versionchanged:: 3.7
Added the *defaults* parameter and the :attr:`_field_defaults`
attribute.
Removed the *verbose* parameter and the :attr:`_source` attribute.

.. doctest::
:options: +NORMALIZE_WHITESPACE
Expand Down
4 changes: 0 additions & 4 deletions Doc/library/compileall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,8 @@ Public functions
.. versionchanged:: 3.5
Added the *workers* parameter.

.. versionchanged:: 3.5
*quiet* parameter was changed to a multilevel value.

.. versionchanged:: 3.5
The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files
no matter what the value of *optimize* is.

Expand Down Expand Up @@ -281,7 +279,6 @@ Public functions
.. versionchanged:: 3.5
*quiet* parameter was changed to a multilevel value.

.. versionchanged:: 3.5
The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files
no matter what the value of *optimize* is.

Expand Down Expand Up @@ -310,7 +307,6 @@ Public functions
.. versionchanged:: 3.5
*quiet* parameter was changed to a multilevel value.

.. versionchanged:: 3.5
The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files
no matter what the value of *optimize* is.

Expand Down
1 change: 0 additions & 1 deletion Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2611,7 +2611,6 @@ Notes:
.. versionchanged:: 3.7
The UTC offset is not restricted to a whole number of minutes.

.. versionchanged:: 3.7
When the ``%z`` directive is provided to the :meth:`~.datetime.strptime` method,
the UTC offsets can have a colon as a separator between hours, minutes
and seconds.
Expand Down
2 changes: 0 additions & 2 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ operation is being performed, so the intermediate analysis object isn't useful:
.. versionchanged:: 3.7
Implemented recursive disassembling and added *depth* parameter.

.. versionchanged:: 3.7
This can now handle coroutine and asynchronous generator objects.

.. versionchanged:: 3.11
Expand Down Expand Up @@ -1493,7 +1492,6 @@ iterations of the loop.
.. versionchanged:: 3.13
The callable now always appears at the same position on the stack.

.. versionchanged:: 3.13
Calls with keyword arguments are now handled by :opcode:`CALL_KW`.


Expand Down
2 changes: 0 additions & 2 deletions Doc/library/fractions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,12 @@ another rational number, or from a string.
Underscores are now permitted when creating a :class:`Fraction` instance
from a string, following :PEP:`515` rules.

.. versionchanged:: 3.11
:class:`Fraction` implements ``__int__`` now to satisfy
``typing.SupportsInt`` instance checks.

.. versionchanged:: 3.12
Space is allowed around the slash for string inputs: ``Fraction('2 / 3')``.

.. versionchanged:: 3.12
:class:`Fraction` instances now support float-style formatting, with
presentation types ``"e"``, ``"E"``, ``"f"``, ``"F"``, ``"g"``, ``"G"``
and ``"%""``.
Expand Down
2 changes: 0 additions & 2 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,6 @@ are always available. They are listed here in alphabetical order.
.. versionchanged:: 3.11
The delegation to :meth:`~object.__trunc__` is deprecated.

.. versionchanged:: 3.11
:class:`int` string inputs and string representations can be limited to
help avoid denial of service attacks. A :exc:`ValueError` is raised when
the limit is exceeded while converting a string *x* to an :class:`int` or
Expand Down Expand Up @@ -1443,7 +1442,6 @@ are always available. They are listed here in alphabetical order.
the second argument to be negative, permitting computation of modular
inverses.

.. versionchanged:: 3.8
Allow keyword arguments. Formerly, only positional arguments were
supported.

Expand Down
1 change: 0 additions & 1 deletion Doc/library/hashlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ accessible by name via :func:`new`. See :data:`algorithms_available`.
that the hashing algorithm is not used in a security context, e.g. as a
non-cryptographic one-way compression function.

.. versionchanged:: 3.9
Hashlib now uses SHA3 and SHAKE from OpenSSL if it provides it.

.. versionchanged:: 3.12
Expand Down
1 change: 0 additions & 1 deletion Doc/library/http.client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ The module provides the following classes:
.. versionchanged:: 3.2
*source_address*, *context* and *check_hostname* were added.

.. versionchanged:: 3.2
This class now supports HTTPS virtual hosts if possible (that is,
if :const:`ssl.HAS_SNI` is true).

Expand Down
3 changes: 1 addition & 2 deletions Doc/library/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -996,9 +996,8 @@ Text I/O
object is immediately handled to its underlying binary *buffer*.

.. versionchanged:: 3.3
The *write_through* argument has been added.
The *write_through* parameter has been added.

.. versionchanged:: 3.3
The default *encoding* is now ``locale.getpreferredencoding(False)``
instead of ``locale.getpreferredencoding()``. Don't change temporary the
locale encoding using :func:`locale.setlocale`, use the current locale
Expand Down
1 change: 0 additions & 1 deletion Doc/library/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ Basic Usage
.. versionchanged:: 3.6
All optional parameters are now :ref:`keyword-only <keyword-only_parameter>`.

.. versionchanged:: 3.6
*fp* can now be a :term:`binary file`. The input encoding should be
UTF-8, UTF-16 or UTF-32.

Expand Down
7 changes: 1 addition & 6 deletions Doc/library/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1085,12 +1085,7 @@ information into logging calls. For a usage example, see the section on

.. versionchanged:: 3.13

Remove the undocumented :meth:`!warn`` method which was an alias to the
:meth:`!warning` method.

.. versionchanged:: 3.13

The *merge_extra* argument was added.
The *merge_extra* parameter was added.


Thread Safety
Expand Down
1 change: 0 additions & 1 deletion Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3262,7 +3262,6 @@ features:
.. versionchanged:: 3.8
Added the :attr:`st_reparse_tag` member on Windows.

.. versionchanged:: 3.8
On Windows, the :attr:`st_mode` member now identifies special
files as :const:`S_IFCHR`, :const:`S_IFIFO` or :const:`S_IFBLK`
as appropriate.
Expand Down
17 changes: 5 additions & 12 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,10 @@ Pure paths provide the following methods and properties:
>>> PurePath('/a/b/c.py').match('a/*.py')
False

.. versionchanged:: 3.12
The *pattern* parameter accepts a :term:`path-like object`.

.. versionchanged:: 3.12
The *case_sensitive* parameter was added.

The *pattern* parameter accepts a :term:`path-like object`.

.. method:: PurePath.relative_to(other, walk_up=False)

Expand Down Expand Up @@ -1030,7 +1028,6 @@ call fails (for example because the path doesn't exist).
.. versionchanged:: 3.13
The *follow_symlinks* parameter was added.

.. versionchanged:: 3.13
The *pattern* parameter accepts a :term:`path-like object`.


Expand All @@ -1050,7 +1047,6 @@ call fails (for example because the path doesn't exist).
.. versionchanged:: 3.13
The *follow_symlinks* parameter was added.

.. versionchanged:: 3.13
The *pattern* parameter accepts a :term:`path-like object`.


Expand All @@ -1062,13 +1058,11 @@ call fails (for example because the path doesn't exist).
This method normally follows symlinks; to get the group of the symlink, add
the argument ``follow_symlinks=False``.

.. versionchanged:: 3.13
Raises :exc:`UnsupportedOperation` if the :mod:`grp` module is not
available. In previous versions, :exc:`NotImplementedError` was raised.

.. versionchanged:: 3.13
The *follow_symlinks* parameter was added.

Raises :exc:`UnsupportedOperation` if the :mod:`grp` module is not
available. In previous versions, :exc:`NotImplementedError` was raised.

.. method:: Path.is_dir(*, follow_symlinks=True)

Expand Down Expand Up @@ -1343,12 +1337,11 @@ call fails (for example because the path doesn't exist).
the argument ``follow_symlinks=False``.

.. versionchanged:: 3.13
The *follow_symlinks* parameter was added.

Raises :exc:`UnsupportedOperation` if the :mod:`pwd` module is not
available. In previous versions, :exc:`NotImplementedError` was raised.

.. versionchanged:: 3.13
The *follow_symlinks* parameter was added.


.. method:: Path.read_bytes()

Expand Down
1 change: 0 additions & 1 deletion Doc/library/pdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,6 @@ can be overridden by the local file.
``exit()`` and ``quit()`` can be used to exit the :pdbcmd:`interact`
command.

.. versionchanged:: 3.13
:pdbcmd:`interact` directs its output to the debugger's
output channel rather than :data:`sys.stderr`.

Expand Down
14 changes: 5 additions & 9 deletions Doc/library/sched.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ scheduler:
applications.

.. versionchanged:: 3.3
*timefunc* and *delayfunc* parameters are optional.
The *timefunc* and *delayfunc* parameters are optional.

.. versionchanged:: 3.3
:class:`scheduler` class can be safely used in multi-threaded
environments.

Expand Down Expand Up @@ -84,11 +83,9 @@ Scheduler Objects
(see :meth:`cancel`).

.. versionchanged:: 3.3
*argument* parameter is optional.

.. versionchanged:: 3.3
*kwargs* parameter was added.
The *kwargs* parameter was added.

The *argument* parameter is optional.

.. method:: scheduler.enter(delay, priority, action, argument=(), kwargs={})

Expand All @@ -97,10 +94,9 @@ Scheduler Objects
:meth:`enterabs`.

.. versionchanged:: 3.3
*argument* parameter is optional.
The *kwargs* parameter was added.

.. versionchanged:: 3.3
*kwargs* parameter was added.
The *argument* parameter is optional.

.. method:: scheduler.cancel(event)

Expand Down
5 changes: 2 additions & 3 deletions Doc/library/shutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,12 @@ Directory and files operations
Now returns *dst*.

.. versionchanged:: 3.8
Added the *dirs_exist_ok* parameter.

Platform-specific fast-copy syscalls may be used internally in order to
copy the file more efficiently. See
:ref:`shutil-platform-dependent-efficient-copy-operations` section.

.. versionchanged:: 3.8
Added the *dirs_exist_ok* parameter.

.. function:: rmtree(path, ignore_errors=False, onerror=None, *, onexc=None, dir_fd=None)

.. index:: single: directory; deleting
Expand Down
10 changes: 3 additions & 7 deletions Doc/library/smtplib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
where ``data`` is the bytes about to be sent to the remote host.

.. versionchanged:: 3.3
Support for the :keyword:`with` statement was added.
The *source_address* parameter was added.

.. versionchanged:: 3.3
*source_address* argument was added.
Support for the :keyword:`with` statement was added.

.. versionadded:: 3.5
The SMTPUTF8 extension (:rfc:`6531`) is now supported.
Expand All @@ -90,10 +89,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
best practices.

.. versionchanged:: 3.3
*context* was added.

.. versionchanged:: 3.3
The *source_address* argument was added.
The *context* and *source_address* parameters were added.

.. versionchanged:: 3.4
The class now supports hostname check with
Expand Down
7 changes: 2 additions & 5 deletions Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -740,15 +740,13 @@ The following functions all create :ref:`socket objects <socket-objects>`.
The AF_RDS family was added.

.. versionchanged:: 3.4
The CAN_BCM protocol was added.
The CAN_BCM protocol was added.

.. versionchanged:: 3.4
The returned socket is now non-inheritable.

.. versionchanged:: 3.7
The CAN_ISOTP protocol was added.
The CAN_ISOTP protocol was added.

.. versionchanged:: 3.7
When :const:`SOCK_NONBLOCK` or :const:`SOCK_CLOEXEC`
bit flags are applied to *type* they are cleared, and
:attr:`socket.type` will not reflect them. They are still passed
Expand Down Expand Up @@ -1802,7 +1800,6 @@ to sockets.
The socket timeout is no longer reset each time data is sent successfully.
The socket timeout is now the maximum total duration to send all data.

.. versionchanged:: 3.5
If the system call is interrupted and the signal handler does not raise
an exception, the method now retries the system call instead of raising
an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
Expand Down
3 changes: 0 additions & 3 deletions Doc/library/ssl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,6 @@ SSL Sockets
.. versionchanged:: 3.5
The :meth:`sendfile` method was added.

.. versionchanged:: 3.5
The :meth:`shutdown` does not reset the socket timeout each time bytes
are received or sent. The socket timeout is now the maximum total duration
of the shutdown.
Expand Down Expand Up @@ -1464,8 +1463,6 @@ to speed up repeated connections from the same clients.
context class will either require :data:`PROTOCOL_TLS_CLIENT` or
:data:`PROTOCOL_TLS_SERVER` protocol in the future.

.. versionchanged:: 3.10

The default cipher suites now include only secure AES and ChaCha20
ciphers with forward secrecy and security level 2. RSA and DH keys with
less than 2048 bits and ECC keys with less than 224 bits are prohibited.
Expand Down
2 changes: 0 additions & 2 deletions Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,6 @@ always available.

.. versionchanged:: 3.11
Added the ``safe_path`` attribute for :option:`-P` option.

.. versionchanged:: 3.11
Added the ``int_max_str_digits`` attribute.


Expand Down
Loading

0 comments on commit 35d8dc4

Please sign in to comment.