Bug report
Bug description:
IOBase:
|
def readline(self, size=-1): |
TextIOBase:
This pattern seems to be missing only for readline AFAICT.
for truncate (which is also "unsupported" for TextIOBase) it's preserved:
IOBase:
|
def truncate(self, pos=None): |
TextIOBase:
|
def truncate(self, pos=None): |
(the same for write and others).
My proposed fix should be adding a size argument to readline with a default value of -1
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Bug report
Bug description:
IOBase:cpython/Lib/_pyio.py
Line 513 in a064b32
TextIOBase:cpython/Lib/_pyio.py
Line 1931 in a064b32
This pattern seems to be missing only for
readlineAFAICT.for
truncate(which is also "unsupported" forTextIOBase) it's preserved:IOBase:cpython/Lib/_pyio.py
Line 370 in a064b32
TextIOBase:cpython/Lib/_pyio.py
Line 1927 in a064b32
(the same for
writeand others).My proposed fix should be adding a
sizeargument toreadlinewith a default value of-1CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux