bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918)

This commit is contained in:
Zackery Spytz 2018-06-29 04:14:58 -06:00 committed by Serhiy Storchaka
parent bda9c3eae3
commit 23db935bcf
4 changed files with 19 additions and 0 deletions

View file

@ -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()