From 6029e086911be873b2ebacb933e3df08c23084e4 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Sat, 25 Jan 2014 15:32:46 -0700 Subject: Issue 19944: Fix importlib.find_spec() so it imports parents as needed. The function is also moved to importlib.util. --- Lib/idlelib/EditorWindow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Lib/idlelib/EditorWindow.py') diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 390ffab9b7..d18305783a 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -1,5 +1,6 @@ import importlib import importlib.abc +import importlib.util import os from platform import python_version import re @@ -660,7 +661,7 @@ class EditorWindow(object): return # XXX Ought to insert current file's directory in front of path try: - spec = importlib.find_spec(name) + spec = importlib.util.find_spec(name) except (ValueError, ImportError) as msg: tkMessageBox.showerror("Import error", str(msg), parent=self.text) return -- cgit v1.2.1