--- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -139,3 +139,4 @@ source_stats = loader.path_stats(file) + source_mtime = 1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'] bytecode = importlib._bootstrap_external._code_to_bytecode( - code, source_stats['mtime'], source_stats['size']) + code, source_mtime, source_stats['size']) --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -485,5 +485,5 @@ if source_stats is not None: try: - source_mtime = int(source_stats['mtime']) + source_mtime = 1 except KeyError: pass