Modified PyImport_Import and PyImport_ImportModule to always use absolute imports by calling __import__ with an explicit level of 0
Added a new API function PyImport_ImportModuleNoBlock. It solves the problem with dead locks when mixing threads and imports
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 0edf523..522cc89 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -1236,7 +1236,7 @@
* the import and triggers an assertion.
*/
if (tmod == NULL) {
- tmod = PyImport_ImportModule("time");
+ tmod = PyImport_ImportModuleNoBlock("time");
if (tmod == NULL)
PyErr_Clear();
}