Issue #15627: This is simply an update to the name of a new method recently added

to importlib.abc.SourceLoader.
This commit is contained in:
Eric Snow 2012-12-04 23:43:43 -08:00
parent fe907e1870
commit a6cfb28bd2
5 changed files with 14 additions and 14 deletions

View file

@ -931,7 +931,7 @@ class SourceLoader(_LoaderBasics):
raise ImportError("Failed to decode source file",
name=fullname) from exc
def compile_source(self, data, path):
def source_to_code(self, data, path):
"""Return the code object compiled from source.
The 'data' argument can be any object type that compile() supports.
@ -984,7 +984,7 @@ class SourceLoader(_LoaderBasics):
raise ImportError(msg.format(bytecode_path),
name=fullname, path=bytecode_path)
source_bytes = self.get_data(source_path)
code_object = self.compile_source(source_bytes, source_path)
code_object = self.source_to_code(source_bytes, source_path)
_verbose_message('code object from {}', source_path)
if (not sys.dont_write_bytecode and bytecode_path is not None and
source_mtime is not None):