[Python-checkins] cpython (merge 3.5 -> default): Merge typo and grammar fixes from 3.5

martin.panter python-checkins at python.org
Fri Nov 13 21:08:59 EST 2015


https://hg.python.org/cpython/rev/582175c2b24a
changeset:   99125:582175c2b24a
parent:      99118:bbf63749a129
parent:      99124:649f3721f648
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat Nov 14 01:29:13 2015 +0000
summary:
  Merge typo and grammar fixes from 3.5

files:
  Doc/library/ast.rst            |    2 +-
  Doc/library/copy.rst           |    4 +-
  Doc/library/ftplib.rst         |    4 +-
  Doc/library/linecache.rst      |    2 +-
  Doc/library/urllib.request.rst |    2 +-
  Doc/whatsnew/3.5.rst           |  149 ++++++++++----------
  Lib/doctest.py                 |    2 +-
  Lib/http/cookiejar.py          |    8 +-
  Lib/test/test_argparse.py      |    2 +-
  Misc/NEWS                      |    2 +-
  10 files changed, 89 insertions(+), 88 deletions(-)


diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -104,7 +104,7 @@
 :mod:`ast` Helpers
 ------------------
 
-Apart from the node classes, :mod:`ast` module defines these utility functions
+Apart from the node classes, the :mod:`ast` module defines these utility functions
 and classes for traversing abstract syntax trees:
 
 .. function:: parse(source, filename='<unknown>', mode='exec')
diff --git a/Doc/library/copy.rst b/Doc/library/copy.rst
--- a/Doc/library/copy.rst
+++ b/Doc/library/copy.rst
@@ -67,8 +67,8 @@
 
 Classes can use the same interfaces to control copying that they use to control
 pickling.  See the description of module :mod:`pickle` for information on these
-methods.  In fact, :mod:`copy` module uses the registered pickle functions from
-:mod:`copyreg` module.
+methods.  In fact, the :mod:`copy` module uses the registered
+pickle functions from the :mod:`copyreg` module.
 
 .. index::
    single: __copy__() (copy protocol)
diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst
--- a/Doc/library/ftplib.rst
+++ b/Doc/library/ftplib.rst
@@ -418,8 +418,8 @@
 
 .. method:: FTP_TLS.auth()
 
-   Set up secure control connection by using TLS or SSL, depending on what
-   specified in :meth:`ssl_version` attribute.
+   Set up a secure control connection by using TLS or SSL, depending on what
+   is specified in the :attr:`ssl_version` attribute.
 
    .. versionchanged:: 3.4
       The method now supports hostname check with
diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst
--- a/Doc/library/linecache.rst
+++ b/Doc/library/linecache.rst
@@ -49,7 +49,7 @@
 
 .. function:: lazycache(filename, module_globals)
 
-   Capture enough detail about a non-file based module to permit getting its
+   Capture enough detail about a non-file-based module to permit getting its
    lines later via :func:`getline` even if *module_globals* is None in the later
    call. This avoids doing I/O until a line is actually needed, without having
    to carry the module globals around indefinitely.
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -1168,7 +1168,7 @@
    #!/usr/bin/env python
    import sys
    data = sys.stdin.read()
-   print('Content-type: text-plain\n\nGot Data: "%s"' % data)
+   print('Content-type: text/plain\n\nGot Data: "%s"' % data)
 
 Here is an example of doing a ``PUT`` request using :class:`Request`::
 
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -113,7 +113,7 @@
   :ref:`implemented in C <whatsnew-ordereddict>`, which makes it
   4 to 100 times faster.
 
-* :mod:`ssl` module gained
+* The :mod:`ssl` module gained
   :ref:`support for Memory BIO <whatsnew-sslmemorybio>`, which decouples SSL
   protocol handling from network IO.
 
@@ -346,7 +346,7 @@
 PEP 461 - % formatting support for bytes and bytearray
 ------------------------------------------------------
 
-:pep:`461` adds support for ``%``
+:pep:`461` adds support for the ``%``
 :ref:`interpolation operator <bytes-formatting>` to :class:`bytes`
 and :class:`bytearray`.
 
@@ -467,7 +467,7 @@
 
 An :py:data:`errno.EINTR` error code is returned whenever a system call, that
 is waiting for I/O, is interrupted by a signal.  Previously, Python would
-raise :exc:`InterruptedError` in such case.  This meant that, when writing a
+raise :exc:`InterruptedError` in such cases.  This meant that, when writing a
 Python application, the developer had two choices:
 
 #. Ignore the ``InterruptedError``.
@@ -514,7 +514,7 @@
   :func:`~os.writev`;
 
 * special cases: :func:`os.close` and :func:`os.dup2` now ignore
-  :py:data:`~errno.EINTR` error, the syscall is not retried (see the PEP
+  :py:data:`~errno.EINTR` errors; the syscall is not retried (see the PEP
   for the rationale);
 
 * :mod:`select` functions: :func:`devpoll.poll() <select.devpoll.poll>`,
@@ -757,7 +757,7 @@
 asyncio
 -------
 
-Since :mod:`asyncio` module is :term:`provisional <provisional api>`,
+Since the :mod:`asyncio` module is :term:`provisional <provisional api>`,
 all changes introduced in Python 3.5 have also been backported to Python 3.4.x.
 
 Notable changes in the :mod:`asyncio` module since Python 3.4.0:
@@ -857,7 +857,7 @@
 
 The :class:`~collections.deque` class now defines
 :meth:`~collections.deque.index`, :meth:`~collections.deque.insert`, and
-:meth:`~collections.deque.copy`, as well as supports ``+`` and ``*`` operators.
+:meth:`~collections.deque.copy`, and supports the ``+`` and ``*`` operators.
 This allows deques to be recognized as a :class:`~collections.abc.MutableSequence`
 and improves their substitutability for lists.
 (Contributed by Raymond Hettinger in :issue:`23704`.)
@@ -871,7 +871,7 @@
 
 (Contributed by Berker Peksag in :issue:`24064`.)
 
-The :class:`~collections.UserString` class now implements
+The :class:`~collections.UserString` class now implements the
 :meth:`__getnewargs__`, :meth:`__rmod__`, :meth:`~str.casefold`,
 :meth:`~str.format_map`, :meth:`~str.isprintable`, and :meth:`~str.maketrans`
 methods to match the corresponding methods of :class:`str`.
@@ -925,8 +925,8 @@
 :meth:`~concurrent.futures.ProcessPoolExecutor` is used.
 (Contributed by Dan O'Reilly in :issue:`11271`.)
 
-A number of workers in :class:`~concurrent.futures.ThreadPoolExecutor` constructor is
-optional now.  The default value equals to 5 times the number of CPUs.
+The number of workers in the :class:`~concurrent.futures.ThreadPoolExecutor`
+constructor is optional now.  The default value is 5 times the number of CPUs.
 (Contributed by Claudiu Popa in :issue:`21527`.)
 
 
@@ -934,10 +934,10 @@
 ------------
 
 :mod:`configparser` now provides a way to customize the conversion
-of values by specifying a dictionary of converters in
+of values by specifying a dictionary of converters in the
 :class:`~configparser.ConfigParser` constructor, or by defining them
 as methods in ``ConfigParser`` subclasses.  Converters defined in
-parser instance are inherited by its section proxies.
+a parser instance are inherited by its section proxies.
 
 Example::
 
@@ -989,9 +989,9 @@
 curses
 ------
 
-The new :func:`~curses.update_lines_cols` function updates :envvar:`LINES`
+The new :func:`~curses.update_lines_cols` function updates the :envvar:`LINES`
 and :envvar:`COLS` environment variables.  This is useful for detecting
-manual screen resize.  (Contributed by Arnon Yaari in :issue:`4254`.)
+manual screen resizing.  (Contributed by Arnon Yaari in :issue:`4254`.)
 
 
 dbm
@@ -1019,7 +1019,7 @@
 distutils
 ---------
 
-Both ``build`` and ``build_ext`` commands now accept a ``-j`` option to
+Both the ``build`` and ``build_ext`` commands now accept a ``-j`` option to
 enable parallel building of extension modules.
 (Contributed by Antoine Pitrou in :issue:`5309`.)
 
@@ -1032,7 +1032,7 @@
 -------
 
 The :func:`~doctest.DocTestSuite` function returns an empty
-:class:`unittest.TestSuite` if *module* contains no docstrings instead of
+:class:`unittest.TestSuite` if *module* contains no docstrings, instead of
 raising :exc:`ValueError`.  (Contributed by Glenn Jones in :issue:`15916`.)
 
 
@@ -1081,7 +1081,7 @@
 faulthandler
 ------------
 
-:func:`~faulthandler.enable`, :func:`~faulthandler.register`,
+The :func:`~faulthandler.enable`, :func:`~faulthandler.register`,
 :func:`~faulthandler.dump_traceback` and
 :func:`~faulthandler.dump_traceback_later` functions now accept file
 descriptors in addition to file-like objects.
@@ -1093,7 +1093,7 @@
 
 .. _whatsnew-lrucache:
 
-Most of :func:`~functools.lru_cache` machinery is now implemented in C, making
+Most of the :func:`~functools.lru_cache` machinery is now implemented in C, making
 it significantly faster.  (Contributed by Matt Joiner, Alexey Kachayev, and
 Serhiy Storchaka in :issue:`14373`.)
 
@@ -1101,15 +1101,15 @@
 glob
 ----
 
-:func:`~glob.iglob` and :func:`~glob.glob` functions now support recursive
-search in subdirectories using the ``"**"`` pattern.
+The :func:`~glob.iglob` and :func:`~glob.glob` functions now support recursive
+search in subdirectories, using the ``"**"`` pattern.
 (Contributed by Serhiy Storchaka in :issue:`13968`.)
 
 
 gzip
 ----
 
-The *mode* argument of :class:`~gzip.GzipFile` constructor now
+The *mode* argument of the :class:`~gzip.GzipFile` constructor now
 accepts ``"x"`` to request exclusive creation.
 (Contributed by Tim Heaney in :issue:`19222`.)
 
@@ -1176,7 +1176,7 @@
 imaplib
 -------
 
-The :class:`~imaplib.IMAP4` class now supports :term:`context manager` protocol.
+The :class:`~imaplib.IMAP4` class now supports the :term:`context manager` protocol.
 When used in a :keyword:`with` statement, the IMAP4 ``LOGOUT``
 command will be called automatically at the end of the block.
 (Contributed by Tarek Ziadé and Serhiy Storchaka in :issue:`4972`.)
@@ -1184,7 +1184,7 @@
 The :mod:`imaplib` module now supports :rfc:`5161` (ENABLE Extension)
 and :rfc:`6855` (UTF-8 Support) via the :meth:`IMAP4.enable() <imaplib.IMAP4.enable>`
 method.  A new :attr:`IMAP4.utf8_enabled <imaplib.IMAP4.utf8_enabled>`
-attribute, tracks whether or not :rfc:`6855` support is enabled.
+attribute tracks whether or not :rfc:`6855` support is enabled.
 (Contributed by Milan Oberkirch, R. David Murray, and Maciej Szulik in
 :issue:`21800`.)
 
@@ -1226,7 +1226,7 @@
 inspect
 -------
 
-Both :class:`~inspect.Signature` and :class:`~inspect.Parameter` classes are
+Both the :class:`~inspect.Signature` and :class:`~inspect.Parameter` classes are
 now picklable and hashable.  (Contributed by Yury Selivanov in :issue:`20726`
 and :issue:`20334`.)
 
@@ -1260,7 +1260,7 @@
 and :func:`~inspect.getcoroutinestate`.
 (Contributed by Yury Selivanov in :issue:`24017` and :issue:`24400`.)
 
-:func:`~inspect.stack`, :func:`~inspect.trace`,
+The :func:`~inspect.stack`, :func:`~inspect.trace`,
 :func:`~inspect.getouterframes`, and :func:`~inspect.getinnerframes`
 functions now return a list of named tuples.
 (Contributed by Daniel Shahaf in :issue:`16808`.)
@@ -1279,7 +1279,7 @@
 ipaddress
 ---------
 
-Both :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` classes
+Both the :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` classes
 now accept an ``(address, netmask)`` tuple argument, so as to easily construct
 network objects from existing addresses::
 
@@ -1291,7 +1291,7 @@
 
 (Contributed by Peter Moody and Antoine Pitrou in :issue:`16531`.)
 
-A new :attr:`~ipaddress.IPv4Network.reverse_pointer` attribute for
+A new :attr:`~ipaddress.IPv4Network.reverse_pointer` attribute for the
 :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` classes
 returns the name of the reverse DNS PTR record::
 
@@ -1323,7 +1323,7 @@
 ---------
 
 A new :func:`~linecache.lazycache` function can be used to capture information
-about a non-file based module to permit getting its lines later via
+about a non-file-based module to permit getting its lines later via
 :func:`~linecache.getline`. This avoids doing I/O until a line is actually
 needed, without having to carry the module globals around indefinitely.
 (Contributed by Robert Collins in :issue:`17911`.)
@@ -1436,13 +1436,13 @@
 of the ``BY_HANDLE_FILE_INFORMATION`` structure returned by
 ``GetFileInformationByHandle()``.  (Contributed by Ben Hoyt in :issue:`21719`.)
 
-The :func:`~os.urandom` function now uses ``getrandom()`` syscall on Linux 3.17
+The :func:`~os.urandom` function now uses the ``getrandom()`` syscall on Linux 3.17
 or newer, and ``getentropy()`` on OpenBSD 5.6 and newer, removing the need to
 use ``/dev/urandom`` and avoiding failures due to potential file descriptor
 exhaustion.  (Contributed by Victor Stinner in :issue:`22181`.)
 
 New :func:`~os.get_blocking` and :func:`~os.set_blocking` functions allow to
-get and set a file descriptor blocking mode (:data:`~os.O_NONBLOCK`.)
+get and set a file descriptor's blocking mode (:data:`~os.O_NONBLOCK`.)
 (Contributed by Victor Stinner in :issue:`22054`.)
 
 The :func:`~os.truncate` and :func:`~os.ftruncate` functions are now supported
@@ -1466,8 +1466,8 @@
 -------
 
 The new :meth:`Path.samefile() <pathlib.Path.samefile>` method can be used
-to check whether the path points to the same file as other path, which can be
-either an another :class:`~pathlib.Path` object, or a string::
+to check whether the path points to the same file as another path, which can
+be either another :class:`~pathlib.Path` object, or a string::
 
     >>> import pathlib
     >>> p1 = pathlib.Path('/etc/hosts')
@@ -1486,7 +1486,7 @@
 Claudiu Popa in :issue:`19776`.)
 
 A new :meth:`Path.home() <pathlib.Path.home>` class method can be used to get
-an instance of :class:`~pathlib.Path` object representing the user’s home
+a :class:`~pathlib.Path` instance representing the user’s home
 directory.
 (Contributed by Victor Salgado and Mayank Tripathi in :issue:`19777`.)
 
@@ -1539,17 +1539,17 @@
 
 (Contributed by Serhiy Storchaka in :issue:`9179`.)
 
-The number of capturing groups in regular expression is no longer limited by
+The number of capturing groups in regular expressions is no longer limited to
 100.  (Contributed by Serhiy Storchaka in :issue:`22437`.)
 
 The :func:`~re.sub` and :func:`~re.subn` functions now replace unmatched
 groups with empty strings instead of raising an exception.
 (Contributed by Serhiy Storchaka in :issue:`1519638`.)
 
-The :class:`re.error` exceptions have new attributes:
+The :class:`re.error` exceptions have new attributes,
 :attr:`~re.error.msg`, :attr:`~re.error.pattern`,
 :attr:`~re.error.pos`, :attr:`~re.error.lineno`,
-and :attr:`~re.error.colno` that provide better context
+and :attr:`~re.error.colno`, that provide better context
 information about the error::
 
     >>> re.compile("""
@@ -1607,7 +1607,7 @@
 smtpd
 -----
 
-Both :class:`~smtpd.SMTPServer` and :class:`~smtpd.SMTPChannel` classes now
+Both the :class:`~smtpd.SMTPServer` and :class:`~smtpd.SMTPChannel` classes now
 accept a *decode_data* keyword argument to determine if the ``DATA`` portion of
 the SMTP transaction is decoded using the ``"utf-8"`` codec or is instead
 provided to the
@@ -1649,7 +1649,7 @@
 accepts an additional debuglevel (2), which enables timestamps in debug
 messages. (Contributed by Gavin Chappell and Maciej Szulik in :issue:`16914`.)
 
-Both :meth:`SMTP.sendmail() <smtplib.SMTP.sendmail>` and
+Both the :meth:`SMTP.sendmail() <smtplib.SMTP.sendmail>` and
 :meth:`SMTP.send_message() <smtplib.SMTP.send_message>` methods now
 support support :rfc:`6531` (SMTPUTF8).
 (Contributed by Milan Oberkirch and R. David Murray in :issue:`22027`.)
@@ -1658,7 +1658,7 @@
 sndhdr
 ------
 
-:func:`~sndhdr.what` and :func:`~sndhdr.whathdr` functions  now return
+The :func:`~sndhdr.what` and :func:`~sndhdr.whathdr` functions  now return
 a :func:`~collections.namedtuple`.  (Contributed by Claudiu Popa in
 :issue:`18615`.)
 
@@ -1671,7 +1671,7 @@
 
 A new :meth:`socket.sendfile() <socket.socket.sendfile>` method allows to
 send a file over a socket by using the high-performance :func:`os.sendfile`
-function on UNIX resulting in uploads being from 2 to 3 times faster than when
+function on UNIX, resulting in uploads being from 2 to 3 times faster than when
 using plain :meth:`socket.send() <socket.socket.send>`.
 (Contributed by Giampaolo Rodola' in :issue:`17552`.)
 
@@ -1682,7 +1682,7 @@
 
 The *backlog* argument of the :meth:`socket.listen() <socket.socket.listen>`
 method is now optional.  By default it is set to
-:data:`SOMAXCONN <socket.SOMAXCONN>` or to ``128`` whichever is less.
+:data:`SOMAXCONN <socket.SOMAXCONN>` or to ``128``, whichever is less.
 (Contributed by Charles-François Natali in :issue:`21455`.)
 
 
@@ -1698,7 +1698,7 @@
 
 The new :class:`~ssl.SSLObject` class has been added to provide SSL protocol
 support for cases when the network I/O capabilities of :class:`~ssl.SSLSocket`
-are not necessary or suboptimal.  ``SSLObject`` represents
+are not necessary or are suboptimal.  ``SSLObject`` represents
 an SSL protocol instance, but does not implement any network I/O methods, and
 instead provides a memory buffer interface.  The new :class:`~ssl.MemoryBIO`
 class can be used to pass data between Python and an SSL protocol instance.
@@ -1716,8 +1716,8 @@
 
 (Contributed by Benjamin Peterson in :issue:`20188`.)
 
-Where OpenSSL support is present, :mod:`ssl` module now implements
-*Application-Layer Protocol Negotiation* TLS extension as described
+Where OpenSSL support is present, the :mod:`ssl` module now implements
+the *Application-Layer Protocol Negotiation* TLS extension as described
 in :rfc:`7301`.
 
 The new :meth:`SSLContext.set_alpn_protocols() <ssl.SSLContext.set_alpn_protocols>`
@@ -1727,7 +1727,7 @@
 The new
 :meth:`SSLSocket.selected_alpn_protocol() <ssl.SSLSocket.selected_alpn_protocol>`
 returns the protocol that was selected during the TLS handshake.
-:data:`~ssl.HAS_ALPN` flag indicates whether ALPN support is present.
+The :data:`~ssl.HAS_ALPN` flag indicates whether ALPN support is present.
 
 
 Other Changes
@@ -1742,7 +1742,7 @@
 (Contributed by Giampaolo Rodola' in :issue:`17552`.)
 
 The :meth:`SSLSocket.send() <ssl.SSLSocket.send>` method now raises either
-:exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError` exception on a
+the :exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError` exception on a
 non-blocking socket if the operation would block. Previously, it would return
 ``0``.  (Contributed by Nikolaus Rath in :issue:`20951`.)
 
@@ -1758,7 +1758,7 @@
 The :meth:`SSLSocket.do_handshake() <ssl.SSLSocket.do_handshake>`,
 :meth:`SSLSocket.read() <ssl.SSLSocket.read>`,
 :meth:`SSLSocket.shutdown() <ssl.SSLSocket.shutdown>`, and
-:meth:`SSLSocket.write() <ssl.SSLSocket.write>` methods of :class:`~ssl.SSLSocket`
+:meth:`SSLSocket.write() <ssl.SSLSocket.write>` methods of the :class:`~ssl.SSLSocket`
 class no longer reset the socket timeout every time bytes are received or sent.
 The socket timeout is now the maximum total duration of the method.
 (Contributed by Victor Stinner in :issue:`23853`.)
@@ -1770,7 +1770,7 @@
 sqlite3
 -------
 
-The :class:`~sqlite3.Row` class now fully supports sequence protocol,
+The :class:`~sqlite3.Row` class now fully supports the sequence protocol,
 in particular :func:`reversed` iteration and slice indexing.
 (Contributed by Claudiu Popa in :issue:`10203`; by Lucas Sinclair,
 Jessica McKellar, and  Serhiy Storchaka in :issue:`13583`.)
@@ -1824,7 +1824,7 @@
 ---------
 
 The name of the user scripts directory on Windows now includes the first
-two components of Python version. (Contributed by Paul Moore
+two components of the Python version. (Contributed by Paul Moore
 in :issue:`23437`.)
 
 
@@ -1834,7 +1834,7 @@
 The *mode* argument of the :func:`~tarfile.open` function now accepts ``"x"``
 to request exclusive creation.  (Contributed by Berker Peksag in :issue:`21717`.)
 
-:meth:`TarFile.extractall() <tarfile.TarFile.extractall>` and
+The :meth:`TarFile.extractall() <tarfile.TarFile.extractall>` and
 :meth:`TarFile.extract() <tarfile.TarFile.extract>` methods now take a keyword
 argument *numeric_only*.  If set to ``True``, the extracted files and
 directories will be owned by the numeric ``uid`` and ``gid`` from the tarfile.
@@ -1851,7 +1851,7 @@
 threading
 ---------
 
-Both :meth:`Lock.acquire() <threading.Lock.acquire>` and
+Both the :meth:`Lock.acquire() <threading.Lock.acquire>` and
 :meth:`RLock.acquire() <threading.RLock.acquire>` methods
 now use a monotonic clock for timeout management.
 (Contributed by Victor Stinner in :issue:`22043`.)
@@ -1898,7 +1898,7 @@
 :class:`~traceback.StackSummary`, and :class:`~traceback.FrameSummary`.
 (Contributed by Robert Collins in :issue:`17911`.)
 
-Both :func:`~traceback.print_tb` and :func:`~traceback.print_stack` functions
+Both the :func:`~traceback.print_tb` and :func:`~traceback.print_stack` functions
 now support negative values for the *limit* argument.
 (Contributed by Dmitry Kazakov in :issue:`22619`.)
 
@@ -1912,8 +1912,8 @@
 :term:`awaitables <awaitable>`.
 (Contributed by Yury Selivanov in :issue:`24017`.)
 
-A new :class:`~types.CoroutineType` is the type of :term:`coroutine` objects
-created by :keyword:`async def` functions.
+A new type called :class:`~types.CoroutineType`, which is used for
+:term:`coroutine` objects created by :keyword:`async def` functions.
 (Contributed by Yury Selivanov in :issue:`24400`.)
 
 
@@ -1934,7 +1934,7 @@
 is impossible for a package name to match the default pattern.
 (Contributed by Robert Collins and Barry A. Warsaw in :issue:`16662`.)
 
-Unittest discovery errors now are exposed in
+Unittest discovery errors now are exposed in the
 :data:`TestLoader.errors <unittest.TestLoader.errors>` attribute of the
 :class:`~unittest.TestLoader` instance.
 (Contributed by Robert Collins in :issue:`19746`.)
@@ -1948,7 +1948,7 @@
 
 The :class:`~unittest.mock.Mock` class has the following improvements:
 
-* Class constructor has a new *unsafe* parameter, which causes mock
+* The class constructor has a new *unsafe* parameter, which causes mock
   objects to raise :exc:`AttributeError` on attribute names starting
   with ``"assert"``.
   (Contributed by Kushal Das in :issue:`21238`.)
@@ -2006,10 +2006,10 @@
 ------
 
 The :class:`client.ServerProxy <xmlrpc.client.ServerProxy>` class now supports
-:term:`context manager` protocol.
+the :term:`context manager` protocol.
 (Contributed by Claudiu Popa in :issue:`20627`.)
 
-:class:`client.ServerProxy <xmlrpc.client.ServerProxy>` constructor now accepts
+The :class:`client.ServerProxy <xmlrpc.client.ServerProxy>` constructor now accepts
 an optional :class:`ssl.SSLContext` instance.
 (Contributed by Alex Gaynor in :issue:`22960`.)
 
@@ -2039,7 +2039,7 @@
 Other module-level changes
 ==========================
 
-Many functions in :mod:`mmap`, :mod:`ossaudiodev`, :mod:`socket`,
+Many functions in the :mod:`mmap`, :mod:`ossaudiodev`, :mod:`socket`,
 :mod:`ssl`, and :mod:`codecs` modules now accept writable
 :term:`bytes-like objects <bytes-like object>`.
 (Contributed by Serhiy Storchaka in :issue:`23001`.)
@@ -2098,7 +2098,7 @@
 improvement in some benchmarks.
 (Contributed by Antoine Pitrou in :issue:`22847`.)
 
-Objects from :mod:`random` module now use 50% less memory on 64-bit
+Objects from the :mod:`random` module now use 50% less memory on 64-bit
 builds.  (Contributed by Serhiy Storchaka in :issue:`23488`.)
 
 The :func:`property` getter calls are up to 25% faster.
@@ -2108,7 +2108,7 @@
 (Contributed by Stefan Behnel in :issue:`22464`.)
 
 String methods :meth:`~str.find`, :meth:`~str.rfind`, :meth:`~str.split`,
-:meth:`~str.partition` and :keyword:`in` string operator are now significantly
+:meth:`~str.partition` and the :keyword:`in` string operator are now significantly
 faster for searching 1-character substrings.
 (Contributed by Serhiy Storchaka in :issue:`23573`.)
 
@@ -2154,14 +2154,14 @@
 (Contributed by Benjamin Peterson in :issue:`21176`.  See also :pep:`465`
 for details.)
 
-The :c:member:`PyTypeObject.tp_finalize` slot is now part of stable ABI.
+The :c:member:`PyTypeObject.tp_finalize` slot is now part of the stable ABI.
 
 Windows builds now require Microsoft Visual C++ 14.0, which
 is available as part of `Visual Studio 2015 <http://www.visualstudio.com>`_.
 
-Extension modules now include platform information tag in their filename on
+Extension modules now include a platform information tag in their filename on
 some platforms (the tag is optional, and CPython will import extensions without
-it; although if the tag is present and mismatched, the extension won't be
+it, although if the tag is present and mismatched, the extension won't be
 loaded):
 
 * On Linux, extension module filenames end with
@@ -2217,7 +2217,7 @@
 Deprecated Python Behavior
 --------------------------
 
-Raising :exc:`StopIteration` exception inside a generator will now generate a silent
+Raising the :exc:`StopIteration` exception inside a generator will now generate a silent
 :exc:`PendingDeprecationWarning`, which will become a non-silent deprecation
 warning in Python 3.6 and will trigger a :exc:`RuntimeError` in Python 3.7.
 See :ref:`PEP 479: Change StopIteration handling inside generators <whatsnew-pep-479>`
@@ -2276,7 +2276,7 @@
 :func:`~inspect.getargvalues`, :func:`~inspect.getcallargs`,
 :func:`~inspect.getargvalues`, :func:`~inspect.formatargspec`, and
 :func:`~inspect.formatargvalues` functions are deprecated in favor of
-:func:`inspect.signature` API.
+the :func:`inspect.signature` API.
 (Contributed by Yury Selivanov in :issue:`20438`.)
 
 Use of :const:`re.LOCALE` flag with str patterns or :const:`re.ASCII` is now
@@ -2354,7 +2354,7 @@
   on a non-blocking socket if the operation would block.  Previously,
   it would return ``0``.  (Contributed by Nikolaus Rath in :issue:`20951`.)
 
-* The ``__name__`` attribute of generator is now set from the function name,
+* The ``__name__`` attribute of generators is now set from the function name,
   instead of being set from the code name. Use ``gen.gi_code.co_name`` to
   retrieve the code name. Generators also have a new ``__qualname__``
   attribute, the qualified name, which is now used for the representation
@@ -2376,7 +2376,7 @@
 * If the current directory is set to a directory that no longer exists then
   :exc:`FileNotFoundError` will no longer be raised and instead
   :meth:`~importlib.machinery.FileFinder.find_spec` will return ``None``
-  **without** caching ``None`` in :data:`sys.path_importer_cache` which is
+  **without** caching ``None`` in :data:`sys.path_importer_cache`, which is
   different than the typical case (:issue:`22834`).
 
 * HTTP status code and messages from :mod:`http.client` and :mod:`http.server`
@@ -2395,7 +2395,7 @@
 * The :func:`re.split` function always ignored empty pattern matches, so the
   ``"x*"`` pattern worked the same as ``"x+"``, and the ``"\b"`` pattern never
   worked.  Now :func:`re.split` raises a warning if the pattern could match
-  an empty string.  For compatibility use patterns that never match an empty
+  an empty string.  For compatibility, use patterns that never match an empty
   string (e.g. ``"x+"`` instead of ``"x*"``).  Patterns that could only match
   an empty string (such as ``"\b"``) now raise an error.
   (Contributed by Serhiy Storchaka in :issue:`22818`.)
@@ -2431,9 +2431,9 @@
 * The ``pygettext.py`` Tool now uses the standard +NNNN format for timezones in
   the POT-Creation-Date header.
 
-* The :mod:`smtplib` module now uses :data:`sys.stderr` instead of previous
-  module level :data:`stderr` variable for debug output.  If your (test)
-  program depends on patching the module level variable to capture the debug
+* The :mod:`smtplib` module now uses :data:`sys.stderr` instead of the previous
+  module-level :data:`stderr` variable for debug output.  If your (test)
+  program depends on patching the module-level variable to capture the debug
   output, you will need to update it to capture sys.stderr instead.
 
 * The :meth:`str.startswith` and :meth:`str.endswith` methods no longer return
@@ -2471,11 +2471,12 @@
   (Contributed by Serhiy Storchaka in :issue:`22453`.)
 
 * Because the lack of the :attr:`__module__` attribute breaks pickling and
-  introspection, a deprecation warning now is raised for builtin type without
-  the :attr:`__module__` attribute.  Would be an AttributeError in future.
+  introspection, a deprecation warning is now raised for builtin types without
+  the :attr:`__module__` attribute.  This would be an AttributeError in
+  the future.
   (Contributed by Serhiy Storchaka in :issue:`20204`.)
 
-* As part of :pep:`492` implementation, ``tp_reserved`` slot of
+* As part of the :pep:`492` implementation, the ``tp_reserved`` slot of
   :c:type:`PyTypeObject` was replaced with a
   :c:member:`tp_as_async` slot.  Refer to :ref:`coro-objects` for
   new types, structures and functions.
diff --git a/Lib/doctest.py b/Lib/doctest.py
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -1575,7 +1575,7 @@
 
         # If `want` contains hex-escaped character such as "\u1234",
         # then `want` is a string of six characters(e.g. [\,u,1,2,3,4]).
-        # On the other hand, `got` could be an another sequence of
+        # On the other hand, `got` could be another sequence of
         # characters such as [\u1234], so `want` and `got` should
         # be folded to hex-escaped ASCII string to compare.
         got = self._toAscii(got)
diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py
--- a/Lib/http/cookiejar.py
+++ b/Lib/http/cookiejar.py
@@ -423,10 +423,10 @@
     Takes a list of lists of (key, value) pairs and produces a single header
     value.  Attribute values are quoted if needed.
 
-    >>> join_header_words([[("text/plain", None), ("charset", "iso-8859/1")]])
-    'text/plain; charset="iso-8859/1"'
-    >>> join_header_words([[("text/plain", None)], [("charset", "iso-8859/1")]])
-    'text/plain, charset="iso-8859/1"'
+    >>> join_header_words([[("text/plain", None), ("charset", "iso-8859-1")]])
+    'text/plain; charset="iso-8859-1"'
+    >>> join_header_words([[("text/plain", None)], [("charset", "iso-8859-1")]])
+    'text/plain, charset="iso-8859-1"'
 
     """
     headers = []
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -3026,7 +3026,7 @@
     '''Test extremely small number of columns.
 
     TestCase prevents "COLUMNS" from being too small in the tests themselves,
-    but we don't want any exceptions thrown in such case. Only ugly representation.
+    but we don't want any exceptions thrown in such cases. Only ugly representation.
     '''
     def setUp(self):
         env = support.EnvironmentVarGuard()
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1854,7 +1854,7 @@
 C API
 -----
 
-- Issue #20204: Deprecation warning is now raised for builtin type without the
+- Issue #20204: Deprecation warning is now raised for builtin types without the
   __module__ attribute.
 
 Windows

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list