Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
> How can this happen? Easily -- this looks like a "Time Of Check To Time Of Use" bug. You check for the existence of a directory, and then a fraction of a second later you attempt to use that directory. But on a multi-processing operating system like Windows, Mac or Linux, a lot can happen in that fraction of a second, including the directory being deleted by another process. https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use I'm not saying that this absolutely cannot be a bug in Python, but the initial indication is that this is simply a TOCTTOU bug in your code. Unfortunately, your code is unrunnable by us, as it if full of mysterious objects like "shouter.shout" which we have no access too. In addition, there's a problem that "handle_empty_directories" calls itself recursively as if it were a method of some "Commiter" object: Commiter.handle_empty_directories but it has no "self" parameter, so I don't know what is going on there. For us to investigate further, you need to replicate the error using much simple code that we can run ourselves. Please read http://www.sscce.org/ for some hints in producing short, self-contained, runnable code so that we can replicate this error. In the meantime, I'm going to change this to Pending. When you have replicated this with simpler code, please feel free to change the status back to Open. ---------- nosy: +steven.daprano status: open -> pending _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36243> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com