Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11629)

#19921: Path.mkdir(0, True) always fails

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 9 months ago by storchaka+cpython
Modified:
5 years, 9 months ago
Reviewers:
pitrou
CC:
AntoinePitrou, r.david.murray, devnull_psf.upfronthosting.co.za, storchaka, vajrasky
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 3

Patch Set 3 #

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/pathlib.py View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
Lib/test/test_pathlib.py View 1 2 3 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 1
AntoinePitrou
5 years, 9 months ago #1
Thanks for the patch. Comments below.

http://bugs.python.org/review/19921/diff/10237/Lib/test/test_pathlib.py
File Lib/test/test_pathlib.py (right):

http://bugs.python.org/review/19921/diff/10237/Lib/test/test_pathlib.py#newco...
Lib/test/test_pathlib.py:1497: shutil.rmtree(join('newdirB'))
Rather than calling rmtree() here, better create a new path.

http://bugs.python.org/review/19921/diff/10237/Lib/test/test_pathlib.py#newco...
Lib/test/test_pathlib.py:1501: self.assertEqual(stat.S_IMODE(p.stat().st_mode),
0o444)
Under Windows, a directory will be either 0o555 or 0o777 (see
attributes_to_mode() in posixmodule.c).

Also, depending on the umask, you could have something else than 0o444.

http://bugs.python.org/review/19921/diff/10237/Lib/test/test_pathlib.py#newco...
Lib/test/test_pathlib.py:1502:
self.assertEqual(stat.S_IMODE(p.parent.stat().st_mode), 0o775)
Er... 0o775 is your personal umask, right?
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+