mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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).
This commit is contained in:
parent
863c69cfeb
commit
02d8454002
11 changed files with 2440 additions and 2347 deletions
|
@ -34,6 +34,9 @@ class TestLoader:
|
|||
def _is_package(self, name):
|
||||
return self.package
|
||||
|
||||
def create_module(self, spec):
|
||||
return None
|
||||
|
||||
|
||||
class NewLoader(TestLoader):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue