From 2a17bde930af72995a217f6625d763e828bf5ce1 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 30 May 2014 14:55:29 -0400 Subject: Issue #20383: Introduce importlib.util.module_from_spec(). Along the way, dismantle importlib._bootstrap._SpecMethods as it was no longer relevant and constructing the new function required partially dismantling the class anyway. --- Lib/test/test_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_tools.py') diff --git a/Lib/test/test_tools.py b/Lib/test/test_tools.py index 1bf7d54c1e..2eb80664c9 100644 --- a/Lib/test/test_tools.py +++ b/Lib/test/test_tools.py @@ -407,7 +407,7 @@ class PdepsTests(unittest.TestCase): def setUpClass(self): path = os.path.join(scriptsdir, 'pdeps.py') spec = importlib.util.spec_from_file_location('pdeps', path) - self.pdeps = importlib._bootstrap._SpecMethods(spec).load() + self.pdeps = importlib._bootstrap._load(spec) @classmethod def tearDownClass(self): @@ -432,7 +432,7 @@ class Gprof2htmlTests(unittest.TestCase): def setUp(self): path = os.path.join(scriptsdir, 'gprof2html.py') spec = importlib.util.spec_from_file_location('gprof2html', path) - self.gprof = importlib._bootstrap._SpecMethods(spec).load() + self.gprof = importlib._bootstrap._load(spec) oldargv = sys.argv def fixup(): sys.argv = oldargv -- cgit v1.2.1