Patch #1448199: Release GIL around ConnectRegistry.
diff --git a/Lib/test/test_winreg.py b/Lib/test/test_winreg.py
index a9bc962..5830fd6 100644
--- a/Lib/test/test_winreg.py
+++ b/Lib/test/test_winreg.py
@@ -151,3 +151,6 @@
 else:
     print "Remote registry calls can be tested using",
     print "'test_winreg.py --remote \\\\machine_name'"
+    # perform minimal ConnectRegistry test which just invokes it
+    h = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
+    h.Close()
diff --git a/Misc/NEWS b/Misc/NEWS
index ba6d0f8..7a6e22d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -61,6 +61,8 @@
 Extension Modules
 -----------------
 
+- Patch #1448199: Release interpreter lock in _winreg.ConnectRegistry.
+
 - Patch #1521817: Index range checking on ctypes arrays containing
   exactly one element enabled again.  This allows iterating over these
   arrays, without the need to check the array size before.
diff --git a/PC/_winreg.c b/PC/_winreg.c
index 007885c..b39411a 100644
--- a/PC/_winreg.c
+++ b/PC/_winreg.c
@@ -960,7 +960,9 @@
 		return NULL;
 	if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
 		return NULL;
+	Py_BEGIN_ALLOW_THREADS
 	rc = RegConnectRegistry(szCompName, hKey, &retKey);
+	Py_END_ALLOW_THREADS
 	if (rc != ERROR_SUCCESS)
 		return PyErr_SetFromWindowsErrWithFunction(rc,
 							   "ConnectRegistry");