diff -r 49e1e8413ecc Modules/posixmodule.c --- a/Modules/posixmodule.c Sat Jul 16 10:46:10 2016 -0700 +++ b/Modules/posixmodule.c Sat Jul 16 13:08:43 2016 -0700 @@ -3893,10 +3893,12 @@ { DWORD attributes; + Py_BEGIN_ALLOW_THREADS if (!path->narrow) attributes = GetFileAttributesW(path->wide); else attributes = GetFileAttributesA(path->narrow); + Py_END_ALLOW_THREADS if (attributes == INVALID_FILE_ATTRIBUTES) Py_RETURN_FALSE;