Skip to content

Commit 69960dc

Browse files
committed
pythongh-141314: Fix TextIOWrapper.tell() assertion failure with standalone carriage return
Add test case and fix assertion failure in TextIOWrapper.tell() when reading files that end with a standalone carriage return (\r). The optimization algorithm incorrectly assumed buffered data would always be available, causing an assertion failure when next_input is empty.
1 parent fe6dd19 commit 69960dc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix assertion failure in :meth:`io.TextIOWrapper.tell` when reading files with standalone carriage return (``\r``) line endings.

0 commit comments

Comments
 (0)