Lines Matching defs:import

1 /* Module definition and import implementation */
44 #include "clinic/import.c.h"
68 _PyErr_Clear(tstate); /* No zip import module -- okay */
70 PySys_WriteStderr("# can't import zipimport\n");
79 PySys_WriteStderr("# can't import zipimport.zipimporter\n");
157 We now acquire the import lock around fork() calls but on some platforms
169 /* Forked as a side effect of import */
185 Return True if the import lock is currently held, else False.
200 Acquires the interpreter's import lock for the current thread.
202 This lock should be used by import hooks to ensure thread-safety when importing
217 Release the interpreter's import lock.
228 "not holding the import lock");
273 /* In some corner cases it is important to be sure that the import
546 PySys_FormatStderr("import %U # previously loaded (%R)\n",
563 "no import module dictionary");
1463 * thread holds the import lock. In the latter case the function raises an
1667 "attempted relative import beyond top-level "
1685 "attempted relative import "
1707 if (_PySys_Audit(tstate, "import", "OOOOO",
1723 fputs("import time: self [us] | cumulative | imported package\n",
1747 fprintf(stderr, "import time: %9ld | %10ld | %*s%s\n",
1941 /* Re-import a module of any kind and return its module object, WITH
1966 /* Higher-level import emulator which emulates the "import" statement
1968 builtins of the current globals. This means that the import is
1969 done using whatever import hooks are installed in the current
1980 PyObject *import = NULL;
2011 import = PyObject_GetItem(builtins, &_Py_ID(__import__));
2012 if (import == NULL) {
2017 import = PyObject_GetAttr(builtins, &_Py_ID(__import__));
2018 if (import == NULL)
2022 Always use absolute import here.
2023 Calling for side-effect of import. */
2024 r = PyObject_CallFunction(import, "OOOOi", module_name, globals,
2038 Py_XDECREF(import);
2459 "(Extremely) low-level import machinery bits as used by importlib and imp.");