summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-04-24 19:48:04 -0700
committerGitHub <noreply@github.com>2018-04-24 19:48:04 -0700
commit52a5a17338dfa7fed259027e1ecceba9c8491189 (patch)
tree6348136073f5fa18b3e51e281350388dca0ebb18 /Python
parent75a3e3d5bc0be1ce41289b661e7c53039cf3d5ba (diff)
downloadcpython-git-52a5a17338dfa7fed259027e1ecceba9c8491189.tar.gz
bpo-33128 Fix duplicated call to importlib._install_external_importers (GH-6273)
External importers were being added in both phases of the import system initialisation. They're only supposed to be added in the second phase, after the import machinery has been appropriately configured. (cherry picked from commit 0977091dca59709864b14cfc129388f1f0de7bf7) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/pylifecycle.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 5db586e15d..2ef96f8d99 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -325,11 +325,6 @@ initimport(PyInterpreterState *interp, PyObject *sysmod)
/* Install importlib as the implementation of import */
value = PyObject_CallMethod(importlib, "_install", "OO", sysmod, impmod);
- if (value != NULL) {
- Py_DECREF(value);
- value = PyObject_CallMethod(importlib,
- "_install_external_importers", "");
- }
if (value == NULL) {
PyErr_Print();
return _Py_INIT_ERR("importlib install failed");