[Python-checkins] bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)

miss-islington webhook-mailer at python.org
Fri Mar 4 13:34:19 EST 2022


https://github.com/python/cpython/commit/01df048831eb631dfee41175f08d09b9ad1a9538
commit: 01df048831eb631dfee41175f08d09b9ad1a9538
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-03-04T10:34:14-08:00
summary:

bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)

(cherry picked from commit cedd2473a9bebe07f3ced4f341cf58a2fef07b03)

Co-authored-by: slateny <46876382+slateny at users.noreply.github.com>

files:
M Doc/library/io.rst
M Lib/_pyio.py
M Modules/_io/iobase.c
M Modules/_io/textio.c

diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 0ff05cfc0e091..9f62dd21afbea 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -230,8 +230,7 @@ I/O Base Classes
 
 .. class:: IOBase
 
-   The abstract base class for all I/O classes, acting on streams of bytes.
-   There is no public constructor.
+   The abstract base class for all I/O classes.
 
    This class provides empty abstract implementations for many methods
    that derived classes can override selectively; the default
@@ -385,8 +384,7 @@ I/O Base Classes
 
 .. class:: RawIOBase
 
-   Base class for raw binary streams.  It inherits :class:`IOBase`.  There is no
-   public constructor.
+   Base class for raw binary streams.  It inherits :class:`IOBase`.
 
    Raw binary streams typically provide low-level access to an underlying OS
    device or API, and do not try to encapsulate it in high-level primitives
@@ -439,7 +437,7 @@ I/O Base Classes
 .. class:: BufferedIOBase
 
    Base class for binary streams that support some kind of buffering.
-   It inherits :class:`IOBase`. There is no public constructor.
+   It inherits :class:`IOBase`.
 
    The main difference with :class:`RawIOBase` is that methods :meth:`read`,
    :meth:`readinto` and :meth:`write` will try (respectively) to read as much
@@ -776,8 +774,7 @@ Text I/O
 .. class:: TextIOBase
 
    Base class for text streams.  This class provides a character and line based
-   interface to stream I/O.  It inherits :class:`IOBase`.  There is no public
-   constructor.
+   interface to stream I/O.  It inherits :class:`IOBase`.
 
    :class:`TextIOBase` provides or overrides these data attributes and
    methods in addition to those from :class:`IOBase`:
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 4804ed27cd14d..7a9a2779fcee7 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -314,8 +314,7 @@ class UnsupportedOperation(OSError, ValueError):
 
 class IOBase(metaclass=abc.ABCMeta):
 
-    """The abstract base class for all I/O classes, acting on streams of
-    bytes. There is no public constructor.
+    """The abstract base class for all I/O classes.
 
     This class provides dummy implementations for many methods that
     derived classes can override selectively; the default implementations
@@ -1821,7 +1820,7 @@ class TextIOBase(IOBase):
     """Base class for text I/O.
 
     This class provides a character and line based interface to stream
-    I/O. There is no public constructor.
+    I/O.
     """
 
     def read(self, size=-1):
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index a8e55c34799bd..0f150a3583d5e 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -33,8 +33,7 @@ typedef struct {
 } iobase;
 
 PyDoc_STRVAR(iobase_doc,
-    "The abstract base class for all I/O classes, acting on streams of\n"
-    "bytes. There is no public constructor.\n"
+    "The abstract base class for all I/O classes.\n"
     "\n"
     "This class provides dummy implementations for many methods that\n"
     "derived classes can override selectively; the default implementations\n"
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 966c532a0e3c3..f9903e2500006 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -49,7 +49,7 @@ PyDoc_STRVAR(textiobase_doc,
     "\n"
     "This class provides a character and line based interface to stream\n"
     "I/O. There is no readinto method because Python's character strings\n"
-    "are immutable. There is no public constructor.\n"
+    "are immutable.\n"
     );
 
 static PyObject *



More information about the Python-checkins mailing list