repo/extra/python/patches/python3-pyc-hash.patch
Dylan Araps 2ef91243b5
python: slow startup fix for all pyc files
(unrelated: Also gets rid of static lib.)

NOTE: Rebuild python-* packages (meson, ...) to get the fix.
2021-08-10 17:01:13 +00:00

17 lines
496 B
Diff

diff --git a/Lib/py_compile.py b/Lib/py_compile.py
index a81f493..e1328ed 100644
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -70,10 +70,7 @@ class PycInvalidationMode(enum.Enum):
def _get_default_invalidation_mode():
- if os.environ.get('SOURCE_DATE_EPOCH'):
- return PycInvalidationMode.CHECKED_HASH
- else:
- return PycInvalidationMode.TIMESTAMP
+ return PycInvalidationMode.CHECKED_HASH
def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1,