• Elvis Pranskevichus's avatar
    bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607) · a6b3ec5b
    Elvis Pranskevichus yazdı
    Unconditional forcing of ``CHECKED_HASH`` invalidation was introduced in
    3.7.0 in bpo-29708.  The change is bad, as it unconditionally overrides
    *invalidation_mode*, even if it was passed as an explicit argument to
    ``py_compile.compile()`` or ``compileall``.  An environment variable
    should *never* override an explicit argument to a library function.
    That change leads to multiple test failures if the ``SOURCE_DATE_EPOCH``
    environment variable is set.
    
    This changes ``py_compile.compile()`` to only look at
    ``SOURCE_DATE_EPOCH`` if no explicit *invalidation_mode* was specified.
    I also made various relevant tests run with explicit control over the
    value of ``SOURCE_DATE_EPOCH``.
    
    While looking at this, I noticed that ``zipimport`` does not work
    with hash-based .pycs _at all_, though I left the fixes for
    subsequent commits.
    a6b3ec5b
Adı
Son kayıt (commit)
Son güncelleme
..
builtin Loading commit data...
data01 Loading commit data...
data02 Loading commit data...
data03 Loading commit data...
extension Loading commit data...
frozen Loading commit data...
import_ Loading commit data...
namespace_pkgs Loading commit data...
source Loading commit data...
zipdata01 Loading commit data...
zipdata02 Loading commit data...
__init__.py Loading commit data...
__main__.py Loading commit data...
abc.py Loading commit data...
test_abc.py Loading commit data...
test_api.py Loading commit data...
test_lazy.py Loading commit data...
test_locks.py Loading commit data...
test_namespace_pkgs.py Loading commit data...
test_open.py Loading commit data...
test_path.py Loading commit data...
test_read.py Loading commit data...
test_resource.py Loading commit data...
test_spec.py Loading commit data...
test_util.py Loading commit data...
test_windows.py Loading commit data...
util.py Loading commit data...