]> granicus.if.org Git - python/commitdiff
Issue #18743: Fix references to non-existant "StringIO" module.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 16 Aug 2013 21:09:55 +0000 (00:09 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 16 Aug 2013 21:09:55 +0000 (00:09 +0300)
Doc/c-api/typeobj.rst
Doc/library/gzip.rst
Doc/library/mailbox.rst
Doc/library/tempfile.rst
Doc/library/unittest.mock.rst
Doc/library/xml.dom.minidom.rst

index f8483c7d41dbd841a909902240c373878cad278e..118fa50cb7dceed94a69b149cbde7641b98b26b7 100644 (file)
@@ -192,7 +192,7 @@ type objects) *must* have the :attr:`ob_size` field.
    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
index 2cbd2d5f5ba7eccb0f855e16521481f11baf889f..8a7c928d67b720c1abfab75f782db03cb9761527 100644 (file)
@@ -62,7 +62,7 @@ The module defines the following items:
    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.
 
index 0f6aba17a54f5f43e2dcda661cc3e171bfa6e9e9..2d8ba71062f4041589cac41cba0b3aa40d770778 100644 (file)
@@ -674,8 +674,8 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
 
       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.
index 2ea6323c49e6bf24d9ca04b0305172d5ad112c17..13b6041d04ff436c9658a75fab9eabd389d78752 100644 (file)
@@ -82,7 +82,7 @@ The module defines the following user-callable items:
    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
index 0da6f49084beddba212f022fd8212da82aea957b..6f3f693f61dde8a93ff6ea79c733ba49403a686d 100644 (file)
@@ -1084,9 +1084,9 @@ you wanted a :class:`NonCallableMock` to be used:
       ...
     TypeError: 'NonCallableMock' object is not callable
 
-Another use case might be to replace an object with a `StringIO` instance:
+Another use case might be to replace an object with a `io.StringIO` instance:
 
-    >>> from StringIO import StringIO
+    >>> from io import StringIO
     >>> def foo():
     ...     print 'Something'
     ...
index e90c1779a293a56db770ed968e5955cc32999170..5d821f17d0b383029d1afc7266f1cc38bfe49ad8 100644 (file)
@@ -55,7 +55,7 @@ instead:
 .. 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.