Open
Description
This is annoying when one uses a shared file system, where all other files that are written (with default settings) will be readable by other users but files that are saved with Adaptive are not.
In Adaptive this happens because of atomicwrites
, code example:
from atomicwrites import AtomicWriter
with open("test_open", "w") as f:
f.write("hi")
with AtomicWriter("test_adaptive", "wb", overwrite=True).open() as f:
f.write(b"blob")
gives
$ ls -lah test*
-rw-------. 1 a-banijh a-banijh 4 Jun 2 08:33 test_adaptive
-rw-rw-r--. 1 a-banijh a-banijh 2 Jun 2 08:33 test_open
Maybe relevant:
- option to preserve the permissions untitaker/python-atomicwrites#42
- Keep original file mode when overwriting untitaker/python-atomicwrites#11
Tagging @georgwinkler @jbweston