Issue 1652681: tarfile append behavior (original) (raw)

Created on 2007-02-05 20:15 by herrwitten, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tarfile.py.diff herrwitten,2007-02-05 23:33 Fixed Patch
Messages (4)
msg51840 - (view) Author: Witten (herrwitten) Date: 2007-02-05 20:15
The builtin file object has the following behavior for the appending ('a') mode: 'The file will be created if it doesn't exist when opened for writing or appending' Currently, the file must already exist and it must not be an empty file. This patch achieves the file object's behavior with a small one-line addition. If this patch be used, please add a reference to 'herrwitten' in the log.
msg51841 - (view) Author: Witten (herrwitten) Date: 2007-02-05 23:33
I fixed a bad patch with some personal information and bad path names by using 'svn diff' instead. File Added: tarfile.py.diff
msg51842 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2007-02-06 18:46
Thank you for the idea. As your patch only implemented appending to empty files, I added support for creating files if they don't exist. I added a testcase and adjusted the docs as well. Checked in the trunk as rev. 53648, so it will appear in 2.6.
msg51843 - (view) Author: Witten (herrwitten) Date: 2007-02-06 22:02
Thanks! I'll try to be as thorough next time.
History
Date User Action Args
2022-04-11 14:56:22 admin set github: 44547
2007-02-05 20:15:40 herrwitten create