[Python-checkins] cpython (merge 3.2 -> 3.3): Merge 3.2
hynek.schlawack
python-checkins at python.org
Mon Oct 8 07:48:41 CEST 2012
http://hg.python.org/cpython/rev/ef183e71268a
changeset: 79592:ef183e71268a
branch: 3.3
parent: 79588:365da47a6dc1
parent: 79591:88a7b9c3b6c0
user: Hynek Schlawack <hs at ox.cx>
date: Mon Oct 08 07:44:54 2012 +0200
summary:
Merge 3.2
files:
Doc/library/os.rst | 19 +++++++++++--------
Misc/NEWS | 3 +++
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1555,18 +1555,21 @@
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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -4206,6 +4206,9 @@
Documentation
-------------
+- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument. Done with
+ great native-speaker help from R. David Murray.
+
- Issues #13491 and #13995: Fix many errors in sqlite3 documentation.
Initial patch for #13491 by Johannes Vogel.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list