commit d536ac1c481517e853ec229923c9742dd7068bba Author: Zearin Date: Mon Feb 15 10:39:48 2016 -0500 Use versionadded over versionchanged where appropriate - Where this change occurs, edit the descriptions accordingly. - Other minor edits infrequently made for phrasing or formatting. diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst index 31f681d..c4d2135 100644 --- a/Doc/library/2to3.rst +++ b/Doc/library/2to3.rst @@ -100,7 +100,7 @@ alternate directory for processed output files to be written to. The when not overwriting the input files. .. versionadded:: 3.2.3 - The :option:`-o` option was added. + The :option:`-o` option. The :option:`-W` or :option:`--write-unchanged-files` flag tells 2to3 to always write output files even if no changes were required to the file. This is most @@ -109,7 +109,7 @@ translation from one directory to another. This option implies the :option:`-w` flag as it would not make sense otherwise. .. versionadded:: 3.2.3 - The :option:`-W` flag was added. + The :option:`-W` flag. The :option:`--add-suffix` option specifies a string to append to all output filenames. The :option:`-n` flag is required when specifying this as backups @@ -120,7 +120,7 @@ are not necessary when writing to different filenames. Example:: Will cause a converted file named ``example.py3`` to be written. .. versionadded:: 3.2.3 - The :option:`--add-suffix` option was added. + The :option:`--add-suffix` option. To translate an entire project from one directory tree to another use:: diff --git a/Doc/library/_thread.rst b/Doc/library/_thread.rst index 7122861..7b75cb2 100644 --- a/Doc/library/_thread.rst +++ b/Doc/library/_thread.rst @@ -138,8 +138,8 @@ Lock objects have the following methods: The return value is ``True`` if the lock is acquired successfully, ``False`` if not. - .. versionchanged:: 3.2 - The *timeout* parameter is new. + .. versionadded:: 3.2 + The *timeout* parameter. .. versionchanged:: 3.2 Lock acquires can now be interrupted by signals on POSIX. diff --git a/Doc/library/aifc.rst b/Doc/library/aifc.rst index 6fbcf28..f974ca7 100644 --- a/Doc/library/aifc.rst +++ b/Doc/library/aifc.rst @@ -54,8 +54,8 @@ Module :mod:`aifc` defines the following function: The :func:`.open` function may be used in a :keyword:`with` statement. When the :keyword:`with` block completes, the :meth:`~aifc.close` method is called. - .. versionchanged:: 3.4 - Support for the :keyword:`with` statement was added. + .. versionadded:: 3.4 + Support for the :keyword:`with` statement. Objects returned by :func:`.open` when a file is opened for reading have the following methods: diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 2877437..02292c9 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -172,8 +172,8 @@ ArgumentParser objects * allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is unambiguous. (default: ``True``) - .. versionchanged:: 3.5 - *allow_abbrev* parameter was added. + .. versionadded:: 3.5 + The *allow_abbrev* parameter. The following sections describe how each of these are used. diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 8c3b7e4..9b06df2 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -126,7 +126,7 @@ and classes for traversing abstract syntax trees: operators or indexing. .. versionchanged:: 3.2 - Now allows bytes and set literals. + Now allows ``bytes`` and ``set`` literals. .. function:: get_docstring(node, clean=True) diff --git a/Doc/library/asyncio-queue.rst b/Doc/library/asyncio-queue.rst index f11c09a..30b4d07 100644 --- a/Doc/library/asyncio-queue.rst +++ b/Doc/library/asyncio-queue.rst @@ -32,8 +32,8 @@ Queue This class is :ref:`not thread safe `. - .. versionchanged:: 3.4.4 - New :meth:`join` and :meth:`task_done` methods. + .. versionadded:: 3.4.4 + The :meth:`join` and :meth:`task_done` methods. .. method:: empty() diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst index 3f0161f..889b325 100644 --- a/Doc/library/base64.rst +++ b/Doc/library/base64.rst @@ -41,7 +41,10 @@ package instead. .. versionchanged:: 3.4 Any :term:`bytes-like object`\ s are now accepted by all - encoding and decoding functions in this module. Ascii85/Base85 support added. + encoding and decoding functions in this module. + +.. versionadded:: 3.4 + Ascii85/Base85 support. The modern interface provides: diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst index 632ecf7..286f098 100644 --- a/Doc/library/binascii.rst +++ b/Doc/library/binascii.rst @@ -58,8 +58,8 @@ The :mod:`binascii` module defines the following functions: value is the converted line, including a newline char if *newline* is true. The output of this function conforms to :rfc:`3548`. - .. versionchanged:: 3.6 - Added the *newline* parameter. + .. versionadded:: 3.6 + The *newline* parameter. .. function:: a2b_qp(data, header=False) diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index 1b8d9cf..6cf98cb 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -102,23 +102,23 @@ All of the classes in this module may safely be accessed from multiple threads. .. versionadded:: 3.3 - .. versionchanged:: 3.1 - Support for the :keyword:`with` statement was added. + .. versionadded:: 3.1 + Support for the :keyword:`with` statement. - .. versionchanged:: 3.3 + .. versionadded:: 3.3 The :meth:`fileno`, :meth:`readable`, :meth:`seekable`, :meth:`writable`, - :meth:`read1` and :meth:`readinto` methods were added. + :meth:`read1` and :meth:`readinto` methods. .. versionchanged:: 3.3 - Support was added for *filename* being a :term:`file object` instead of an + The *filename* argument may now be a :term:`file object` instead of an actual filename. - .. versionchanged:: 3.3 - The ``'a'`` (append) mode was added, along with support for reading + .. versionadded:: 3.3 + The ``'a'`` (append) mode, along with support for reading multi-stream files. - .. versionchanged:: 3.4 - The ``'x'`` (exclusive creation) mode was added. + .. versionadded:: 3.4 + The ``'x'`` (exclusive creation) mode. .. versionchanged:: 3.5 The :meth:`~io.BufferedIOBase.read` method now accepts an argument of @@ -190,8 +190,8 @@ Incremental (de)compression raises an `EOFError`. Any data found after the end of the stream is ignored and saved in the :attr:`~.unused_data` attribute. - .. versionchanged:: 3.5 - Added the *max_length* parameter. + .. versionadded:: 3.5 + The *max_length* parameter. .. attribute:: eof @@ -237,6 +237,6 @@ One-shot (de)compression For incremental decompression, use a :class:`BZ2Decompressor` instead. - .. versionchanged:: 3.3 - Support for multi-stream inputs was added. + .. versionadded:: 3.3 + Support for multi-stream inputs. diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst index 7e496ca..0fa1f34 100644 --- a/Doc/library/cgi.rst +++ b/Doc/library/cgi.rst @@ -185,9 +185,8 @@ A form submitted via POST that also has a query string will contain both The :attr:`~FieldStorage.file` attribute is automatically closed upon the garbage collection of the creating :class:`FieldStorage` instance. -.. versionchanged:: 3.5 - Added support for the context management protocol to the - :class:`FieldStorage` class. +.. versionadded:: 3.5 + Support for using :class:`FieldStorage` as a context manager. Higher Level Interface diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst index d9b93ad..0058450 100644 --- a/Doc/library/collections.abc.rst +++ b/Doc/library/collections.abc.rst @@ -130,9 +130,8 @@ ABC Inherits from Abstract Methods Mixin linked list), the mixins will have quadratic performance and will likely need to be overridden. - .. versionchanged:: 3.5 - The index() method added support for *stop* and *start* - arguments. + .. versionadded:: 3.5 + The *stop* and *start* arguments of the ``index()`` method. .. class:: Set diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 080f968..dfd826d 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -86,8 +86,8 @@ The class can be used to simulate nested scopes and is useful in templating. creating subcontexts that can be updated without altering values in any of the parent mappings. - .. versionchanged:: 3.4 - The optional ``m`` parameter was added. + .. versionadded:: 3.4 + The optional ``m`` parameter. .. attribute:: parents @@ -343,7 +343,7 @@ or subtracting from an empty counter. Counter({'b': 4}) .. versionadded:: 3.3 - Added support for unary plus, unary minus, and in-place multiset operations. + Support for unary plus, unary minus, and in-place multiset operations. .. note:: @@ -1157,6 +1157,6 @@ attribute. subclass) or an arbitrary sequence which can be converted into a string using the built-in :func:`str` function. - .. versionchanged:: 3.5 - New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, + .. versionadded:: 3.5 + The methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, ``isprintable``, and ``maketrans``. diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index 679c2b4..0700a03 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -84,13 +84,16 @@ compile Python sources. If ``0`` is used, then the result of :func:`os.cpu_count()` will be used. -.. versionchanged:: 3.2 - Added the ``-i``, ``-b`` and ``-h`` options. +.. versionadded:: 3.2 + The ``-i``, ``-b``, and ``-h`` options. + +.. versionadded:: 3.5 + The ``-j``, ``-r``, and ``-qq`` options. .. versionchanged:: 3.5 - Added the ``-j``, ``-r``, and ``-qq`` options. ``-q`` option - was changed to a multilevel value. ``-b`` will always produce a - byte-code file ending in ``.pyc``, never ``.pyo``. + The ``-q`` option was changed to a multilevel value. + ``-b`` will always produce a byte-code file ending in + ``.pyc``, never ``.pyo``. There is no command-line option to control the optimization level used by the @@ -141,11 +144,11 @@ Public functions then sequential compilation will be used as a fallback. If *workers* is lower than ``0``, a :exc:`ValueError` will be raised. - .. versionchanged:: 3.2 - Added the *legacy* and *optimize* parameter. + .. versionadded:: 3.2 + The *legacy* and *optimize* parameters. - .. versionchanged:: 3.5 - Added the *workers* parameter. + .. versionadded:: 3.5 + The *workers* parameter. .. versionchanged:: 3.5 *quiet* parameter was changed to a multilevel value. @@ -201,8 +204,8 @@ Public functions function. Note that unlike the other compile functions, ``maxlevels`` defaults to ``0``. - .. versionchanged:: 3.2 - Added the *legacy* and *optimize* parameter. + .. versionadded:: 3.2 + The *legacy* and *optimize* parameters. .. versionchanged:: 3.5 *quiet* parameter was changed to a multilevel value. diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 5fc8b90..93134d6 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -56,8 +56,8 @@ Executor Objects performance compared to the default size of 1. With :class:`ThreadPoolExecutor`, *chunksize* has no effect. - .. versionchanged:: 3.5 - Added the *chunksize* argument. + .. versionadded:: 3.5 + The *chunksize* argument. .. method:: shutdown(wait=True) @@ -198,7 +198,7 @@ to a :class:`ProcessPoolExecutor` will result in deadlock. .. versionchanged:: 3.3 When one of the worker processes terminates abruptly, a :exc:`BrokenProcessPool` error is now raised. Previously, behaviour - was undefined but operations on the executor or its futures would often + was undefined, but operations on the executor or its futures would often freeze or deadlock. diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index c9187a3..27702f4 100644 --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -926,13 +926,12 @@ ConfigParser Objects .. versionchanged:: 3.1 The default *dict_type* is :class:`collections.OrderedDict`. - .. versionchanged:: 3.2 - *allow_no_value*, *delimiters*, *comment_prefixes*, *strict*, - *empty_lines_in_values*, *default_section* and *interpolation* were - added. + .. versionadded:: 3.2 + The arguments *allow_no_value*, *delimiters*, *comment_prefixes*, *strict*, + *empty_lines_in_values*, *default_section*, and *interpolation*. - .. versionchanged:: 3.5 - The *converters* argument was added. + .. versionadded:: 3.5 + The *converters* argument. .. method:: defaults() @@ -1247,7 +1246,7 @@ Exceptions .. versionadded:: 3.2 Optional ``source`` and ``lineno`` attributes and arguments to - :meth:`__init__` were added. + :meth:`__init__`. .. exception:: DuplicateOptionError diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst index 4fcfaef..5e98ae9 100644 --- a/Doc/library/csv.rst +++ b/Doc/library/csv.rst @@ -431,8 +431,8 @@ read CSV files (assuming they support complex numbers at all). Write the *row* parameter to the writer's file object, formatted according to the current dialect. - .. versionchanged:: 3.5 - Added support of arbitrary iterables. + .. versionadded:: 3.5 + Support for arbitrary iterables. .. method:: csvwriter.writerows(rows) diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index a822842..2cb3c4a 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -315,11 +315,11 @@ In addition to the operations listed above :class:`timedelta` objects support certain additions and subtractions with :class:`date` and :class:`.datetime` objects (see below). -.. versionchanged:: 3.2 - Floor division and true division of a :class:`timedelta` object by another - :class:`timedelta` object are now supported, as are remainder operations and - the :func:`divmod` function. True division and multiplication of a - :class:`timedelta` object by a :class:`float` object are now supported. +.. versionadded:: 3.2 + Support for floor division and true division of one :class:`timedelta` object + by another, as well as remainder operations and the :func:`divmod` function. + Support for true division and multiplication of a :class:`timedelta` object + by a :class:`float` object are also now supported. Comparisons of :class:`timedelta` objects are supported with the @@ -1023,7 +1023,7 @@ Instance methods: return tz.fromutc(utc) .. versionchanged:: 3.3 - *tz* now can be omitted. + *tz* is now optional. .. method:: datetime.utcoffset() @@ -1391,8 +1391,8 @@ In boolean contexts, a :class:`.time` object is always considered to be true. .. versionchanged:: 3.5 Before Python 3.5, a :class:`.time` object was considered to be false if it represented midnight in UTC. This behavior was considered obscure and - error-prone and has been removed in Python 3.5. See :issue:`13936` for full - details. + error-prone, and has been removed in Python 3.5. + See :issue:`13936` for full details. Instance methods: @@ -1759,8 +1759,8 @@ made to civil time. ``offset.minutes`` respectively. .. versionchanged:: 3.6 - Name generated from ``offset=timedelta(0)`` is now plain 'UTC', not - 'UTC+00:00'. + Name generated from ``offset=timedelta(0)`` is now simply ``'UTC'``, not + ``'UTC+00:00'``. .. method:: timezone.dst(dt) @@ -1938,7 +1938,7 @@ incomplete or ambiguous ISO 8601 directives will raise a :exc:`ValueError`. +-----------+--------------------------------+------------------------+-------+ .. versionadded:: 3.6 - ``%G``, ``%u`` and ``%V`` were added. + The ``%G``, ``%u``, and ``%V`` directives. Notes: diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst index 3f3c43d..f206142 100644 --- a/Doc/library/dbm.rst +++ b/Doc/library/dbm.rst @@ -76,11 +76,11 @@ being stored. These objects also support being used in a :keyword:`with` statement, which will automatically close them when done. -.. versionchanged:: 3.4 - Added native support for the context management protocol to the objects +.. versionadded:: 3.4 + Native support for the context management protocol to the objects returned by :func:`.open`. -The following example records some hostnames and a corresponding title, and +The following example records some hostnames and a corresponding title, and then prints out the contents of the database:: import dbm diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst index e7e5df6..bdefc03 100644 --- a/Doc/library/difflib.rst +++ b/Doc/library/difflib.rst @@ -124,9 +124,12 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module. the next difference highlight at the top of the browser without any leading context). + .. versionadded:: 3.5 + The keyword-only *charset* argument. + .. versionchanged:: 3.5 - *charset* keyword-only argument was added. The default charset of - HTML document changed from ``'ISO-8859-1'`` to ``'utf-8'``. + The default charset of an HTML document changed from ``'ISO-8859-1'`` + to ``'utf-8'``. .. method:: make_table(fromlines, tolines, fromdesc='', todesc='', context=False, numlines=5) diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 7222636..9a74724 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -130,8 +130,8 @@ operation is being performed, so the intermediate analysis object isn't useful: .. versionadded:: 3.2 - .. versionchanged:: 3.4 - Added *file* parameter. + .. versionadded:: 3.4 + The *file* parameter. .. function:: dis(x=None, *, file=None) @@ -148,8 +148,8 @@ operation is being performed, so the intermediate analysis object isn't useful: The disassembly is written as text to the supplied *file* argument if provided and to ``sys.stdout`` otherwise. - .. versionchanged:: 3.4 - Added *file* parameter. + .. versionadded:: 3.4 + The *file* parameter. .. function:: distb(tb=None, *, file=None) @@ -161,8 +161,8 @@ operation is being performed, so the intermediate analysis object isn't useful: The disassembly is written as text to the supplied *file* argument if provided and to ``sys.stdout`` otherwise. - .. versionchanged:: 3.4 - Added *file* parameter. + .. versionadded:: 3.4 + The *file* parameter. .. function:: disassemble(code, lasti=-1, *, file=None) @@ -185,8 +185,8 @@ operation is being performed, so the intermediate analysis object isn't useful: The disassembly is written as text to the supplied *file* argument if provided and to ``sys.stdout`` otherwise. - .. versionchanged:: 3.4 - Added *file* parameter. + .. versionadded:: 3.4 + The *file* parameter. .. function:: get_instructions(x, *, first_line=None) diff --git a/Doc/library/email.contentmanager.rst b/Doc/library/email.contentmanager.rst index f53d34b..192e844 100644 --- a/Doc/library/email.contentmanager.rst +++ b/Doc/library/email.contentmanager.rst @@ -76,7 +76,7 @@ this module. and its (case insensitive) value is ``attachment``, ``False`` otherwise. .. versionchanged:: 3.4.2 - is_attachment is now a method instead of a property, for consistency + ``is_attachment`` is now a method rather than a property, for consistency with :meth:`~email.message.Message.is_multipart`. diff --git a/Doc/library/email.generator.rst b/Doc/library/email.generator.rst index 48d41e1..2c45e23 100644 --- a/Doc/library/email.generator.rst +++ b/Doc/library/email.generator.rst @@ -58,7 +58,7 @@ Here are the public methods of the :class:`Generator` class, imported from the then the *policy* attached to the message object passed to :attr:`flatten` is used. - .. versionchanged:: 3.3 Added the *policy* keyword. + .. versionadded:: 3.3 The *policy* keyword. The other public :class:`Generator` methods are: @@ -90,8 +90,8 @@ Here are the public methods of the :class:`Generator` class, imported from the to a use a ``7bit`` Content-Transfer-Encoding. Non-ASCII bytes in the headers will be :rfc:`2047` encoded with a charset of ``unknown-8bit``. - .. versionchanged:: 3.2 - Added support for re-encoding ``8bit`` message bodies, and the + .. versionadded:: 3.2 + Support for re-encoding ``8bit`` message bodies, and the *linesep* argument. .. method:: clone(fp) @@ -140,7 +140,7 @@ formatted string representation of a message object. For more detail, see then the *policy* attached to the message object passed to :attr:`flatten` is used. - .. versionchanged:: 3.3 Added the *policy* keyword. + .. versionadded:: 3.3 The *policy* keyword. The other public :class:`BytesGenerator` methods are: diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst index 346d23f..30a6e5d 100644 --- a/Doc/library/email.header.rst +++ b/Doc/library/email.header.rst @@ -129,8 +129,8 @@ Here is the :class:`Header` class description: application code (``\n``), but ``\r\n`` can be specified in order to produce headers with RFC-compliant line separators. - .. versionchanged:: 3.2 - Added the *linesep* argument. + .. versionadded:: 3.2 + The *linesep* argument. The :class:`Header` class also provides a number of methods to support @@ -144,8 +144,8 @@ Here is the :class:`Header` class description: charset of ``'unknown-8bit'`` are decoded as ASCII using the ``'replace'`` error handler. - .. versionchanged:: 3.2 - Added handling for the ``'unknown-8bit'`` charset. + .. versionadded:: 3.2 + Handling for the ``'unknown-8bit'`` charset. .. method:: __eq__(other) diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst index b91f26d..c583df4 100644 --- a/Doc/library/email.message.rst +++ b/Doc/library/email.message.rst @@ -40,7 +40,7 @@ Here are the methods of the :class:`Message` class: the Python 3.2 version of the email package. For more information see the :mod:`~email.policy` documentation. - .. versionchanged:: 3.3 The *policy* keyword argument was added. + .. versionadded:: 3.3 The *policy* keyword argument. .. method:: as_string(unixfrom=False, maxheaderlen=0, policy=None) @@ -78,7 +78,7 @@ Here are the methods of the :class:`Message` class: "unknown character" code points. (See also :meth:`.as_bytes` and :class:`~email.generator.BytesGenerator`.) - .. versionchanged:: 3.4 the *policy* keyword argument was added. + .. versionadded:: 3.4 The *policy* keyword argument. .. method:: __str__() @@ -492,7 +492,7 @@ Here are the methods of the :class:`Message` class: end of the list of headers. If *replace* is ``True``, the header will be updated in place. - .. versionchanged:: 3.4 ``replace`` keyword was added. + .. versionadded:: 3.4 The ``replace`` keyword. .. method:: del_param(param, header='content-type', requote=True) diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst index 177adc6..50366c5 100644 --- a/Doc/library/email.parser.rst +++ b/Doc/library/email.parser.rst @@ -73,7 +73,7 @@ Here is the API for the :class:`FeedParser`: the Python 3.2 version of the email package. For more information see the :mod:`~email.policy` documentation. - .. versionchanged:: 3.3 Added the *policy* keyword. + .. versionadded:: 3.3 The *policy* keyword. .. method:: feed(data) @@ -131,9 +131,11 @@ have the same API as the :class:`Parser` and :class:`BytesParser` classes. the Python 3.2 version of the email package. For more information see the :mod:`~email.policy` documentation. - .. versionchanged:: 3.3 - Removed the *strict* argument that was deprecated in 2.4. Added the - *policy* keyword. + .. deprecated-removed:: 2.4 3.3 + The *strict* argument. + + .. versionadded:: 3.3 + The *policy* keyword. The other public :class:`Parser` methods are: @@ -178,8 +180,11 @@ have the same API as the :class:`Parser` and :class:`BytesParser` classes. the Python 3.2 version of the email package. For more information see the :mod:`~email.policy` documentation. - .. versionchanged:: 3.3 - Removed the *strict* argument. Added the *policy* keyword. + .. deprecated-removed:: 2.4 3.3 + The *strict* argument. + + .. versionadded:: 3.3 + The *policy* keyword. .. method:: parse(fp, headersonly=False) @@ -224,8 +229,11 @@ in the top-level :mod:`email` package namespace. ``Parser().parsestr(s)``. *_class* and *policy* are interpreted as with the :class:`~email.parser.Parser` class constructor. - .. versionchanged:: 3.3 - Removed the *strict* argument. Added the *policy* keyword. + .. deprecated-removed:: 2.4 3.3 + The *strict* argument. + + .. versionadded:: 3.3 + The *policy* keyword. .. function:: message_from_bytes(s, _class=email.message.Message, *, \ policy=policy.compat32) @@ -236,8 +244,12 @@ in the top-level :mod:`email` package namespace. constructor. .. versionadded:: 3.2 - .. versionchanged:: 3.3 - Removed the *strict* argument. Added the *policy* keyword. + + .. deprecated-removed:: 2.4 3.3 + The *strict* argument. + + .. versionadded:: 3.3 + The *policy* keyword. .. function:: message_from_file(fp, _class=email.message.Message, *, \ policy=policy.compat32) @@ -247,8 +259,11 @@ in the top-level :mod:`email` package namespace. and *policy* are interpreted as with the :class:`~email.parser.Parser` class constructor. - .. versionchanged:: - Removed the *strict* argument. Added the *policy* keyword. + .. deprecated-removed:: 2.4 3.3 + The *strict* argument. + + .. versionadded:: 3.3 + The *policy* keyword. .. function:: message_from_binary_file(fp, _class=email.message.Message, *, \ policy=policy.compat32) @@ -259,8 +274,10 @@ in the top-level :mod:`email` package namespace. :class:`~email.parser.Parser` class constructor. .. versionadded:: 3.2 - .. versionchanged:: 3.3 - Removed the *strict* argument. Added the *policy* keyword. + .. versionremoved:: 3.3 + The *strict* argument. + .. versionadded:: 3.3 + The *policy* keyword. Here's an example of how you might use this at an interactive Python prompt:: diff --git a/Doc/library/email.util.rst b/Doc/library/email.util.rst index 219e284..e074651 100644 --- a/Doc/library/email.util.rst +++ b/Doc/library/email.util.rst @@ -41,8 +41,8 @@ There are several useful utilities provided in the :mod:`email.utils` module: characters. Can be an instance of :class:`str` or a :class:`~email.charset.Charset`. Defaults to ``utf-8``. - .. versionchanged:: 3.3 - Added the *charset* option. + .. versionadded:: 3.3 + The *charset* option. .. function:: getaddresses(fieldvalues) @@ -164,8 +164,8 @@ There are several useful utilities provided in the :mod:`email.utils` module: may be useful certain cases, such as a constructing distributed system that uses a consistent domain name across multiple hosts. - .. versionchanged:: 3.2 - Added the *domain* keyword. + .. versionadded:: 3.2 + The *domain* keyword. .. function:: decode_rfc2231(s) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index b3691ca..1072e9a 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -468,8 +468,8 @@ The complete signature is:: :start: number to start counting at if only names are passed in. -.. versionchanged:: 3.5 - The *start* parameter was added. +.. versionadded:: 3.5 + The *start* parameter. Derived Enumerations diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index ba6122e..4960d31 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -178,8 +178,8 @@ The following exceptions are the exceptions that are usually raised. that was attempted to be imported and the path to any file which triggered the exception, respectively. - .. versionchanged:: 3.3 - Added the :attr:`name` and :attr:`path` attributes. + .. versionadded:: 3.3 + The :attr:`name` and :attr:`path` attributes. .. exception:: IndexError @@ -295,8 +295,10 @@ The following exceptions are the exceptions that are usually raised. .. versionchanged:: 3.4 The :attr:`filename` attribute is now the original file name passed to the function, instead of the name encoded to or decoded from the - filesystem encoding. Also, the *filename2* constructor argument and - attribute was added. + filesystem encoding. + + .. versionadded:: 3.4 + The *filename2* constructor argument and attribute. .. exception:: OverflowError @@ -354,9 +356,11 @@ The following exceptions are the exceptions that are usually raised. converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` as the new exception's cause). + .. versionadded:: 3.3 + The ``value`` attribute. + .. versionchanged:: 3.3 - Added ``value`` attribute and the ability for generator functions to - use it to return a value. + The ability for generator functions to use it to return a value. .. versionchanged:: 3.5 Introduced the RuntimeError transformation. diff --git a/Doc/library/faulthandler.rst b/Doc/library/faulthandler.rst index 3a5badd..abf5802 100644 --- a/Doc/library/faulthandler.rst +++ b/Doc/library/faulthandler.rst @@ -47,8 +47,8 @@ Dumping the traceback Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread. - .. versionchanged:: 3.5 - Added support for passing file descriptor to this function. + .. versionadded:: 3.5 + Support for passing file descriptor to this function. Fault handler state @@ -65,8 +65,8 @@ Fault handler state The *file* must be kept open until the fault handler is disabled: see :ref:`issue with file descriptors `. - .. versionchanged:: 3.5 - Added support for passing file descriptor to this function. + .. versionadded:: 3.5 + Support for passing file descriptor to this function. .. function:: disable() @@ -98,8 +98,8 @@ Dumping the tracebacks after a timeout This function is implemented using a watchdog thread and therefore is not available if Python is compiled with threads disabled. - .. versionchanged:: 3.5 - Added support for passing file descriptor to this function. + .. versionadded:: 3.5 + Support for passing file descriptor to this function. .. function:: cancel_dump_traceback_later() @@ -120,8 +120,8 @@ Dumping the traceback on a user signal Not available on Windows. - .. versionchanged:: 3.5 - Added support for passing file descriptor to this function. + .. versionadded:: 3.5 + Support for passing file descriptor to this function. .. function:: unregister(signum) diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst index f8bb834..51f238d 100644 --- a/Doc/library/fcntl.rst +++ b/Doc/library/fcntl.rst @@ -21,8 +21,8 @@ itself, which provides a :meth:`~io.IOBase.fileno` that returns a genuine file descriptor. .. versionchanged:: 3.3 - Operations in this module used to raise an :exc:`IOError` where they now - raise an :exc:`OSError`. + Since 3.3, operations in this module now raise an :exc:`OSError`, + where they used to raise an :exc:`IOError`. The module defines the following functions: diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst index 67a603b..7bfbce7 100644 --- a/Doc/library/ftplib.rst +++ b/Doc/library/ftplib.rst @@ -66,11 +66,11 @@ The module defines the following items: dr-xr-xr-x 3 ftp ftp 18 Jul 10 2008 Fedora >>> - .. versionchanged:: 3.2 - Support for the :keyword:`with` statement was added. + .. versionadded:: 3.2 + Support for the :keyword:`with` statement. - .. versionchanged:: 3.3 - *source_address* parameter was added. + .. versionadded:: 3.3 + The *source_address* parameter. .. class:: FTP_TLS(host='', user='', passwd='', acct='', keyfile=None, certfile=None, context=None, timeout=None, source_address=None) @@ -90,8 +90,8 @@ The module defines the following items: .. versionadded:: 3.2 - .. versionchanged:: 3.3 - *source_address* parameter was added. + .. versionadded:: 3.3 + The *source_address* parameter. .. versionchanged:: 3.4 The class now supports hostname check with @@ -190,8 +190,8 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. *source_address* is a 2-tuple ``(host, port)`` for the socket to bind to as its source address before connecting. - .. versionchanged:: 3.3 - *source_address* parameter was added. + .. versionadded:: 3.3 + The *source_address* parameter. .. method:: FTP.getwelcome() @@ -271,8 +271,8 @@ followed by ``lines`` for the text version or ``binary`` for the binary version. parameter callable that is called on each block of data after it is sent. *rest* means the same thing as in the :meth:`transfercmd` method. - .. versionchanged:: 3.2 - *rest* parameter added. + .. versionadded:: 3.2 + The *rest* parameter. .. method:: FTP.storlines(cmd, fp, callback=None) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 6e98cfb..a6e0a55 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -150,7 +150,7 @@ are always available. They are listed here in alphabetical order. instances are callable if their class has a :meth:`__call__` method. .. versionadded:: 3.2 - This function was first removed in Python 3.0 and then brought back + This function was first removed in Python 3.0, then brought back in Python 3.2. @@ -244,7 +244,10 @@ are always available. They are listed here in alphabetical order. .. versionchanged:: 3.2 Allowed use of Windows and Mac newlines. Also input in ``'exec'`` mode - does not have to end in a newline anymore. Added the *optimize* parameter. + does not have to end in a newline anymore. + + .. versionadded:: 3.2 + The *optimize* parameter. .. class:: complex([real[, imag]]) @@ -1051,9 +1054,10 @@ are always available. They are listed here in alphabetical order. (where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile`, and :mod:`shutil`. + .. versionadded:: 3.3 + The *opener* parameter and the ``'x'`` mode. + .. versionchanged:: 3.3 - The *opener* parameter was added. - The ``'x'`` mode was added. :exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`. :exc:`FileExistsError` is now raised if the file opened in exclusive creation mode (``'x'``) already exists. @@ -1115,8 +1119,8 @@ are always available. They are listed here in alphabetical order. Whether output is buffered is usually determined by *file*, but if the *flush* keyword argument is true, the stream is forcibly flushed. - .. versionchanged:: 3.3 - Added the *flush* keyword argument. + .. versionadded:: 3.3 + The *flush* keyword argument. .. class:: property(fget=None, fset=None, fdel=None, doc=None) diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index 46aa887..a717e34 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -118,8 +118,8 @@ The :mod:`functools` module defines the following functions: .. versionadded:: 3.2 - .. versionchanged:: 3.3 - Added the *typed* option. + .. versionadded:: 3.3 + The *typed* option. .. decorator:: total_ordering @@ -161,7 +161,7 @@ The :mod:`functools` module defines the following functions: .. versionadded:: 3.2 .. versionchanged:: 3.4 - Returning NotImplemented from the underlying comparison function for + Returning ``NotImplemented`` from the underlying comparison function for unrecognised types is now supported. .. function:: partial(func, *args, **keywords) diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst index 514cc5a..eb39a44 100644 --- a/Doc/library/gettext.rst +++ b/Doc/library/gettext.rst @@ -191,7 +191,7 @@ class can also install themselves in the built-in namespace as the function :class:`NullTranslations` instance if *fallback* is true. .. versionchanged:: 3.3 - :exc:`IOError` used to be raised instead of :exc:`OSError`. + Now raises :exc:`OSError` instead of :exc:`IOError`. .. function:: install(domain, localedir=None, codeset=None, names=None) diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst index 4c01bf6..0edd0e3 100644 --- a/Doc/library/glob.rst +++ b/Doc/library/glob.rst @@ -45,7 +45,7 @@ For example, ``'[?]'`` matches the character ``'?'``. Using the "``**``" pattern in large directory trees may consume an inordinate amount of time. - .. versionchanged:: 3.5 + .. versionadded:: 3.5 Support for recursive globs using "``**``". diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst index 792d57a..e40ba4e 100644 --- a/Doc/library/gzip.rst +++ b/Doc/library/gzip.rst @@ -49,12 +49,12 @@ The module defines the following items: :class:`io.TextIOWrapper` instance with the specified encoding, error handling behavior, and line ending(s). - .. versionchanged:: 3.3 - Added support for *filename* being a file object, support for text mode, - and the *encoding*, *errors* and *newline* arguments. + .. versionadded:: 3.3 + Support for passing a file object for *filename*, text mode, + and the arguments *encoding*, *errors*, and *newline*. - .. versionchanged:: 3.4 - Added support for the ``'x'``, ``'xb'`` and ``'xt'`` modes. + .. versionadded:: 3.4 + Support for the ``'x'``, ``'xb'``, and ``'xt'`` modes. .. class:: GzipFile(filename=None, mode=None, compresslevel=9, fileobj=None, mtime=None) @@ -132,23 +132,25 @@ The module defines the following items: :func:`time.time` and the :attr:`~os.stat_result.st_mtime` attribute of the object returned by :func:`os.stat`. - .. versionchanged:: 3.1 - Support for the :keyword:`with` statement was added, along with the - *mtime* constructor argument and :attr:`mtime` attribute. + .. versionadded:: 3.1 + Support for the :keyword:`with` statement, the *mtime* constructor + argument, and the :attr:`mtime` attribute. - .. versionchanged:: 3.2 + .. versionadded:: 3.2 Support for zero-padded and unseekable files was added. .. versionchanged:: 3.3 The :meth:`io.BufferedIOBase.read1` method is now implemented. - .. versionchanged:: 3.4 - Added support for the ``'x'`` and ``'xb'`` modes. + .. versionadded:: 3.4 + Support for the ``'x'`` and ``'xb'`` modes. - .. versionchanged:: 3.5 - Added support for writing arbitrary + .. versionadded:: 3.5 + Support for writing arbitrary :term:`bytes-like objects `. - The :meth:`~io.BufferedIOBase.read` method now accepts an argument of + + .. versionchanged:: 3.5 + The :meth:`~io.BufferedIOBase.read` method now accepts an argument of ``None``. diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index 769f96f..f9b9121 100644 --- a/Doc/library/hashlib.rst +++ b/Doc/library/hashlib.rst @@ -136,9 +136,9 @@ A hash object has the following attributes: parameter to :func:`new` to create another hash of this type. .. versionchanged:: 3.4 - The name attribute has been present in CPython since its inception, but - until Python 3.4 was not formally specified, so may not exist on some - platforms. + The :attr:`name` attribute has been present in CPython since its inception, + but was not formally specified until Python 3.4; consequently it may not + exist on some platforms. A hash object has the following methods: diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst index 9fbbcc6..c2ad304 100644 --- a/Doc/library/heapq.rst +++ b/Doc/library/heapq.rst @@ -101,8 +101,8 @@ The module also offers three general purpose functions based on heaps. *reverse* is a boolean value. If set to ``True``, then the input elements are merged as if each comparison were reversed. - .. versionchanged:: 3.5 - Added the optional *key* and *reverse* parameters. + .. versionadded:: 3.5 + The optional *key* and *reverse* parameters. .. function:: nlargest(n, iterable, key=None) diff --git a/Doc/library/html.parser.rst b/Doc/library/html.parser.rst index 824995e..46913a8 100644 --- a/Doc/library/html.parser.rst +++ b/Doc/library/html.parser.rst @@ -32,11 +32,11 @@ parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML. This parser does not check that end tags match start tags or call the end-tag handler for elements which are closed implicitly by closing an outer element. - .. versionchanged:: 3.4 - *convert_charrefs* keyword argument added. + .. versionadded:: 3.4 + The *convert_charrefs* keyword argument. .. versionchanged:: 3.5 - The default value for argument *convert_charrefs* is now ``True``. + The default value of *convert_charrefs* is now ``True``. Example HTML Parser Application diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst index d57649c..04c3fa6 100644 --- a/Doc/library/http.client.rst +++ b/Doc/library/http.client.rst @@ -53,12 +53,12 @@ The module provides the following classes: >>> h3 = http.client.HTTPConnection('www.python.org', 80) >>> h4 = http.client.HTTPConnection('www.python.org', 80, timeout=10) - .. versionchanged:: 3.2 - *source_address* was added. + .. versionadded:: 3.2 + The *source_address* argument. .. versionchanged:: 3.4 - The *strict* parameter was removed. HTTP 0.9-style "Simple Responses" are - not longer supported. + Removed The *strict* parameter was removed. + Removed support for HTTP 0.9-style "Simple Responses". .. class:: HTTPSConnection(host, port=None, key_file=None, \ @@ -250,8 +250,8 @@ HTTPConnection Objects then the Content-Length header is set to the ``st_size`` reported by the ``fstat`` call. Otherwise no Content-Length header is added. - .. versionadded:: 3.2 - *body* can now be an iterable. + .. versionchanged:: 3.2 + *body* may now be an iterable. .. method:: HTTPConnection.getresponse() diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst index c2bb80d..83a1733 100644 --- a/Doc/library/http.cookies.rst +++ b/Doc/library/http.cookies.rst @@ -26,7 +26,7 @@ The character set, :data:`string.ascii_letters`, :data:`string.digits` and in Cookie name (as :attr:`~Morsel.key`). .. versionchanged:: 3.3 - Allowed ':' as a valid Cookie name character. + Allow ':' as a valid Cookie name character. .. note:: @@ -217,7 +217,7 @@ Morsel Objects valid :rfc:`2109` attribute. .. versionchanged:: 3.5 - an error is raised for invalid keys. + An error is raised for invalid keys. .. method:: Morsel.copy(value) @@ -225,7 +225,7 @@ Morsel Objects Return a shallow copy of the Morsel object. .. versionchanged:: 3.5 - return a Morsel object instead of a dict. + Return a Morsel object instead of a dict. .. method:: Morsel.setdefault(key, value=None) diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst index 0bde35b..f1120c1 100644 --- a/Doc/library/http.server.rst +++ b/Doc/library/http.server.rst @@ -199,7 +199,9 @@ of which this module provides three different variants: .. versionchanged:: 3.4 The error response includes a Content-Length header. - Added the *explain* argument. + + .. versionadded:: 3.4 + The *explain* argument. .. method:: send_response(code, message=None) @@ -395,7 +397,7 @@ following command causes the server to bind to localhost only:: python -m http.server 8000 --bind 127.0.0.1 .. versionadded:: 3.4 - ``--bind`` argument was introduced. + The ``--bind`` argument. .. class:: CGIHTTPRequestHandler(request, client_address, server) diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst index cd214ff..3d01560 100644 --- a/Doc/library/imaplib.rst +++ b/Doc/library/imaplib.rst @@ -47,8 +47,8 @@ base class: ... ('OK', [b'Nothing Accomplished. d25if65hy903weo.87']) - .. versionchanged:: 3.5 - Support for the :keyword:`with` statement was added. + .. versionadded:: 3.5 + Support for the :keyword:`with` statement. Three exceptions are defined as attributes of the :class:`IMAP4` class: @@ -95,8 +95,8 @@ There's also a subclass for secure connections: mutually exclusive with *ssl_context*, a :class:`ValueError` is raised if *keyfile*/*certfile* is provided along with *ssl_context*. - .. versionchanged:: 3.3 - *ssl_context* parameter added. + .. versionadded:: 3.3 + The *ssl_context* parameter. .. versionchanged:: 3.4 The class now supports hostname check with @@ -213,7 +213,7 @@ An :class:`IMAP4` instance has the following methods: ``None`` if the client abort response ``*`` should be sent instead. .. versionchanged:: 3.5 - string usernames and passwords are now encoded to ``utf-8`` instead of + String usernames and passwords are now encoded to ``utf-8`` instead of being limited to ASCII. diff --git a/Doc/library/imghdr.rst b/Doc/library/imghdr.rst index f11f6dc..46e051e 100644 --- a/Doc/library/imghdr.rst +++ b/Doc/library/imghdr.rst @@ -54,7 +54,7 @@ from :func:`what`: +------------+-----------------------------------+ .. versionadded:: 3.5 - The *exr* and *webp* formats were added. + The *exr* and *webp* formats. You can extend the list of file types :mod:`imghdr` can recognize by appending diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst index 420031a..e941bc6 100644 --- a/Doc/library/imp.rst +++ b/Doc/library/imp.rst @@ -184,7 +184,7 @@ This module provides an interface to the mechanisms used to implement the .. versionchanged:: 3.3 Relies on both ``__name__`` and ``__loader__`` being defined on the module - being reloaded instead of just ``__name__``. + being reloaded, instead of just ``__name__``. .. deprecated:: 3.4 Use :func:`importlib.reload` instead. diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 6a972fb..83547ab 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -441,7 +441,7 @@ ABC hierarchy:: .. versionadded:: 3.3 .. versionchanged:: 3.4 - Made optional instead of an abstractmethod. + Made optional (instead of an ``abstractmethod``). .. deprecated:: 3.4 The import machinery now takes care of this automatically. @@ -480,14 +480,14 @@ ABC hierarchy:: requested module. .. note:: - While the method has a default implementation, it is suggested that - it be overridden if possible for performance. + While the method has a default implementation, it is recommended to + override it if possible for performance. .. index:: single: universal newlines; importlib.abc.InspectLoader.get_source method .. versionchanged:: 3.4 - No longer abstract and a concrete implementation is provided. + No longer abstract. A concrete implementation is now provided. .. abstractmethod:: get_source(fullname) @@ -524,7 +524,7 @@ ABC hierarchy:: .. versionadded:: 3.4 .. versionchanged:: 3.5 - Made the method static. + This method is now static. .. method:: exec_module(module) diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index aa8a181..4d6f171 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -213,12 +213,12 @@ attributes: | | | ``None`` | +-----------+-----------------+---------------------------+ -.. versionchanged:: 3.5 +.. versionadded:: 3.5 - Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators. + The attributes ``__qualname__`` and ``gi_yieldfrom`` attributes to generators. The ``__name__`` attribute of generators is now set from the function - name, instead of the code name, and it can now be modified. + name (instead of the code name), and it can now be modified. .. function:: getmembers(object[, predicate]) @@ -511,9 +511,10 @@ function. :exc:`TypeError` if that type of object is not supported. .. versionadded:: 3.5 - ``follow_wrapped`` parameter. Pass ``False`` to get a signature of - ``callable`` specifically (``callable.__wrapped__`` will not be used to - unwrap decorated callables.) + The ``follow_wrapped`` parameter. + + Pass ``False`` to get a signature of ``callable`` specifically + (``callable.__wrapped__`` will not be used to unwrap decorated callables.) .. note:: @@ -704,7 +705,7 @@ function. "foo:'spam'" .. versionchanged:: 3.4 - In Python 3.3 Parameter objects were allowed to have ``name`` set + In Python 3.3, Parameter objects were allowed to have ``name`` set to ``None`` if their ``kind`` was set to ``POSITIONAL_ONLY``. This is no longer permitted. @@ -1024,9 +1025,8 @@ line. on *frame*'s stack. .. versionchanged:: 3.5 - A list of :term:`named tuples ` - ``FrameInfo(frame, filename, lineno, function, code_context, index)`` - is returned. + Returns a list of :term:`named tuples ` + ``FrameInfo(frame, filename, lineno, function, code_context, index)``. .. function:: getinnerframes(traceback, context=1) @@ -1037,9 +1037,8 @@ line. raised. .. versionchanged:: 3.5 - A list of :term:`named tuples ` - ``FrameInfo(frame, filename, lineno, function, code_context, index)`` - is returned. + Returns a list of :term:`named tuples ` + ``FrameInfo(frame, filename, lineno, function, code_context, index)``. .. function:: currentframe() @@ -1061,9 +1060,8 @@ line. call on the stack. .. versionchanged:: 3.5 - A list of :term:`named tuples ` - ``FrameInfo(frame, filename, lineno, function, code_context, index)`` - is returned. + Returns a list of :term:`named tuples ` + ``FrameInfo(frame, filename, lineno, function, code_context, index)``. .. function:: trace(context=1) @@ -1074,9 +1072,8 @@ line. exception was raised. .. versionchanged:: 3.5 - A list of :term:`named tuples ` - ``FrameInfo(frame, filename, lineno, function, code_context, index)`` - is returned. + Returns a list of :term:`named tuples ` + ``FrameInfo(frame, filename, lineno, function, code_context, index)``. Fetching attributes statically diff --git a/Doc/library/io.rst b/Doc/library/io.rst index cb3e9ed..cc82e5d 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -551,9 +551,8 @@ Raw File I/O See the :func:`open` built-in function for examples on using the *opener* parameter. - .. versionchanged:: 3.3 - The *opener* parameter was added. - The ``'x'`` mode was added. + .. versionadded:: 3.3 + The *opener* parameter and the ``'x'`` mode. .. versionchanged:: 3.4 The file is now non-inheritable. @@ -867,8 +866,8 @@ Text I/O not to be buffered: any data written on the :class:`TextIOWrapper` object is immediately handled to its underlying binary *buffer*. - .. versionchanged:: 3.3 - The *write_through* argument has been added. + .. versionadded:: 3.3 + The *write_through* argument. .. versionchanged:: 3.3 The default *encoding* is now ``locale.getpreferredencoding(False)`` diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst index 90fcc74..2684843 100644 --- a/Doc/library/ipaddress.rst +++ b/Doc/library/ipaddress.rst @@ -252,7 +252,7 @@ write code that handles both IP versions correctly. .. attribute:: is_link_local .. versionadded:: 3.4 - is_global + The :attr:`is_global` attribute. .. attribute:: is_site_local @@ -410,9 +410,8 @@ so to avoid duplication they are only documented for :class:`IPv4Network`. objects will raise :exc:`TypeError` if the argument's IP version is incompatible to ``self`` - .. versionchanged:: 3.5 - - Added the two-tuple form for the *address* constructor parameter. + .. versionadded:: 3.5 + The two-tuple form of the *address* constructor parameter. .. attribute:: version .. attribute:: max_prefixlen @@ -591,9 +590,8 @@ so to avoid duplication they are only documented for :class:`IPv4Network`. then :exc:`ValueError` is raised. Otherwise, the host bits are masked out to determine the appropriate network address. - .. versionchanged:: 3.5 - - Added the two-tuple form for the *address* constructor parameter. + .. versionadded:: 3.5 + The two-tuple form for the *address* constructor parameter. .. attribute:: version .. attribute:: max_prefixlen diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 8c7592d..df7e84a 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -148,8 +148,8 @@ loops that truncate the stream. .. versionadded:: 3.2 - .. versionchanged:: 3.3 - Added the optional *func* parameter. + .. versionadded:: 3.3 + The optional *func* parameter. .. function:: chain(*iterables) @@ -305,8 +305,11 @@ loops that truncate the stream. achieved by substituting multiplicative code such as: ``(start + step * i for i in count())``. + .. versionadded:: 3.1 + The *step* argument. + .. versionchanged:: 3.1 - Added *step* argument and allowed non-integer arguments. + Non-integer arguments are now allowed. .. function:: cycle(iterable) diff --git a/Doc/library/json.rst b/Doc/library/json.rst index d62f14b..de021d8 100644 --- a/Doc/library/json.rst +++ b/Doc/library/json.rst @@ -224,8 +224,8 @@ Basic Usage :func:`collections.OrderedDict` will remember the order of insertion). If *object_hook* is also defined, the *object_pairs_hook* takes priority. - .. versionchanged:: 3.1 - Added support for *object_pairs_hook*. + .. versionadded:: 3.1 + Support for *object_pairs_hook*. *parse_float*, if specified, will be called with the string of every JSON float to be decoded. By default, this is equivalent to ``float(num_str)``. @@ -243,7 +243,8 @@ Basic Usage are encountered. .. versionchanged:: 3.1 - *parse_constant* doesn't get called on 'null', 'true', 'false' anymore. + *parse_constant* doesn't get called on ``'null'``, ``'true'``, ``'false'`` + anymore. To use a custom :class:`JSONDecoder` subclass, specify it with the ``cls`` kwarg; otherwise :class:`JSONDecoder` is used. Additional keyword arguments @@ -310,8 +311,8 @@ Encoders and Decoders :func:`collections.OrderedDict` will remember the order of insertion). If *object_hook* is also defined, the *object_pairs_hook* takes priority. - .. versionchanged:: 3.1 - Added support for *object_pairs_hook*. + .. versionadded:: 3.1 + Support for *object_pairs_hook*. *parse_float*, if specified, will be called with the string of every JSON float to be decoded. By default, this is equivalent to ``float(num_str)``. @@ -380,8 +381,8 @@ Encoders and Decoders | None | null | +----------------------------------------+---------------+ - .. versionchanged:: 3.4 - Added support for int- and float-derived Enum classes. + .. versionadded:: 3.4 + Support for int- and float-derived Enum classes. To extend this to recognize other objects, subclass and implement a :meth:`default` method with another method that returns a serializable object diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst index fd6a477..cd37c33 100644 --- a/Doc/library/logging.config.rst +++ b/Doc/library/logging.config.rst @@ -166,8 +166,8 @@ in :mod:`logging` itself) and defining handlers which are declared either in ``verify`` argument to :func:`listen` to prevent unrecognised configurations from being applied. - .. versionchanged:: 3.4. - The ``verify`` argument was added. + .. versionadded:: 3.4. + The ``verify`` argument. .. function:: stopListening() diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst index 446a070..6be34c0 100644 --- a/Doc/library/logging.handlers.rst +++ b/Doc/library/logging.handlers.rst @@ -60,12 +60,14 @@ and :meth:`flush` methods). :meth:`close` method is inherited from :class:`~logging.Handler` and so does no output, so an explicit :meth:`flush` call may be needed at times. -.. versionchanged:: 3.2 - The ``StreamHandler`` class now has a ``terminator`` attribute, default - value ``'\n'``, which is used as the terminator when writing a formatted - record to a stream. If you don't want this newline termination, you can +.. versionadded:: 3.2 + The :attr:`terminator` attribute of the ``StreamHandler`` class, which is + used as the terminator when writing a formatted record to a stream. + (Previously, the terminator was hardcoded as ``'\n'``.) + + The default value is ``'\n'``. If you don't want newline termination, you can set the handler instance's ``terminator`` attribute to the empty string. - In earlier versions, the terminator was hardcoded as ``'\n'``. + .. _file-handler: @@ -363,8 +365,8 @@ timed intervals. specifies the time of day when rollover occurs, for the cases where rollover is set to happen "at midnight" or "on a particular weekday". - .. versionchanged:: 3.4 - *atTime* parameter was added. + .. versionadded:: 3.4 + The *atTime* parameter. .. method:: doRollover() @@ -392,7 +394,7 @@ sends logging output to a network socket. The base class uses a TCP socket. .. versionchanged:: 3.4 If ``port`` is specified as ``None``, a Unix domain socket is created - using the value in ``host`` - otherwise, a TCP socket is created. + using the value in ``host``; otherwise, a TCP socket is created. .. method:: close() @@ -480,7 +482,7 @@ over UDP sockets. .. versionchanged:: 3.4 If ``port`` is specified as ``None``, a Unix domain socket is created - using the value in ``host`` - otherwise, a TCP socket is created. + using the value in ``host``; otherwise, a TCP socket is created. .. method:: emit() @@ -534,8 +536,8 @@ supports sending logging messages to a remote or local Unix syslog. application needs to run on several platforms). On Windows, you pretty much have to use the UDP option. - .. versionchanged:: 3.2 - *socktype* was added. + .. versionadded:: 3.2 + The *socktype* parameter. .. method:: close() @@ -755,7 +757,7 @@ supports sending logging messages to an email address via SMTP. *timeout* argument. .. versionadded:: 3.3 - The *timeout* argument was added. + The *timeout* argument. .. method:: emit(record) @@ -861,8 +863,8 @@ supports sending logging messages to a Web server, using either ``GET`` or credentials, you should also specify secure=True so that your userid and password are not passed in cleartext across the wire. - .. versionchanged:: 3.5 - The *context* parameter was added. + .. versionadded:: 3.5 + The *context* parameter. .. method:: mapLogRecord(record) @@ -973,8 +975,8 @@ possible, while any potentially slow operations (such as sending an email via is as in previous Python versions - to always pass each message to each handler. - .. versionchanged:: 3.5 - The ``respect_handler_levels`` argument was added. + .. versionadded:: 3.5 + The ``respect_handler_levels`` argument. .. method:: dequeue(block) diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 5bc72f7..4aca20a 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -117,8 +117,8 @@ is the module's name in the Python package namespace. .. versionchanged:: 3.2 The *lvl* parameter now accepts a string representation of the - level such as 'INFO' as an alternative to the integer constants - such as :const:`INFO`. Note, however, that levels are internally stored + level (such as ``'INFO'``) as an alternative to the integer constants + (such as :const:`INFO`). Note, however, that levels are internally stored as integers, and methods such as e.g. :meth:`getEffectiveLevel` and :meth:`isEnabledFor` will return/expect to be passed integers. @@ -220,10 +220,10 @@ is the module's name in the Python package namespace. :class:`Formatter`\ s would be used with particular :class:`Handler`\ s. .. versionadded:: 3.2 - The *stack_info* parameter was added. + The *stack_info* parameter. .. versionchanged:: 3.5 - The *exc_info* parameter can now accept exception instances. + The *exc_info* parameter now accepts exception instances. .. method:: Logger.info(msg, *args, **kwargs) @@ -399,7 +399,7 @@ subclasses. However, the :meth:`__init__` method in subclasses needs to call .. versionchanged:: 3.2 The *lvl* parameter now accepts a string representation of the - level such as 'INFO' as an alternative to the integer constants + level such as ``'INFO'`` as an alternative to the integer constants such as :const:`INFO`. @@ -514,8 +514,8 @@ The useful mapping keys in a :class:`LogRecord` are given in the section on :meth:`str.format` or :class:`string.Template`. See :ref:`formatting-styles` for more information on using {- and $-formatting for log messages. - .. versionchanged:: 3.2 - The *style* parameter was added. + .. versionadded:: 3.2 + The *style* parameter. .. method:: format(record) @@ -621,14 +621,15 @@ You don't actually need to subclass ``Filter``: you can pass any instance which has a ``filter`` method with the same semantics. .. versionchanged:: 3.2 - You don't need to create specialized ``Filter`` classes, or use other - classes with a ``filter`` method: you can use a function (or other - callable) as a filter. The filtering logic will check to see if the filter - object has a ``filter`` attribute: if it does, it's assumed to be a - ``Filter`` and its :meth:`~Filter.filter` method is called. Otherwise, it's - assumed to be a callable and called with the record as the single - parameter. The returned value should conform to that returned by - :meth:`~Filter.filter`. + You can now use a function or other callable as a filter. It is no longer + necessary to create specialized ``Filter`` classes, or use other classes with + a ``filter`` method. + + The filtering logic will check to see if the filter object has a ``filter`` + attribute. If it does, it's assumed to be a ``Filter``, and its + :meth:`~Filter.filter` method is called. Otherwise, it's assumed to be a + callable, and is called with the record as the only parameter. + The returned value should conform to that returned by :meth:`~Filter.filter`. Although filters are used primarily to filter records based on more sophisticated criteria than levels, they get to see every record which is @@ -693,8 +694,8 @@ wire). .. versionchanged:: 3.2 The creation of a ``LogRecord`` has been made more configurable by providing a factory which is used to create the record. The factory can be - set using :func:`getLogRecordFactory` and :func:`setLogRecordFactory` - (see this for the factory's signature). + set using :func:`getLogRecordFactory` and :func:`setLogRecordFactory`. + (See this for the factory's signature). This functionality can be used to inject your own values into a LogRecord at creation time. You can use the following pattern:: @@ -813,8 +814,8 @@ the options available to you. | threadName | ``%(threadName)s`` | Thread name (if available). | +----------------+-------------------------+-----------------------------------------------+ -.. versionchanged:: 3.1 - *processName* was added. +.. versionadded:: 3.1 + The *processName* formatting parameter. .. _logger-adapter: @@ -975,7 +976,7 @@ functions. :class:`Formatter`\ s would be used with particular :class:`Handler`\ s. .. versionadded:: 3.2 - The *stack_info* parameter was added. + The *stack_info* parameter. .. function:: info(msg, *args, **kwargs) @@ -1068,10 +1069,10 @@ functions. ``%(levelname)s`` format specifier (see :ref:`logrecord-attributes`). .. versionchanged:: 3.4 - In Python versions earlier than 3.4, this function could also be passed a - text level, and would return the corresponding numeric value of the level. - This undocumented behaviour was considered a mistake, and was removed in - Python 3.4, but reinstated in 3.4.2 due to retain backward compatibility. + Previously, this function could also be passed a text level, and would + return the corresponding numeric value of the level. This undocumented + behaviour was considered a mistake, and was removed in Python 3.4, but + reinstated in 3.4.2 to retain backward compatibility. .. function:: makeLogRecord(attrdict) @@ -1143,14 +1144,16 @@ functions. | | present, a ``ValueError`` is raised. | +--------------+---------------------------------------------+ - .. versionchanged:: 3.2 - The ``style`` argument was added. + .. versionadded:: 3.2 + The ``style`` argument. + + .. versionadded:: 3.3 + The ``handlers`` argument. .. versionchanged:: 3.3 - The ``handlers`` argument was added. Additional checks were added to - catch situations where incompatible arguments are specified (e.g. - ``handlers`` together with ``stream`` or ``filename``, or ``stream`` - together with ``filename``). + Additional checks were added to catch situations where incompatible + arguments are specified (e.g., ``handlers`` together with ``stream`` or + ``filename``, or ``stream`` together with ``filename``). .. function:: shutdown() diff --git a/Doc/library/lzma.rst b/Doc/library/lzma.rst index 0546005..d6221ed 100644 --- a/Doc/library/lzma.rst +++ b/Doc/library/lzma.rst @@ -57,8 +57,8 @@ Reading and writing compressed files :class:`io.TextIOWrapper` instance with the specified encoding, error handling behavior, and line ending(s). - .. versionchanged:: 3.4 - Added support for the ``"x"``, ``"xb"`` and ``"xt"`` modes. + .. versionadded:: 3.4 + Support for the modes ``"x"``, ``"xb"``, and ``"xt"``. .. class:: LZMAFile(filename=None, mode="r", \*, format=None, check=-1, preset=None, filters=None) @@ -107,8 +107,8 @@ Reading and writing compressed files file object (e.g. if the :class:`LZMAFile` was constructed by passing a file object for *filename*). - .. versionchanged:: 3.4 - Added support for the ``"x"`` and ``"xb"`` modes. + .. versionadded:: 3.4 + Support for the ``"x"`` and ``"xb"`` modes. .. versionchanged:: 3.5 The :meth:`~io.BufferedIOBase.read` method now accepts an argument of @@ -249,8 +249,8 @@ Compressing and decompressing data in memory raises an `EOFError`. Any data found after the end of the stream is ignored and saved in the :attr:`~.unused_data` attribute. - .. versionchanged:: 3.5 - Added the *max_length* parameter. + .. versionadded:: 3.5 + The *max_length* parameter. .. attribute:: check diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst index d29902d..d0a73ad 100644 --- a/Doc/library/mailbox.rst +++ b/Doc/library/mailbox.rst @@ -89,8 +89,8 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF. format-specific information is used. Otherwise, reasonable defaults for format-specific information are used. - .. versionchanged:: 3.2 - Support for binary input was added. + .. versionadded:: 3.2 + Support for binary input. .. method:: remove(key) @@ -200,10 +200,12 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF. closed once it is no longer needed. .. versionchanged:: 3.2 - The file object really is a binary file; previously it was incorrectly - returned in text mode. Also, the file-like object now supports the - context management protocol: you can use a :keyword:`with` statement to - automatically close it. + The file object really is a binary file. (Previously, it was incorrectly + returned in text mode.) + + .. versionadded:: 3.2 + The file-like object now supports the context management protocol; + you can use a :keyword:`with` statement to automatically close it. .. note:: diff --git a/Doc/library/math.rst b/Doc/library/math.rst index 244663e..029e022 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -139,7 +139,7 @@ Number-theoretic and representation functions .. seealso:: - :pep:`485` -- A function for testing approximate equality + :pep:`485`: A function for testing approximate equality .. function:: isfinite(x) diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst index b74a823..fcfaf20 100644 --- a/Doc/library/mmap.rst +++ b/Doc/library/mmap.rst @@ -209,7 +209,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length returned. .. versionchanged:: 3.3 - Argument can be omitted or *None*. + Argument can be omitted or ``None``. .. method:: read_byte() diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index bf25f3f..9aff451 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -121,11 +121,10 @@ to start a process. These *start methods* are Available on Unix platforms which support passing file descriptors over Unix pipes. -.. versionchanged:: 3.4 - *spawn* added on all unix platforms, and *forkserver* added for - some unix platforms. - Child processes no longer inherit all of the parents inheritable - handles on Windows. +.. versionadded:: 3.4 + *spawn* on all unix platforms, and *forkserver* for some unix platforms. + On Windows, child processes no longer inherit all of the parents' inheritable + handles. On Unix using the *spawn* or *forkserver* start methods will also start a *semaphore tracker* process which tracks the unlinked named @@ -469,8 +468,8 @@ The :mod:`multiprocessing` package mostly replicates the API of the base class constructor (:meth:`Process.__init__`) before doing anything else to the process. - .. versionchanged:: 3.3 - Added the *daemon* argument. + .. versionadded:: 3.3 + The *daemon* argument. .. method:: run() @@ -1089,8 +1088,8 @@ Connection objects are usually created using :func:`Pipe` -- see also using :meth:`Connection.send` and :meth:`Connection.recv`. .. versionadded:: 3.3 - Connection objects now support the context management protocol -- see - :ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` returns the + Connection objects now support the context management protocol (see + :ref:`typecontextmanager`). :meth:`~contextmanager.__enter__` returns the connection object, and :meth:`~contextmanager.__exit__` calls :meth:`close`. For example: @@ -1168,8 +1167,8 @@ object -- see :ref:`multiprocessing-managers`. If *lock* is specified then it should be a :class:`Lock` or :class:`RLock` object from :mod:`multiprocessing`. - .. versionchanged:: 3.3 - The :meth:`~threading.Condition.wait_for` method was added. + .. versionadded:: 3.3 + The :meth:`~threading.Condition.wait_for` method. .. class:: Event() @@ -1664,8 +1663,8 @@ their parent process exits. The manager classes are defined in the The address used by the manager. .. versionchanged:: 3.3 - Manager objects support the context management protocol -- see - :ref:`typecontextmanager`. :meth:`~contextmanager.__enter__` starts the + Manager objects support the context management protocol (see + :ref:`typecontextmanager`). :meth:`~contextmanager.__enter__` starts the server process (if it has not already started) and then returns the manager object. :meth:`~contextmanager.__exit__` calls :meth:`shutdown`. @@ -1700,8 +1699,8 @@ their parent process exits. The manager classes are defined in the If *lock* is supplied then it should be a proxy for a :class:`threading.Lock` or :class:`threading.RLock` object. - .. versionchanged:: 3.3 - The :meth:`~threading.Condition.wait_for` method was added. + .. versionadded:: 3.3 + The :meth:`~threading.Condition.wait_for` method. .. method:: Event() @@ -2040,10 +2039,10 @@ with the :class:`Pool` class. the process which created the pool. .. versionadded:: 3.2 - *maxtasksperchild* + The *maxtasksperchild* parameter. .. versionadded:: 3.4 - *context* + The *context* parameter. .. note:: diff --git a/Doc/library/netrc.rst b/Doc/library/netrc.rst index 23ffed6..5ea7985 100644 --- a/Doc/library/netrc.rst +++ b/Doc/library/netrc.rst @@ -29,7 +29,7 @@ the Unix :program:`ftp` program and other FTP clients. This implements security behavior equivalent to that of ftp and other programs that use :file:`.netrc`. - .. versionchanged:: 3.4 Added the POSIX permission check. + .. versionadded:: 3.4 The POSIX permission check. .. exception:: NetrcParseError diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst index 9fb1b45..68adc5e 100644 --- a/Doc/library/nntplib.rst +++ b/Doc/library/nntplib.rst @@ -84,8 +84,8 @@ The module itself defines the following classes: .. versionchanged:: 3.2 *usenetrc* is now ``False`` by default. - .. versionchanged:: 3.3 - Support for the :keyword:`with` statement was added. + .. versionadded:: 3.3 + Support for the :keyword:`with` statement. .. class:: NNTP_SSL(host, port=563, user=None, password=None, ssl_context=None, readermode=None, usenetrc=False, [timeout]) @@ -301,8 +301,8 @@ tuples or objects that the method normally returns will be empty. is not specified. It is best to cache the results offline unless you really need to refresh them. - .. versionchanged:: 3.2 - *group_pattern* was added. + .. versionadded:: 3.2 + The *group_pattern* parameter. .. method:: NNTP.descriptions(grouppattern) diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index 4b4e0b4..4a88d1f 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -115,7 +115,7 @@ the :mod:`glob` module.) .. versionchanged:: 3.3 *path* can now be an integer: ``True`` is returned if it is an - open file descriptor, ``False`` otherwise. + open file descriptor, ``False`` otherwise. .. function:: lexists(path) @@ -293,8 +293,8 @@ the :mod:`glob` module.) Availability: Unix, Windows. - .. versionchanged:: 3.2 - Added Windows support. + .. versionadded:: 3.2 + Windows support. .. versionchanged:: 3.4 Windows now uses the same implementation as all other platforms. @@ -306,8 +306,8 @@ the :mod:`glob` module.) Availability: Unix, Windows. - .. versionchanged:: 3.2 - Added Windows support. + .. versionadded:: 3.2 + Windows support. .. function:: samestat(stat1, stat2) @@ -319,8 +319,8 @@ the :mod:`glob` module.) Availability: Unix, Windows. - .. versionchanged:: 3.4 - Added Windows support. + .. versionadded:: 3.4 + Windows support. .. function:: split(path) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 5ff8be8..91d78cf 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -857,8 +857,8 @@ call fails (for example because the path doesn't exist): ignored (same behavior as the POSIX ``mkdir -p`` command), but only if the last path component is not an existing non-directory file. - .. versionchanged:: 3.5 - The *exist_ok* parameter was added. + .. versionadded:: 3.5 + The *exist_ok* parameter. .. method:: Path.open(mode='r', buffering=-1, encoding=None, errors=None, newline=None) diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index c144db6..e0e5130 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -43,8 +43,8 @@ of the debugger is:: .. versionchanged:: 3.3 Tab-completion via the :mod:`readline` module is available for commands and - command arguments, e.g. the current global and local names are offered as - arguments of the ``p`` command. + command arguments (i.e. the current global and local names are offered as + arguments of the ``p`` command). :file:`pdb.py` can also be invoked as a script to debug other scripts. For example:: @@ -59,7 +59,7 @@ useful than quitting the debugger upon program's exit. .. versionadded:: 3.2 :file:`pdb.py` now accepts a ``-c`` option that executes commands as if given - in a :file:`.pdbrc` file, see :ref:`debugger-commands`. + in a :file:`.pdbrc` file (see :ref:`debugger-commands`). The typical usage to break into the debugger from a running program is to insert :: diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst index 2419277..7322882 100644 --- a/Doc/library/pickle.rst +++ b/Doc/library/pickle.rst @@ -514,7 +514,7 @@ methods: defined. .. versionchanged:: 3.6 - Before Python 3.6, :meth:`__getnewargs__` was called instead of + Previously, :meth:`__getnewargs__` was called instead of :meth:`__getnewargs_ex__` in protocols 2 and 3. diff --git a/Doc/library/plistlib.rst b/Doc/library/plistlib.rst index 2c1f3dd..37ecd51 100644 --- a/Doc/library/plistlib.rst +++ b/Doc/library/plistlib.rst @@ -33,7 +33,10 @@ Values can be strings, integers, floats, booleans, tuples, lists, dictionaries or :class:`datetime.datetime` objects. .. versionchanged:: 3.4 - New API, old API deprecated. Support for binary format plists added. + New API; the old API is now deprecated. + +.. versionadded:: 3.4 + Support for binary format plists added. .. seealso:: diff --git a/Doc/library/poplib.rst b/Doc/library/poplib.rst index 8468f4c..eb6ee5e 100644 --- a/Doc/library/poplib.rst +++ b/Doc/library/poplib.rst @@ -53,8 +53,8 @@ The :mod:`poplib` module provides two classes: point to PEM-formatted private key and certificate chain files, respectively, for the SSL connection. - .. versionchanged:: 3.2 - *context* parameter added. + .. versionadded:: 3.2 + The *context* parameter. .. versionchanged:: 3.4 The class now supports hostname check with diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst index b109efe..943a770 100644 --- a/Doc/library/pprint.rst +++ b/Doc/library/pprint.rst @@ -49,8 +49,8 @@ The :mod:`pprint` module defines one class: will be formatted on a separate line. If *compact* is true, as many items as will fit within the *width* will be formatted on each output line. - .. versionchanged:: 3.4 - Added the *compact* parameter. + .. versionadded:: 3.4 + The *compact* parameter. >>> import pprint >>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni'] @@ -84,8 +84,8 @@ The :mod:`pprint` module also provides several shortcut functions: *width*, *depth* and *compact* will be passed to the :class:`PrettyPrinter` constructor as formatting parameters. - .. versionchanged:: 3.4 - Added the *compact* parameter. + .. versionadded:: 3.4 + The *compact* parameter. .. function:: pprint(object, stream=None, indent=1, width=80, depth=None, *, \ @@ -98,8 +98,8 @@ The :mod:`pprint` module also provides several shortcut functions: within a scope). *indent*, *width*, *depth* and *compact* will be passed to the :class:`PrettyPrinter` constructor as formatting parameters. - .. versionchanged:: 3.4 - Added the *compact* parameter. + .. versionadded:: 3.4 + The *compact* parameter. >>> import pprint >>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni'] diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst index 97f2b20..c7d3820 100644 --- a/Doc/library/py_compile.rst +++ b/Doc/library/py_compile.rst @@ -52,10 +52,12 @@ byte-code cache files in the directory containing the source code. :func:`compile` function. The default of ``-1`` selects the optimization level of the current interpreter. + .. versionadded:: 3.2 + The *optimize* parameter. + .. versionchanged:: 3.2 Changed default value of *cfile* to be :PEP:`3147`-compliant. Previous default was *file* + ``'c'`` (``'o'`` if optimization was enabled). - Also added the *optimize* parameter. .. versionchanged:: 3.4 Changed code to use :mod:`importlib` for the byte-code cache file writing. @@ -74,8 +76,8 @@ byte-code cache files in the directory containing the source code. If ``'-'`` is the only parameter in args, the list of files is taken from standard input. - .. versionchanged:: 3.2 - Added support for ``'-'``. + .. versionadded:: 3.2 + Support for ``'-'``. When this module is run as a script, the :func:`main` is used to compile all the files named on the command line. The exit status is nonzero if one of the files diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst index b5e3233..cde96ca 100644 --- a/Doc/library/pydoc.rst +++ b/Doc/library/pydoc.rst @@ -88,11 +88,11 @@ be overridden by setting the :envvar:`PYTHONDOCS` environment variable to a different URL or to a local directory containing the Library Reference Manual pages. -.. versionchanged:: 3.2 - Added the ``-b`` option. +.. versionadded:: 3.2 + The ``-b`` option. .. versionchanged:: 3.3 - The ``-g`` command line option was removed. + Removed the ``-g`` command line option. .. versionchanged:: 3.4 :mod:`pydoc` now uses :func:`inspect.signature` rather than diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst index e9ede8b..7e897ef 100644 --- a/Doc/library/venv.rst +++ b/Doc/library/venv.rst @@ -112,8 +112,8 @@ creation according to their needs, the :class:`EnvBuilder` class. installed in the virtual environment. This uses :mod:`ensurepip` with the ``--default-pip`` option. - .. versionchanged:: 3.4 - Added the ``with_pip`` parameter + .. versionadded:: 3.4 + The ``with_pip`` parameter. Creators of third-party virtual environment tools will be free to use the @@ -217,8 +217,8 @@ There is also a module-level convenience function: Create an :class:`EnvBuilder` with the given keyword arguments, and call its :meth:`~EnvBuilder.create` method with the *env_dir* argument. - .. versionchanged:: 3.4 - Added the ``with_pip`` parameter + .. versionadded:: 3.4 + The ``with_pip`` parameter. An example of extending ``EnvBuilder`` -------------------------------------- diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst index 55f9799..882be4c 100644 --- a/Doc/library/xml.sax.rst +++ b/Doc/library/xml.sax.rst @@ -50,8 +50,8 @@ The convenience functions are: parameter. *string* must be a :class:`str` instance or a :term:`bytes-like object`. - .. versionchanged:: 3.5 - Added support of :class:`str` instances. + .. versionadded:: 3.5 + Support for :class:`str` instances. A typical SAX application uses three kinds of objects: readers, handlers and input sources. "Reader" in this context is another term for parser, i.e. some diff --git a/Doc/library/xmlrpc.client.rst b/Doc/library/xmlrpc.client.rst index e199931..40aa2eb 100644 --- a/Doc/library/xmlrpc.client.rst +++ b/Doc/library/xmlrpc.client.rst @@ -36,8 +36,8 @@ between conformable Python objects and XML on the wire. allow_none=False, use_datetime=False, \ use_builtin_types=False, *, context=None) - .. versionchanged:: 3.3 - The *use_builtin_types* flag was added. + .. versionadded:: 3.3 + The *use_builtin_types* flag. A :class:`ServerProxy` instance is an object that manages communication with a remote XML-RPC server. The required first argument is a URI (Uniform Resource @@ -129,8 +129,8 @@ between conformable Python objects and XML on the wire. :class:`Server` is retained as an alias for :class:`ServerProxy` for backwards compatibility. New code should use :class:`ServerProxy`. - .. versionchanged:: 3.5 - Added the *context* argument. + .. versionadded:: 3.5 + The *context* argument. .. seealso:: @@ -517,8 +517,8 @@ Convenience Functions The obsolete *use_datetime* flag is similar to *use_builtin_types* but it applies only to date/time values. - .. versionchanged:: 3.3 - The *use_builtin_types* flag was added. + .. versionadded:: 3.3 + The *use_builtin_types* flag. .. _xmlrpc-client-example: diff --git a/Doc/library/xmlrpc.server.rst b/Doc/library/xmlrpc.server.rst index 37d1393..d38b7b1 100644 --- a/Doc/library/xmlrpc.server.rst +++ b/Doc/library/xmlrpc.server.rst @@ -43,8 +43,8 @@ servers written in Python. Servers can either be free standing, using :func:`~xmlrpc.client.loads` function and controls which types are processed when date/times values or binary data are received; it defaults to false. - .. versionchanged:: 3.3 - The *use_builtin_types* flag was added. + .. versionadded:: 3.3 + The *use_builtin_types* flag. .. class:: CGIXMLRPCRequestHandler(allow_none=False, encoding=None,\ @@ -57,8 +57,8 @@ servers written in Python. Servers can either be free standing, using :func:`~xmlrpc.client.loads` function and controls which types are processed when date/times values or binary data are received; it defaults to false. - .. versionchanged:: 3.3 - The *use_builtin_types* flag was added. + .. versionadded:: 3.3 + The *use_builtin_types* flag. .. class:: SimpleXMLRPCRequestHandler() @@ -327,8 +327,8 @@ to HTTP GET requests. Servers can either be free standing, using :class:`SimpleXMLRPCServer`; *requestHandler* defaults to :class:`DocXMLRPCRequestHandler`. - .. versionchanged:: 3.3 - The *use_builtin_types* flag was added. + .. versionadded:: 3.3 + The *use_builtin_types* flag. .. class:: DocCGIXMLRPCRequestHandler() diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index 54b8cc5..14525bb 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -75,7 +75,7 @@ The module defines the following items: Returns ``True`` if *filename* is a valid ZIP file based on its magic number, otherwise returns ``False``. *filename* may be a file or file-like object too. - .. versionchanged:: 3.1 + .. versionadded:: 3.1 Support for file and file-like objects. @@ -167,17 +167,17 @@ ZipFile Objects myzip.write('eggs.txt') .. versionadded:: 3.2 - Added the ability to use :class:`ZipFile` as a context manager. + The ability to use :class:`ZipFile` as a context manager. - .. versionchanged:: 3.3 - Added support for :mod:`bzip2 ` and :mod:`lzma` compression. + .. versionadded:: 3.3 + Support for :mod:`bzip2 ` and :mod:`lzma` compression. .. versionchanged:: 3.4 ZIP64 extensions are enabled by default. - .. versionchanged:: 3.5 - Added support for writing to unseekable streams. - Added support for the ``'x'`` mode. + .. versionadded:: 3.5 + Support for writing to unseekable streams. + Support for the ``'x'`` mode. .. method:: ZipFile.close() @@ -365,7 +365,7 @@ ZipFile Objects member of the given :class:`ZipInfo` instance. By default, the :class:`ZipInfo` constructor sets this member to :const:`ZIP_STORED`. - .. versionchanged:: 3.2 + .. versionadded:: 3.2 The *compress_type* argument. The following data attributes are also available: diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst index 8a5d5d1..e719dc9 100644 --- a/Doc/library/zipimport.rst +++ b/Doc/library/zipimport.rst @@ -89,7 +89,7 @@ zipimporter Objects file wasn't found. .. versionchanged:: 3.3 - :exc:`IOError` used to be raised instead of :exc:`OSError`. + :exc:`OSError` is now raised instead of :exc:`IOError`. .. method:: get_filename(fullname) diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst index 09026cb..e5866dd 100644 --- a/Doc/library/zlib.rst +++ b/Doc/library/zlib.rst @@ -56,8 +56,8 @@ The available exception and functions in this module are: compromise between speed and compression (currently equivalent to level 6). Raises the :exc:`error` exception if any error occurs. - .. versionchanged:: 3.6 - Keyword arguments are now supported. + .. versionadded:: 3.6 + Support for keyword arguments. .. function:: compressobj(level=-1, method=DEFLATED, wbits=15, memLevel=8, strategy=Z_DEFAULT_STRATEGY[, zdict]) @@ -90,8 +90,8 @@ The available exception and functions in this module are: to occur frequently in the data that is to be compressed. Those subsequences that are expected to be most common should come at the end of the dictionary. - .. versionchanged:: 3.3 - Added the *zdict* parameter and keyword argument support. + .. versionadded:: 3.3 + The *zdict* parameter, and support for keyword arguments. .. function:: crc32(data[, value]) @@ -156,8 +156,8 @@ The available exception and functions in this module are: modify its contents between the call to :func:`decompressobj` and the first call to the decompressor's ``decompress()`` method. - .. versionchanged:: 3.3 - Added the *zdict* parameter. + .. versionadded:: 3.3 + The *zdict* parameter. Compression objects support the following methods: