gh-151596: Add missing argument 'size' to pure-Python implementation of TextIOBase.readline (GH-151679)

This commit is contained in:
saber-bit 2026-06-21 14:51:04 -04:00 committed by GitHub
parent c2661e6189
commit 30aeeb375b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -1928,7 +1928,7 @@ def truncate(self, pos=None):
"""Truncate size to pos, where pos is an int."""
self._unsupported("truncate")
def readline(self):
def readline(self, size=-1, /):
"""Read until newline or EOF.
Returns an empty string if EOF is hit immediately.

View file

@ -0,0 +1 @@
Add missing ``size`` positional argument to the pure-Python implementation of :meth:`io.TextIOBase.readline`.