summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/posixmodule.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 1d6f5c3..94db851 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -23,6 +23,8 @@ Core and Builtins
Library
-------
+- Issue #27533: Release GIL in nt._isdir
+
- Issue #17711: Fixed unpickling by the persistent ID with protocol 0.
Original patch by Alexandre Vassalotti.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 7f16a83..424daac 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3893,10 +3893,12 @@ os__isdir_impl(PyObject *module, path_t *path)
{
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;