summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-10-08 05:46:11 (GMT)
committerHynek Schlawack <hs@ox.cx>2012-10-08 05:46:11 (GMT)
commitc3c6fe5b1a8cd718cf1d96981427021f86f75fd3 (patch)
tree76c85ba6e0a80d5c56af4266f0ff6509309a86c2
parent4a7df9aba91605c8e689b735f119837d9b9c89b4 (diff)
parent101591e9d52d3057bfafc01811ef215c3bf1745d (diff)
downloadcpython-c3c6fe5b1a8cd718cf1d96981427021f86f75fd3.zip
cpython-c3c6fe5b1a8cd718cf1d96981427021f86f75fd3.tar.gz
cpython-c3c6fe5b1a8cd718cf1d96981427021f86f75fd3.tar.bz2
Merge 3.3
-rw-r--r--Doc/library/os.rst19
-rw-r--r--Misc/NEWS3
2 files changed, 14 insertions, 8 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 802868d..3b5b574 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1555,18 +1555,21 @@ features:
single: UNC paths; and os.makedirs()
Recursive directory creation function. Like :func:`mkdir`, but makes all
- intermediate-level directories needed to contain the leaf directory. If
- the target directory with the same mode as specified already exists,
- raises an :exc:`OSError` exception if *exist_ok* is False, otherwise no
- exception is raised. If the directory cannot be created in other cases,
- raises an :exc:`OSError` exception. The default *mode* is ``0o777`` (octal).
- On some systems, *mode* is ignored. Where it is used, the current umask
- value is first masked out.
+ intermediate-level directories needed to contain the leaf directory.
+
+ The default *mode* is ``0o777`` (octal). On some systems, *mode* is
+ ignored. Where it is used, the current umask value is first masked out.
+
+ If *exists_ok* is ``False`` (the default), an :exc:`OSError` is raised if
+ the target directory already exists. If *exists_ok* is ``True`` an
+ :exc:`OSError` is still raised if the umask-masked *mode* is different from
+ the existing mode, on systems where the mode is used. :exc:`OSError` will
+ also be raised if the directory creation fails.
.. note::
:func:`makedirs` will become confused if the path elements to create
- include :data:`pardir`.
+ include :data:`pardir` (eg. ".." on UNIX systems).
This function handles UNC paths correctly.
diff --git a/Misc/NEWS b/Misc/NEWS
index 422e674..b44f1ae 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -152,6 +152,9 @@ Build
Documentation
-------------
+- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument. Done with
+ great native-speaker help from R. David Murray.
+
- Issue #15533: Clarify docs and add tests for `subprocess.Popen()`'s cwd
argument.