summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/compileall.rst11
-rw-r--r--Doc/library/py_compile.rst13
2 files changed, 16 insertions, 8 deletions
diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst
index 22d1c6b..2d6c52b 100644
--- a/Doc/library/compileall.rst
+++ b/Doc/library/compileall.rst
@@ -85,13 +85,16 @@ compile Python sources.
.. cmdoption:: --invalidation-mode [timestamp|checked-hash|unchecked-hash]
- Control how the generated pycs will be invalidated at runtime. The default
- setting, ``timestamp``, means that ``.pyc`` files with the source timestamp
+ 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
- :ref:`pyc-invalidation` for more information on how Python validates bytecode
- cache files at runtime.
+ :ref:`pyc-invalidation` for more information on how Python validates
+ bytecode cache files at runtime.
+ The default is ``timestamp`` if the :envvar:`SOURCE_DATE_EPOCH` environment
+ variable is not set, and ``checked-hash`` if the ``SOURCE_DATE_EPOCH``
+ environment variable is set.
.. versionchanged:: 3.2
Added the ``-i``, ``-b`` and ``-h`` options.
diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst
index d720e01..8cb5a4d 100644
--- a/Doc/library/py_compile.rst
+++ b/Doc/library/py_compile.rst
@@ -54,10 +54,10 @@ byte-code cache files in the directory containing the source code.
level of the current interpreter.
*invalidation_mode* should be a member of the :class:`PycInvalidationMode`
- enum and controls how the generated ``.pyc`` files are invalidated at
- runtime. If the :envvar:`SOURCE_DATE_EPOCH` environment variable is set,
- *invalidation_mode* will be forced to
- :attr:`PycInvalidationMode.CHECKED_HASH`.
+ enum and controls how the generated bytecode cache is invalidated at
+ runtime. The default is :attr:`PycInvalidationMode.CHECKED_HASH` if
+ the :envvar:`SOURCE_DATE_EPOCH` environment variable is set, otherwise
+ the default is :attr:`PycInvalidationMode.TIMESTAMP`.
.. versionchanged:: 3.2
Changed default value of *cfile* to be :PEP:`3147`-compliant. Previous
@@ -77,6 +77,11 @@ byte-code cache files in the directory containing the source code.
*invalidation_mode* will be forced to
:attr:`PycInvalidationMode.CHECKED_HASH`.
+ .. versionchanged:: 3.7.2
+ The :envvar:`SOURCE_DATE_EPOCH` environment variable no longer
+ overrides the value of the *invalidation_mode* argument, and determines
+ its default value instead.
+
.. class:: PycInvalidationMode