[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > Note that the _file attribute may be TextIOWrapper after rollover() anyway > and the rollover() may be called implicitly. The code depending on the specific type of the _file is fragile at first. Okay, thanks for the detail. --

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Inada Naoki added the comment: > Do we need to explicitly document the return value change of _file which is > documented with a separate versionchanged directive for 3.7 and 3.8? I feel it is too detailed. Note that the _file attribute may be TextIOWrapper after rollover() anyway and the

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Do we need to explicitly document the return value change of _file which is documented with a separate versionchanged directive for 3.7 and 3.8? Code like below could fail in them since TextIOWrapper doesn't have getvalue attribute as the minor

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Inada-san. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset e65b3fa9f16537d20f5f37c25673ac899fcd7099 by Inada Naoki in branch '3.7': bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400) https://github.com/python/cpython/commit/e65b3fa9f16537d20f5f37c25673ac899fcd7099 --

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread miss-islington
miss-islington added the comment: New changeset d21b8e82dda3caf0989bb39bc0e0ce2bfef97081 by Miss Islington (bot) in branch '3.8': bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400) https://github.com/python/cpython/commit/d21b8e82dda3caf0989bb39bc0e0ce2bfef97081 --

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +16887 pull_request: https://github.com/python/cpython/pull/17407 ___ Python tracker ___

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread Inada Naoki
Inada Naoki added the comment: New changeset ea9835c5d154ab6a54eed627958473b6768b28cc by Inada Naoki in branch 'master': bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400) https://github.com/python/cpython/commit/ea9835c5d154ab6a54eed627958473b6768b28cc --

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +16885 pull_request: https://github.com/python/cpython/pull/17405 ___ Python tracker ___

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-26 Thread Inada Naoki
Change by Inada Naoki : -- pull_requests: +16880 pull_request: https://github.com/python/cpython/pull/17400 ___ Python tracker ___

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I cannot creĆ te a pr now. Please take this issue yourself Inada+san. -- assignee: serhiy.storchaka -> ___ Python tracker ___

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-26 Thread Inada Naoki
Inada Naoki added the comment: @Serhiy, would you create a pull request based on your patch? Or may I? @James it doesn't make sense at all. It breaks the file even when only ASCII characters are used. f = SpooledTemporaryFile(mode="w+") f.write("foobar") f.seek(3) f.rollover()