Skip to content

Commit 67c24cf

Browse files
Saber0324miss-islington
authored andcommitted
gh-151596: Add missing argument 'size' to pure-Python implementation of TextIOBase.readline (GH-151679)
(cherry picked from commit 30aeeb3) Co-authored-by: saber-bit <bryanventura0324@gmail.com>
1 parent bae0ba9 commit 67c24cf

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/_pyio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ def truncate(self, pos=None):
18561856
"""Truncate size to pos, where pos is an int."""
18571857
self._unsupported("truncate")
18581858

1859-
def readline(self):
1859+
def readline(self, size=-1, /):
18601860
"""Read until newline or EOF.
18611861
18621862
Returns an empty string if EOF is hit immediately.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add missing ``size`` positional argument to the pure-Python implementation of :meth:`io.TextIOBase.readline`.

0 commit comments

Comments
 (0)