diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2015-05-03 01:15:18 (GMT) |
---|---|---|
committer | Eric Snow <ericsnowcurrently@gmail.com> | 2015-05-03 01:15:18 (GMT) |
commit | 32439d6eb63f1ea31aed1e45459f0f50f965ef51 (patch) | |
tree | 8603d0565af4892f25b0361e46ffedcc35624f30 /Lib/py_compile.py | |
parent | 6b4c63dea5a1e470849a6925c1b29faea2b01636 (diff) | |
download | cpython-32439d6eb63f1ea31aed1e45459f0f50f965ef51.zip cpython-32439d6eb63f1ea31aed1e45459f0f50f965ef51.tar.gz cpython-32439d6eb63f1ea31aed1e45459f0f50f965ef51.tar.bz2 |
Issue #23911: Move path-based bootstrap code to a separate frozen module.
Diffstat (limited to 'Lib/py_compile.py')
-rw-r--r-- | Lib/py_compile.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/py_compile.py b/Lib/py_compile.py index 10c1ef5..11c5b50 100644 --- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -3,7 +3,7 @@ This module has intimate knowledge of the format of .pyc files. """ -import importlib._bootstrap +import importlib._bootstrap_external import importlib.machinery import importlib.util import os @@ -137,10 +137,10 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1): except FileExistsError: pass source_stats = loader.path_stats(file) - bytecode = importlib._bootstrap._code_to_bytecode( + bytecode = importlib._bootstrap_external._code_to_bytecode( code, source_stats['mtime'], source_stats['size']) - mode = importlib._bootstrap._calc_mode(file) - importlib._bootstrap._write_atomic(cfile, bytecode, mode) + mode = importlib._bootstrap_external._calc_mode(file) + importlib._bootstrap_external._write_atomic(cfile, bytecode, mode) return cfile |