[Python-checkins] cpython (3.3): Issue #18743: Fix references to non-existant "StringIO" module.

serhiy.storchaka python-checkins at python.org
Fri Aug 16 23:13:16 CEST 2013


http://hg.python.org/cpython/rev/b23ad357c214
changeset:   85204:b23ad357c214
branch:      3.3
parent:      85198:193bcc12575d
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sat Aug 17 00:09:55 2013 +0300
summary:
  Issue #18743: Fix references to non-existant "StringIO" module.

files:
  Doc/c-api/typeobj.rst           |  2 +-
  Doc/library/gzip.rst            |  2 +-
  Doc/library/mailbox.rst         |  4 ++--
  Doc/library/tempfile.rst        |  2 +-
  Doc/library/unittest.mock.rst   |  6 +++---
  Doc/library/xml.dom.minidom.rst |  2 +-
  6 files changed, 9 insertions(+), 9 deletions(-)


diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -192,7 +192,7 @@
    An optional pointer to the instance print function.
 
    The print function is only called when the instance is printed to a *real* file;
-   when it is printed to a pseudo-file (like a :class:`StringIO` instance), the
+   when it is printed to a pseudo-file (like a :class:`io.StringIO` instance), the
    instance's :c:member:`~PyTypeObject.tp_repr` or :c:member:`~PyTypeObject.tp_str` function is called to convert it to
    a string.  These are also called when the type's :c:member:`~PyTypeObject.tp_print` field is
    *NULL*.  A type should never implement :c:member:`~PyTypeObject.tp_print` in a way that produces
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst
--- a/Doc/library/gzip.rst
+++ b/Doc/library/gzip.rst
@@ -62,7 +62,7 @@
    value.
 
    The new class instance is based on *fileobj*, which can be a regular file, a
-   :class:`StringIO` object, or any other object which simulates a file.  It
+   :class:`io.BytesIO` object, or any other object which simulates a file.  It
    defaults to ``None``, in which case *filename* is opened to provide a file
    object.
 
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -674,8 +674,8 @@
 
       In Babyl mailboxes, the headers of a message are not stored contiguously
       with the body of the message. To generate a file-like representation, the
-      headers and body are copied together into a :class:`StringIO` instance
-      (from the :mod:`StringIO` module), which has an API identical to that of a
+      headers and body are copied together into a :class:`io.BytesIO` instance,
+      which has an API identical to that of a
       file. As a result, the file-like object is truly independent of the
       underlying mailbox but does not save memory compared to a string
       representation.
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -82,7 +82,7 @@
    causes the file to roll over to an on-disk file regardless of its size.
 
    The returned object is a file-like object whose :attr:`_file` attribute
-   is either a :class:`BytesIO` or :class:`StringIO` object (depending on
+   is either a :class:`io.BytesIO` or :class:`io.StringIO` object (depending on
    whether binary or text *mode* was specified) or a true file
    object, depending on whether :func:`rollover` has been called.  This
    file-like object can be used in a :keyword:`with` statement, just like
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -1084,9 +1084,9 @@
       ...
     TypeError: 'NonCallableMock' object is not callable
 
-Another use case might be to replace an object with a `StringIO` instance:
-
-    >>> from StringIO import StringIO
+Another use case might be to replace an object with a `io.StringIO` instance:
+
+    >>> from io import StringIO
     >>> def foo():
     ...     print 'Something'
     ...
diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst
--- a/Doc/library/xml.dom.minidom.rst
+++ b/Doc/library/xml.dom.minidom.rst
@@ -55,7 +55,7 @@
 .. function:: parseString(string, parser=None)
 
    Return a :class:`Document` that represents the *string*. This method creates a
-   :class:`StringIO` object for the string and passes that on to :func:`parse`.
+   :class:`io.StringIO` object for the string and passes that on to :func:`parse`.
 
 Both functions return a :class:`Document` object representing the content of the
 document.

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


More information about the Python-checkins mailing list