Message319275
I concur with Martin. If this feature never worked, there is a risk of breaking user code when fix it. Let consider this as adding a new feature in 3.8. For older versions it should be documented that the mode of the output file is not set.
And I agree that it would be more safe to use os.open(). Either call os.open() and pass the file descriptor to the builtin open() (but be careful to not leak it) or use the opener argument of open().
def opener(path, flags):
return os.open(path, flags, mode)
fp = open(out_file, 'wb', opener=opener)
It would be worth also to use the 'xb' opening mode instead of 'wb'. |
|
Date |
User |
Action |
Args |
2018-06-11 06:21:45 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, christian.heimes, r.david.murray, martin.panter, bsdphk, xiang.zhang, tuxtimo |
2018-06-11 06:21:44 | serhiy.storchaka | set | messageid: <1528698104.94.0.592728768989.issue33687@psf.upfronthosting.co.za> |
2018-06-11 06:21:44 | serhiy.storchaka | link | issue33687 messages |
2018-06-11 06:21:44 | serhiy.storchaka | create | |
|