From 1a113165e87223c8da96f0b12c7c7b9a09ee3d48 Mon Sep 17 00:00:00 2001 From: Cody Maloney Date: Thu, 18 Jun 2026 15:23:51 -0700 Subject: [PATCH] gh-151596: Add size to _pyio.TextIOBase.readline --- Lib/_pyio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 993f94bc055b2e2..d352f0f9e0f0a6b 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -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.