Bug report
Bug description:
IOBase:
Line 513 in a064b32
| def readline(self, size=-1): |
TextIOBase:
Line 1931 in a064b32
| def readline(self): |
This pattern seems to be missing only for readline AFAICT.
for truncate (which is also "unsupported" for TextIOBase) it's preserved:
IOBase:
Line 370 in a064b32
| def truncate(self, pos=None): |
TextIOBase:
Line 1927 in a064b32
| 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
Linked PRs
- gh-151596: Added missing argument 'size' with default value of -1 to TextIOBase.readline #151679
- gh-151596: Add size to _pyio.TextIOBase.readline #151680
- [3.15] gh-151596: Add missing argument 'size' to pure-Python implementation of
TextIOBase.readline(GH-151679) #151870 - [3.14] gh-151596: Add missing argument 'size' to pure-Python implementation of
TextIOBase.readline(GH-151679) #151871 - [3.13] gh-151596: Add missing argument 'size' to pure-Python implementation of
TextIOBase.readline(GH-151679) #151872