[issue19921] Path.mkdir(0, True) always fails

2013-12-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue19921] Path.mkdir(0, True) always fails

2013-12-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 87b81b7df7f0 by Antoine Pitrou in branch 'default': Issue #19921: When Path.mkdir() is called with parents=True, any missing parent is created with the default permissions, ignoring the mode argument (mimicking the POSIX "mkdir -p" command). http:/

[issue19921] Path.mkdir(0, True) always fails

2013-12-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that the description of the POSIX mkdir utility (*) has something a bit more complex to say about the `-p` option. Instead of simply applying the default umask, it computes """(S_IWUSR|S_IXUSR|~filemask)&0777 as the mode argument, where filemask is the fi

[issue19921] Path.mkdir(0, True) always fails

2013-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue19921] Path.mkdir(0, True) always fails

2013-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Vajrasky. Now this check is skipped on Windows. -- Added file: http://bugs.python.org/file33042/pathlib_mkdir_mode_4.patch ___ Python tracker __

[issue19921] Path.mkdir(0, True) always fails

2013-12-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: Fails on Windows Vista. ...s..s..s..s...F. .. == FAIL: test_mkdir_parents (__main__.PathTest) --

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: A new argument sounds overkill to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, please clarify the documentation. Perhaps we should add new argument parents_mode? -- ___ Python tracker ___ ___

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks good to me. Do you think the documentation should be clarified a bit? -- ___ Python tracker ___ ___

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Antoine's comments. -- Added file: http://bugs.python.org/file33031/pathlib_mkdir_mode_3.patch ___ Python tracker ___

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch emulates the mkdir utility. -- Added file: http://bugs.python.org/file33030/pathlib_mkdir_mode_2.patch ___ Python tracker ___ __

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread R. David Murray
R. David Murray added the comment: OK, emulating mkdir -p seems like the sensible thing to do. That's the least likely to be surprising. -- ___ Python tracker ___ _

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The mkdir utility creates parent directories with mode 0o777 & ~umask. $ mkdir -p -m 0 t1/t2/t3 $ ls -l -d t1 t1/t2 t1/t2/t3 drwxrwxr-x 3 serhiy serhiy 4096 Dec 7 22:30 t1/ drwxrwxr-x 3 serhiy serhiy 4096 Dec 7 22:30 t1/t2/ d- 2 serhiy serhiy 4096 De

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread R. David Murray
R. David Murray added the comment: Wouldn't it be better to throw an error rather than create a (parent) directory with possibly wrong permission bits? It seems like this would require an unusual use case in any event. -- nosy: +r.david.murray ___

[issue19921] Path.mkdir(0, True) always fails

2013-12-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Path.mkdir() can't create a directory with cleared write or list permission bits for owner when parent directories aren't created. This is because for parent directories same mode is used as for final directory. To support this use case we should implicitl