diff options
author | Brett Cannon <brett@python.org> | 2015-01-09 16:39:21 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2015-01-09 16:39:21 (GMT) |
commit | 02d845400275076ef5ba2791c74b7670ac21f8a9 (patch) | |
tree | 36077086a1bd393ede07d99c61ed7137bd5bdcc3 /Lib/test/test_importlib/test_spec.py | |
parent | 863c69cfebcafbf97ba401e0f3cd5cb077e0e8f2 (diff) | |
download | cpython-02d845400275076ef5ba2791c74b7670ac21f8a9.zip cpython-02d845400275076ef5ba2791c74b7670ac21f8a9.tar.gz cpython-02d845400275076ef5ba2791c74b7670ac21f8a9.tar.bz2 |
Issue #23014: Make importlib.abc.Loader.create_module() required when
importlib.abc.Loader.exec_module() is also defined.
Before this change, create_module() was optional **and** could return
None to trigger default semantics. This change now reduces the
options for choosing default semantics to one and in the most
backporting-friendly way (define create_module() to return None).
Diffstat (limited to 'Lib/test/test_importlib/test_spec.py')
-rw-r--r-- | Lib/test/test_importlib/test_spec.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/test_spec.py b/Lib/test/test_importlib/test_spec.py index 418b4c0..8b333e8 100644 --- a/Lib/test/test_importlib/test_spec.py +++ b/Lib/test/test_importlib/test_spec.py @@ -34,6 +34,9 @@ class TestLoader: def _is_package(self, name): return self.package + def create_module(self, spec): + return None + class NewLoader(TestLoader): |