[Python-checkins] cpython: [issue 19152] Ensure we have actually registered ExtensionFileLoader as an

eric.snow python-checkins at python.org
Sat Oct 5 04:40:05 CEST 2013


http://hg.python.org/cpython/rev/62d045a873bb
changeset:   85967:62d045a873bb
user:        Eric Snow <ericsnowcurrently at gmail.com>
date:        Fri Oct 04 20:28:52 2013 -0600
summary:
  [issue 19152] Ensure we have actually registered ExtensionFileLoader as an ExecutionLoader.

files:
  Lib/importlib/abc.py                |  4 ++--
  Lib/test/test_importlib/test_abc.py |  1 +
  2 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py
--- a/Lib/importlib/abc.py
+++ b/Lib/importlib/abc.py
@@ -188,7 +188,7 @@
     load_module = _bootstrap._LoaderBasics.load_module
 
 _register(InspectLoader, machinery.BuiltinImporter, machinery.FrozenImporter,
-            machinery.ExtensionFileLoader, _bootstrap.NamespaceLoader)
+          _bootstrap.NamespaceLoader)
 
 
 class ExecutionLoader(InspectLoader):
@@ -237,7 +237,7 @@
         super().init_module_attrs(module)
         _bootstrap._init_file_attrs(self, module)
 
-_register(machinery.ExtensionFileLoader)
+_register(ExecutionLoader, machinery.ExtensionFileLoader)
 
 
 class FileLoader(_bootstrap.FileLoader, ResourceLoader, ExecutionLoader):
diff --git a/Lib/test/test_importlib/test_abc.py b/Lib/test/test_importlib/test_abc.py
--- a/Lib/test/test_importlib/test_abc.py
+++ b/Lib/test/test_importlib/test_abc.py
@@ -100,6 +100,7 @@
 
 class ExecutionLoader(InheritanceTests):
     superclass_names = ['InspectLoader']
+    subclass_names = ['ExtensionFileLoader']
 
 tests = create_inheritance_tests(ExecutionLoader)
 Frozen_ExecutionLoaderInheritanceTests, Source_ExecutionLoaderInheritanceTests = tests

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list