[Python-checkins] r87400 - in python/branches/py3k: Doc/library/http.client.rst Doc/library/urllib.request.rst Lib/urllib/request.py

georg.brandl python-checkins at python.org
Sun Dec 19 13:33:52 CET 2010


Author: georg.brandl
Date: Sun Dec 19 13:33:52 2010
New Revision: 87400

Log:
#3243 follow-up: remove debugging print and fix docs; data is a bytes object.

Modified:
   python/branches/py3k/Doc/library/http.client.rst
   python/branches/py3k/Doc/library/urllib.request.rst
   python/branches/py3k/Lib/urllib/request.py

Modified: python/branches/py3k/Doc/library/http.client.rst
==============================================================================
--- python/branches/py3k/Doc/library/http.client.rst	(original)
+++ python/branches/py3k/Doc/library/http.client.rst	Sun Dec 19 13:33:52 2010
@@ -403,7 +403,7 @@
    headers to send with the request.
 
    .. versionadded:: 3.2
-      *body* can be an iterable
+      *body* can now be an iterable.
 
 .. method:: HTTPConnection.getresponse()
 

Modified: python/branches/py3k/Doc/library/urllib.request.rst
==============================================================================
--- python/branches/py3k/Doc/library/urllib.request.rst	(original)
+++ python/branches/py3k/Doc/library/urllib.request.rst	Sun Dec 19 13:33:52 2010
@@ -20,7 +20,7 @@
    Open the URL *url*, which can be either a string or a
    :class:`Request` object.
 
-   *data* may be a string specifying additional data to send to the
+   *data* may be a bytes object specifying additional data to send to the
    server, or ``None`` if no such data is needed. *data* may also be an
    iterable object and in that case Content-Length value must be specified in
    the headers. Currently HTTP requests are the only ones that use *data*; the

Modified: python/branches/py3k/Lib/urllib/request.py
==============================================================================
--- python/branches/py3k/Lib/urllib/request.py	(original)
+++ python/branches/py3k/Lib/urllib/request.py	Sun Dec 19 13:33:52 2010
@@ -1057,7 +1057,6 @@
                 try:
                     mv = memoryview(data)
                 except TypeError:
-                    print(data)
                     if isinstance(data, collections.Iterable):
                         raise ValueError("Content-Length should be specified \
                                 for iterable data of type %r %r" % (type(data),


More information about the Python-checkins mailing list