[3.13] gh-52876: Implement missing parameter in codecs.StreamReaderWriter functions (GH-136498) (#136515)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run

gh-52876: Implement missing parameter in `codecs.StreamReaderWriter` functions (GH-136498)

Closes GH-52876
(cherry picked from commit 35e2c35970)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-07-10 18:06:34 +02:00 committed by GitHub
parent 81d1986297
commit aa3c6421ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 5 deletions

View file

@ -618,7 +618,7 @@ class StreamReader(Codec):
method and are included in the list entries. method and are included in the list entries.
sizehint, if given, is ignored since there is no efficient sizehint, if given, is ignored since there is no efficient
way to finding the true end-of-line. way of finding the true end-of-line.
""" """
data = self.read() data = self.read()
@ -709,13 +709,13 @@ class StreamReaderWriter:
return self.reader.read(size) return self.reader.read(size)
def readline(self, size=None): def readline(self, size=None, keepends=True):
return self.reader.readline(size) return self.reader.readline(size, keepends)
def readlines(self, sizehint=None): def readlines(self, sizehint=None, keepends=True):
return self.reader.readlines(sizehint) return self.reader.readlines(sizehint, keepends)
def __next__(self): def __next__(self):

View file

@ -0,0 +1,3 @@
Add missing ``keepends`` (default ``True``) parameter to
:meth:`!codecs.StreamReaderWriter.readline` and
:meth:`!codecs.StreamReaderWriter.readlines`.