]> granicus.if.org Git - python/commit
[3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)
authorAntoine Pitrou <pitrou@free.fr>
Sun, 28 Jan 2018 17:42:31 +0000 (18:42 +0100)
committerGitHub <noreply@github.com>
Sun, 28 Jan 2018 17:42:31 +0000 (18:42 +0100)
commit1d896ed2cddada4455f40782e4120249defbfa70
tree622344d12b5c4ebd59fccc346103c17a928e9e1e
parent33febfb03998598a35f97b4ef66d33a2d43716cd
[3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)

Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size..
(cherry picked from commit 059f58ce938d9c3f0286412a4efb1b9131339421)
Lib/test/test_io.py
Misc/NEWS.d/next/Library/2017-12-22-16-47-41.bpo-32228.waPx3q.rst [new file with mode: 0644]
Modules/_io/bufferedio.c