Mercurial > cpython-lru_cache-weakref
diff Modules/parsermodule.c @ 44439:0cbe94bea2c7 legacy-trunk
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
| author | Christian Heimes <christian@cheimes.de> |
|---|---|
| date | Thu, 03 Jan 2008 22:16:32 +0000 |
| parents | 26384b8180c7 |
| children | 393822f2ef90 |
line wrap: on
line diff
--- a/Modules/parsermodule.c Thu Jan 03 21:14:48 2008 +0000 +++ b/Modules/parsermodule.c Thu Jan 03 22:16:32 2008 +0000 @@ -3269,7 +3269,7 @@ * If this fails, the import of this module will fail because an * exception will be raised here; should we clear the exception? */ - copyreg = PyImport_ImportModule("copy_reg"); + copyreg = PyImport_ImportModuleNoBlock("copy_reg"); if (copyreg != NULL) { PyObject *func, *pickler;
