]> granicus.if.org Git - python/commitdiff
Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 19 May 2015 21:14:00 +0000 (00:14 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 19 May 2015 21:14:00 +0000 (00:14 +0300)
when a directory with the chosen name already exists on Windows as well as
on Unix.  tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.

1  2 
Lib/tempfile.py
Lib/test/test_tempfile.py
Misc/NEWS

diff --cc Lib/tempfile.py
Simple merge
Simple merge
diff --cc Misc/NEWS
index 63e4329cbaf323abeab949fe3b1ac6c9e5dbaddf,94ea12bff2bc8b0a45bc43aac385ed8696e5aaee..71b35c3eeb5a8d20e7d068d98792437396a43867
+++ b/Misc/NEWS
@@@ -52,8 -53,11 +52,13 @@@ Core and Builtin
  Library
  -------
  
+ - Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
+   when a directory with the chosen name already exists on Windows as well as
+   on Unix.  tempfile.mkstemp() now fails early if parent directory is not
+   valid (not exists or is a file) on Windows.
 +- Issue #23780: Improved error message in os.path.join() with single argument.
 +
  - Issue #6598: Increased time precision and random number range in
    email.utils.make_msgid() to strengthen the uniqueness of the message ID.