Skip to content

Commit 01df048

Browse files
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)
(cherry picked from commit cedd247) Co-authored-by: slateny <[email protected]>
1 parent 6a14330 commit 01df048

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

Doc/library/io.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ I/O Base Classes
230230

231231
.. class:: IOBase
232232

233-
The abstract base class for all I/O classes, acting on streams of bytes.
234-
There is no public constructor.
233+
The abstract base class for all I/O classes.
235234

236235
This class provides empty abstract implementations for many methods
237236
that derived classes can override selectively; the default
@@ -385,8 +384,7 @@ I/O Base Classes
385384

386385
.. class:: RawIOBase
387386

388-
Base class for raw binary streams. It inherits :class:`IOBase`. There is no
389-
public constructor.
387+
Base class for raw binary streams. It inherits :class:`IOBase`.
390388

391389
Raw binary streams typically provide low-level access to an underlying OS
392390
device or API, and do not try to encapsulate it in high-level primitives
@@ -439,7 +437,7 @@ I/O Base Classes
439437
.. class:: BufferedIOBase
440438

441439
Base class for binary streams that support some kind of buffering.
442-
It inherits :class:`IOBase`. There is no public constructor.
440+
It inherits :class:`IOBase`.
443441

444442
The main difference with :class:`RawIOBase` is that methods :meth:`read`,
445443
:meth:`readinto` and :meth:`write` will try (respectively) to read as much
@@ -776,8 +774,7 @@ Text I/O
776774
.. class:: TextIOBase
777775

778776
Base class for text streams. This class provides a character and line based
779-
interface to stream I/O. It inherits :class:`IOBase`. There is no public
780-
constructor.
777+
interface to stream I/O. It inherits :class:`IOBase`.
781778

782779
:class:`TextIOBase` provides or overrides these data attributes and
783780
methods in addition to those from :class:`IOBase`:

Lib/_pyio.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,7 @@ class UnsupportedOperation(OSError, ValueError):
314314

315315
class IOBase(metaclass=abc.ABCMeta):
316316

317-
"""The abstract base class for all I/O classes, acting on streams of
318-
bytes. There is no public constructor.
317+
"""The abstract base class for all I/O classes.
319318
320319
This class provides dummy implementations for many methods that
321320
derived classes can override selectively; the default implementations
@@ -1821,7 +1820,7 @@ class TextIOBase(IOBase):
18211820
"""Base class for text I/O.
18221821
18231822
This class provides a character and line based interface to stream
1824-
I/O. There is no public constructor.
1823+
I/O.
18251824
"""
18261825

18271826
def read(self, size=-1):

Modules/_io/iobase.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ typedef struct {
3333
} iobase;
3434

3535
PyDoc_STRVAR(iobase_doc,
36-
"The abstract base class for all I/O classes, acting on streams of\n"
37-
"bytes. There is no public constructor.\n"
36+
"The abstract base class for all I/O classes.\n"
3837
"\n"
3938
"This class provides dummy implementations for many methods that\n"
4039
"derived classes can override selectively; the default implementations\n"

Modules/_io/textio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ PyDoc_STRVAR(textiobase_doc,
4949
"\n"
5050
"This class provides a character and line based interface to stream\n"
5151
"I/O. There is no readinto method because Python's character strings\n"
52-
"are immutable. There is no public constructor.\n"
52+
"are immutable.\n"
5353
);
5454

5555
static PyObject *

0 commit comments

Comments
 (0)