explain why hash is not the default

This commit is contained in:
Benjamin Peterson 2017-09-07 15:36:48 -07:00
parent 8492ed6abf
commit e4bcab24d7
1 changed files with 7 additions and 1 deletions

View File

@ -46,7 +46,13 @@ Distributors of Python code are currently stuck with the options of
4. doing a complicated mixture of 1. and 2. like generating pycs at installation
time
None of these options are very attractive. This PEP proposes a better solution.
None of these options are very attractive. This PEP proposes allowing the
timestamp to be replaced with a deterministic hash. The current timestamp
invalidation method will remain the default, though. Despite its nondeterminism,
timestamp invalidation works well for many workflows and usecases. The
hash-based pyc format can impose the cost of reading and hashing every source
file, which is more expensive than simply checking timestamps. Thus, for now, we
expect it to be used mainly by distributors and power use cases.
(Note there are other problems [#frozensets]_ [#interning]_ we do not
address here that can make pycs non-deterministic.)