]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 4 Mar 2022 18:33:57 +0000 (10:33 -0800)
committerGitHub <noreply@github.com>
Fri, 4 Mar 2022 18:33:57 +0000 (10:33 -0800)
(cherry picked from commit cedd2473a9bebe07f3ced4f341cf58a2fef07b03)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
Doc/library/io.rst
Lib/_pyio.py
Modules/_io/iobase.c
Modules/_io/textio.c

index de88c572f3662e3f921019daa7f021387f556814..d5123348195bd972a54aa061e477d78f5c5eacd1 100644 (file)
@@ -306,8 +306,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
@@ -461,8 +460,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
@@ -515,7 +513,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
@@ -852,8 +850,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`:
index 56e9a0cb33c5fdaccfa9ac237fb5c3e590db6b1b..fb867fbc70f815dd723d0a4afa051eda51d97b01 100644 (file)
@@ -338,8 +338,7 @@ except AttributeError:
 
 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
@@ -1845,7 +1844,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):
index 5b687b78176e8c50dad580dc46282eec8eb1cdee..4c81befebd7a5795b3ae4a2d957e52eaadb02a32 100644 (file)
@@ -34,8 +34,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"
index eb05ae1a16eb03adbdb01c0e1bcd769621d10bc3..e28dbaa7b7e4597660a47fd00c9e77863edc12a2 100644 (file)
@@ -50,7 +50,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 *