Armin Rigo added the comment:

It's a mess to write a test, because the exact semantics of .mkdir() are not 
defined as far as I can tell.  This patch is a best-effort attempt at making 
.mkdir() work in the presence of common parallel filesystem changes, that is, 
other processes that would create the same directories at the same time.

This patch is by no means an attempt at being a complete solution for similar 
problems.  The exact semantics have probably never been discussed at all.  For 
example, what should occur if a parent directory is removed just after .mkdir() 
created it?

I'm not suggesting to discuss these issues now, but to simply leave them open.  
I'm trying instead to explain why writing a test is a mess (more than "just" 
creating another thread and creating/removing directories very fast while the 
main thread calls .mkdir()), because we have no exact notion of what should 
work and what shouldn't.

----------

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

Reply via email to