--invalidation-mode
[timestamp|checked-hash|unchecked-hash]
--invalidation-mode
[timestamp|checked-hash|unchecked-hash]
Control how the generated byte-code files are invalidated at runtime. The timestamp
value, means that .pyc
files with the source timestamp and size embedded will be generated. The checked-hash
and unchecked-hash
values cause hash-based pycs to be generated. Hash-based pycs embed a hash of the source file contents rather than a timestamp. See Cached bytecode invalidation for more information on how Python validates bytecode cache files at runtime. The default is timestamp
if the SOURCE_DATE_EPOCH
environment variable is not set, and checked-hash
if the SOURCE_DATE_EPOCH
environment variable is set.
Related Reading