From 67602a3a5b5de742a1c35e7f493fbdda6e337ce9 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 15 Sep 2017 15:22:41 -0700 Subject: [PATCH] the --check-hash-based-pycs option --- pep-0552.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pep-0552.rst b/pep-0552.rst index d203aa870..316c4ed16 100644 --- a/pep-0552.rst +++ b/pep-0552.rst @@ -120,6 +120,15 @@ taking values ``timestamp`` (the default), ``checked-hash``, and ``importlib`` will be extended with a ``source_hash(source)`` function that computes the hash used by the pyc writing code for a bytestring **source**. +Runtime configuration of hash-based pyc invalidation will be facilitated by a +new ``--check-hash-based-pycs`` interpreter option. This is a tristate option, +which may take 3 values: ``default``, ``always``, and ``never``. The default +value, ``default``, means the ``check_source`` flag in hash-based pycs +determines invalidation as described above. ``always`` causes the interpreter to +hash the source file for invalidation regardless of value of ``check_source`` +bit. ``never`` causes the interpreter to always assume hash-based pycs are +valid. Timestamp-based pycs are unaffected by this option. + References ==========