mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)
This commit is contained in:
parent
bda9c3eae3
commit
23db935bcf
4 changed files with 19 additions and 0 deletions
|
@ -2149,6 +2149,7 @@ class TextIOWrapper(TextIOBase):
|
|||
self.buffer.write(b)
|
||||
if self._line_buffering and (haslf or "\r" in s):
|
||||
self.flush()
|
||||
self._set_decoded_chars('')
|
||||
self._snapshot = None
|
||||
if self._decoder:
|
||||
self._decoder.reset()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue