diff options
author | Brett Cannon <brett@python.org> | 2016-02-20 18:35:41 -0800 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-02-20 18:35:41 -0800 |
commit | 319c0d1cb069b1163813e1992415370ac739756c (patch) | |
tree | 3d6bb3a199b5e8b56663ddee1bd1c11be743531e /Lib/test/test_importlib/test_lazy.py | |
parent | fafcc3768b75081dc33bc7fa684fcb654cd0d7df (diff) | |
download | cpython-319c0d1cb069b1163813e1992415370ac739756c.tar.gz |
Issue #26186: Remove an invalid type check in
importlib.util.LazyLoader.
The class was checking its argument as to whether its implementation
of create_module() came directly from importlib.abc.Loader. The
problem is that the classes coming from imoprtlib.machinery do not
directly inherit from the ABC as they come from _frozen_importlib.
Because the documentation has always said that create_module() was
ignored, the check has simply been removed.
Diffstat (limited to 'Lib/test/test_importlib/test_lazy.py')
-rw-r--r-- | Lib/test/test_importlib/test_lazy.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_lazy.py b/Lib/test/test_importlib/test_lazy.py index 2e191bbf5c..774b7a4564 100644 --- a/Lib/test/test_importlib/test_lazy.py +++ b/Lib/test/test_importlib/test_lazy.py @@ -54,6 +54,7 @@ class LazyLoaderTests(unittest.TestCase): def test_init(self): with self.assertRaises(TypeError): + # Classes that dono't define exec_module() trigger TypeError. util.LazyLoader(object) def new_module(self, source_code=None): |