[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-08-05 Thread Berker Peksag
Changes by Berker Peksag : -- stage: patch review -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-08-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-08-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8af80d68bcdc by Barry Warsaw in branch 'default': - Issue #21539: Add a *exists_ok* argument to `Pathlib.mkdir()` to mimic http://hg.python.org/cpython/rev/8af80d68bcdc -- nosy: +python-dev ___ Python tra

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-08-05 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I like it. Thanks for the contribution! Assigning to myself since I plan on working to land this in 3.5. -- assignee: -> barry ___ Python tracker _

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-31 Thread Berker Peksag
Berker Peksag added the comment: Updated patch. Thank you Barry and Antoine. -- stage: -> patch review Added file: http://bugs.python.org/file35421/issue21539_v2.diff ___ Python tracker ___

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 27, 2014, at 08:48 PM, Antoine Pitrou wrote: >What do you mean by that? The os.makedirs() signature is >os.makedirs(name, mode=0o777, exist_ok=False) Right, but this is Path.mkdir's signature: Path.mkdir(mode=0o777, parents=False) so it's too late to

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 27/05/2014 20:32, Barry A. Warsaw a écrit : > > I've just been writing some new code to use pathlib and ran into > this one myself. An exist_ok=False is fine, although it's a slight shame that for backward compatibility we can't adopt os.makedirs() signature e

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-27 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I've just been writing some new code to use pathlib and ran into this one myself. An exist_ok=False is fine, although it's a slight shame that for backward compatibility we can't adopt os.makedirs() signature exactly. --

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-27 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-20 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file35303/issue21539.diff ___ Python tracker ___ __

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think we can a new `exist_ok` parameter indeed. It should probably be False by default, though. -- versions: +Python 3.5 ___ Python tracker _

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue21539] pathlib's Path.mkdir() should allow for "mkdir -p" functionality

2014-05-19 Thread Jim Garrison
New submission from Jim Garrison: As of Python 3.2, `os.makedirs()` takes `exist_ok` as a keyword argument. If set to true, the function does not raise an error if the directory already exists. This makes the function's behavior similar to `mkdir -p` on the UNIX commandline. (See https://do