Martin Panter added the comment:

Wow this is tricky to get right. Victor, you are right to not trust 
TemporaryDirectory, because when cleanup() fails you don’t get a second chance, 
and it will leave the directory behind.

According to the Microsoft _mkdir() web page 
<https://msdn.microsoft.com/en-us/library/wt8es881.aspx>, Windows would raise 
ENOTEMPTY for removing the current directory. Maybe it is time to drop the 
win32 skip check as well?

Here is a patch based on aix_2.patch, but also removing the redundant win32 
skip. And “import errno” was no longer needed. I only tested it on Linux 
though, which supports removing the cwd.

----------
Added file: http://bugs.python.org/file41005/test_deleted_cwd_aix_3.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25595>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to