Skip to content

fix-pyc-timestamps obsolete and actively harmful on Python 3.7+

Created as per suggestion from freedesktop-sdk/freedesktop-sdk!816 (merged)

Basically with Python 3.7 and higher, if SOURCE_DATE_EPOCH is set, Python uses invalidation method CHECKED_HASH for bytecode. Since there's no timestamp involved, there is nothing to fix. In addition, bytecode format changes with Python 3.7 so fix-pyc-timestamps will do incorrect thing resulting in always invalid bytecode. When using Python 3.7 or newer, the right solution is to just make sure SOURCE_DATE_EPOCH is set.

Note that on older versions of Python fix-pyc-timestamps is still useful.

Edited by Seppo Yli-Olli
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information