[issue27687] Linux shutil.move between mountpoints as root does not retain ownership

2016-08-04 Thread jort bloem
New submission from jort bloem: When using shutil.move() between mounts (i.e. when it does a copy/delete), running as root, ownership should be maintained. To test: log in as root, create a file owned by a regular user. In python, use shutil.move() to move it to another mountpoint. Check that

[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-09-04 Thread jort bloem
jort bloem added the comment: I am only new to Python, but... Having looked at the code, I am surprised that the _TemporaryFileWrapper is not a subclass of "file". Surely that would be the "python" way, and would solve this problem, too? __getattr__ would no longer be ne

[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-08-29 Thread jort bloem
jort bloem added the comment: Sorry, my python-foo is not quite up to providing a solution. A partial solution would be for the file not to be closed at NamedTemporaryFile destruction, if delete==False. If delete==True, then there is no point writing to a file (though it shouldn't rai

[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable

2013-08-29 Thread jort bloem
New submission from jort bloem: Issue occurs in the following code: tempfile.NamedTemporaryFile(dir=".",delete=False).write("hello") The NamedTemporaryFile is deleted before the write is complete; deleting the object closes the file, so the write fails. -- m

[issue17230] when forking without tty, code is run from start

2013-02-18 Thread jort bloem
jort bloem added the comment: I agree that it is reasonable NOT to flush stdout on fork(). I don't think the outcome is reasonable. What about voiding all buffers after the fork for the child? -- ___ Python tracker <http://bugs.py

[issue17230] when forking without tty, code is run from start

2013-02-18 Thread jort bloem
jort bloem added the comment: haypo: I understand that, after a fork, parent and child instructions are run in parallel; which one prints first is a matter of chance. However, commands BEFORE THE FORK should not be re-run. See test script. I would expect one "Start ", followed by

[issue17230] when forking without tty, code is run from start

2013-02-18 Thread jort bloem
jort bloem added the comment: Try attachment again. -- Added file: http://bugs.python.org/file29119/test.py ___ Python tracker <http://bugs.python.org/issue17

[issue17230] when forking without tty, code is run from start

2013-02-18 Thread jort bloem
New submission from jort bloem: When calling os.fork() without a tty, a process reporting the parent's pid runs code BEFORE the fork(). When running on a tty, it behaves as expected: both parent and child continue running from statement immediately after os.fork() See attached te