summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2012-12-05 07:43:43 (GMT)
committerEric Snow <ericsnowcurrently@gmail.com>2012-12-05 07:43:43 (GMT)
commita6cfb28bd2611abefe08b11512e8378ddd2b8c57 (patch)
tree550c8cdf1d840a1d9dd4a14a711ee94d548a5f62 /Lib/importlib
parentfe907e18709e150c902afa08823b65ab4254614a (diff)
downloadcpython-a6cfb28bd2611abefe08b11512e8378ddd2b8c57.zip
cpython-a6cfb28bd2611abefe08b11512e8378ddd2b8c57.tar.gz
cpython-a6cfb28bd2611abefe08b11512e8378ddd2b8c57.tar.bz2
Issue #15627: This is simply an update to the name of a new method recently added
to importlib.abc.SourceLoader.
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 2e0bd6a..0c6252e 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -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):