[Python-checkins] cpython (merge default -> default): merge heads

benjamin.peterson python-checkins at python.org
Sat Jun 4 01:39:18 EDT 2016


https://hg.python.org/cpython/rev/9e820058b97e
changeset:   101688:9e820058b97e
parent:      101686:249c1b2f852f
parent:      101683:2d69d0419879
user:        Benjamin Peterson <benjamin at python.org>
date:        Fri Jun 03 22:38:42 2016 -0700
summary:
  merge heads

files:
  Doc/library/asyncio-sync.rst   |   2 +-
  Doc/library/marshal.rst        |   2 +-
  Doc/library/urllib.request.rst |   2 +-
  Lib/asyncio/locks.py           |   2 +-
  Lib/trace.py                   |   2 +-
  Lib/urllib/request.py          |  19 ++++++++++++-------
  Misc/NEWS                      |   2 +-
  Python/symtable.c              |   2 +-
  8 files changed, 19 insertions(+), 14 deletions(-)


diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -52,7 +52,7 @@
    :meth:`acquire` is a coroutine and should be called with ``yield from``.
 
    Locks also support the context management protocol.  ``(yield from lock)``
-   should be used as context manager expression.
+   should be used as the context manager expression.
 
    This class is :ref:`not thread safe <asyncio-multithreading>`.
 
diff --git a/Doc/library/marshal.rst b/Doc/library/marshal.rst
--- a/Doc/library/marshal.rst
+++ b/Doc/library/marshal.rst
@@ -40,7 +40,7 @@
 point numbers, complex numbers, strings, bytes, bytearrays, tuples, lists, sets,
 frozensets, dictionaries, and code objects, where it should be understood that
 tuples, lists, sets, frozensets and dictionaries are only supported as long as
-the values contained therein are themselves supported.
+the values contained therein are themselves supported.  The
 singletons :const:`None`, :const:`Ellipsis` and :exc:`StopIteration` can also be
 marshalled and unmarshalled.
 For format *version* lower than 3, recursive lists, sets and dictionaries cannot
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
@@ -59,7 +59,7 @@
 
    The *cadefault* parameter is ignored.
 
-   This function always returns an object which can work as
+   This function always returns an object which can work as a
    :term:`context manager` and has methods such as
 
    * :meth:`~urllib.response.addinfourl.geturl` --- return the URL of the resource retrieved,
diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py
--- a/Lib/asyncio/locks.py
+++ b/Lib/asyncio/locks.py
@@ -111,7 +111,7 @@
     acquire() is a coroutine and should be called with 'yield from'.
 
     Locks also support the context management protocol.  '(yield from lock)'
-    should be used as context manager expression.
+    should be used as the context manager expression.
 
     Usage:
 
diff --git a/Lib/trace.py b/Lib/trace.py
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -224,7 +224,7 @@
 
         :param show_missing: Show lines that had no hits.
         :param summary: Include coverage summary per module.
-        :param coverdir: If None, the results of each module are placed in it's
+        :param coverdir: If None, the results of each module are placed in its
                          directory, otherwise it is included in the directory
                          specified.
         """
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -172,8 +172,8 @@
 
     The *cadefault* parameter is ignored.
 
-    For http and https urls, this function returns a http.client.HTTPResponse
-    object which has the following HTTPResponse Objects methods:
+    This function always returns an object which can work as a context
+    manager and has methods such as
 
     * geturl() - return the URL of the resource retrieved, commonly used to
       determine if a redirect was followed
@@ -185,12 +185,17 @@
     * getcode() - return the HTTP status code of the response.  Raises URLError
       on errors.
 
-    For ftp, file, and data urls and requests explicitly handled by legacy
+    For HTTP and HTTPS URLs, this function returns a http.client.HTTPResponse
+    object slightly modified. In addition to the three new methods above, the
+    msg attribute contains the same information as the reason attribute ---
+    the reason phrase returned by the server --- instead of the response
+    headers as it is specified in the documentation for HTTPResponse.
+
+    For FTP, file, and data URLs and requests explicitly handled by legacy
     URLopener and FancyURLopener classes, this function returns a
-    urllib.response.addinfourl object which can work as context manager and
-    also support the geturl(), info(), getcode() methods listed above.
-
-    Note that *None& may be returned if no handler handles the request (though
+    urllib.response.addinfourl object.
+
+    Note that None may be returned if no handler handles the request (though
     the default installed global OpenerDirector uses UnknownHandler to ensure
     this never happens).
 
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -8520,7 +8520,7 @@
 - Issue #16176: Properly identify Windows 8 via platform.platform()
 
 - Issue #16088: BaseHTTPRequestHandler's send_error method includes a
-  Content-Length header in it's response now. Patch by Antoine Pitrou.
+  Content-Length header in its response now. Patch by Antoine Pitrou.
 
 - Issue #16114: The subprocess module no longer provides a misleading error
   message stating that args[0] did not exist when either the cwd or executable
diff --git a/Python/symtable.c b/Python/symtable.c
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -854,7 +854,7 @@
 
     /* Copy the bound and global dictionaries.
 
-       These dictionary are used by all blocks enclosed by the
+       These dictionaries are used by all blocks enclosed by the
        current block.  The analyze_block() call modifies these
        dictionaries.
 

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


More information about the Python-checkins mailing list