mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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:
parent
fe907e1870
commit
a6cfb28bd2
5 changed files with 14 additions and 14 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue