cpython/Lib/test/test_importlib
Miss Islington (bot) 24b51b1a49
bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607)
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.
(cherry picked from commit a6b3ec5b6d)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
2018-11-28 09:45:36 -08:00
..
builtin bpo-32297: Few misspellings found in Python source code comments. (#4803) 2017-12-14 13:04:53 +02:00
data01 bpo-32248 - Implement importlib.resources (#4911) 2017-12-30 15:18:06 -05:00
data02 bpo-32248 - Implement importlib.resources (#4911) 2017-12-30 15:18:06 -05:00
data03 bpo-32248 - Implement importlib.resources (#4911) 2017-12-30 15:18:06 -05:00
extension bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145) (GH-7150) 2018-05-28 14:52:03 +02:00
frozen
import_ [3.7] bpo-33169: Remove values of `None` from sys.path_importer_cache when invalidating caches (GH-6402) (GH-6403) 2018-04-06 17:02:18 -07:00
namespace_pkgs
source bpo-34022: Stop forcing of hash-based invalidation with SOURCE_DATE_EPOCH (GH-9607) 2018-11-28 09:45:36 -08:00
zipdata01 bpo-32248 - Implement importlib.resources (#4911) 2017-12-30 15:18:06 -05:00
zipdata02 bpo-32248 - Implement importlib.resources (#4911) 2017-12-30 15:18:06 -05:00
__init__.py
__main__.py
abc.py
test_abc.py bpo-32248: Implement importlib.abc.ResourceReader (GH-4892) 2017-12-15 16:29:35 -08:00
test_api.py [3.7] bpo-33169: Remove values of `None` from sys.path_importer_cache when invalidating caches (GH-6402) (GH-6403) 2018-04-06 17:02:18 -07:00
test_lazy.py
test_locks.py bpo-31370: Remove support for threads-less builds (#3385) 2017-09-07 18:56:24 +02:00
test_namespace_pkgs.py bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5503) 2018-02-02 19:49:25 -05:00
test_open.py bpo-32248: Fix test_importlib.test_open() (#5213) 2018-01-17 15:21:50 +01:00
test_path.py bpo-32248 - Implement importlib.resources (#4911) 2017-12-30 15:18:06 -05:00
test_read.py bpo-33151: Handle submodule resources (GH-6268) (GH-6270) 2018-03-27 10:25:28 -07:00
test_resource.py bpo-33755: Fix importlib.resources isolation tests (GH-7412) (#7434) 2018-06-05 12:11:40 -07:00
test_spec.py
test_util.py Sync the importlib magic number in test_importlib for 3.7.0 2018-06-26 23:00:18 -04:00
test_windows.py
util.py bpo-33755: Fix importlib.resources isolation tests (GH-7412) (#7434) 2018-06-05 12:11:40 -07:00