Uh oh!
There was an error while loading. Please reload this page.
bpo-34022: Unbreak importlib tests when SOURCE_DATE_EPOCH is set - #9484
bpo-34022: Unbreak importlib tests when SOURCE_DATE_EPOCH is set#9484elprans wants to merge 2 commits into
Conversation
SOURCE_DATE_EPOCH forces py_compile to use the CHECKED_HASH .pyc invalidation mode, and some tests fail when it is enabled. The solution is to unset SOURCE_DATE_EPOCH for tests that expect a different invalidation mode. This also makes all relevant tests run with SOURCE_DATE_EPOCH set explicitly.
mcepl
commented
Sep 22, 2018
Wouldn't it better to go in the other direction: to make tests where it matters check for the existence of the environmental variable and modify their expectations accordingly? |
elprans
commented
Sep 22, 2018
No. These are tests for specific invalidation behavior. Skipping or otherwise modifying the tests would lead to gaps in coverage. And SOURCE_DATE_EPOCH itself is tested elsewhere in test_py_compile. |
thehesiod
commented
Sep 26, 2018
with this patch I'm still getting the following errors when we build 3.7.0 reverting ccbe5818af2 does fix it. In particular for me I'm compiling 3.7.0 via |
elprans
commented
Sep 27, 2018
Yes, I think that ccbe581 is broken. I'll submit another PR with a proposed fix. |
elprans
commented
Sep 27, 2018
Closing in favor of #9607. |
SOURCE_DATE_EPOCH forces py_compile to use the CHECKED_HASH .pyc
invalidation mode, and some tests fail when it is enabled.
The solution is to unset SOURCE_DATE_EPOCH for tests that expect a
different invalidation mode. This also makes all relevant tests run
with SOURCE_DATE_EPOCH set explicitly.
https://bugs.python.org/issue34022