-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-34022: Unbreak importlib tests when SOURCE_DATE_EPOCH is set #9484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
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? |
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. |
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 |
Yes, I think that ccbe581 is broken. I'll submit another PR with a proposed fix. |
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