]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-151596: Add missing argument 'size' to pure-Python implementation of `TextIOBase...
authorsaber-bit <bryanventura0324@gmail.com>
Sun, 21 Jun 2026 18:51:04 +0000 (14:51 -0400)
committerGitHub <noreply@github.com>
Sun, 21 Jun 2026 18:51:04 +0000 (14:51 -0400)
Lib/_pyio.py
Misc/NEWS.d/next/Library/2026-06-18-23-59-46.gh-issue-151596.5ma144.rst [new file with mode: 0644]

index 993f94bc055b2e28d33244f1665931fff891b77e..4ba9b4070dff93ebaf9d0d92c58d606048442a65 100644 (file)
@@ -1928,7 +1928,7 @@ class TextIOBase(IOBase):
         """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.
diff --git a/Misc/NEWS.d/next/Library/2026-06-18-23-59-46.gh-issue-151596.5ma144.rst b/Misc/NEWS.d/next/Library/2026-06-18-23-59-46.gh-issue-151596.5ma144.rst
new file mode 100644 (file)
index 0000000..17ec134
--- /dev/null
@@ -0,0 +1 @@
+Add missing ``size`` positional argument to the pure-Python implementation of :meth:`io.TextIOBase.readline`.