mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
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
This commit is contained in:
parent
0a83d79268
commit
000a074c95
19 changed files with 135 additions and 63 deletions
|
|
@ -2255,7 +2255,7 @@ static int
|
|||
update_lines_cols(void)
|
||||
{
|
||||
PyObject *o;
|
||||
PyObject *m = PyImport_ImportModule("curses");
|
||||
PyObject *m = PyImport_ImportModuleNoBlock("curses");
|
||||
|
||||
if (!m)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue