GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — gh-134261: ZipFile - Don't rely on local time for reproducible builds & tests by ctrlaltf2 · Pull Request #134264 · python/cpython Conversation
|
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I added this feature 8 months ago. There was a reason for using localtime. See #124435 (review) and 54a7116 Maybe we can ask @jaraco |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@jaraco would you have time to look at this one? Would appreciate your expertise on whether changing to UTC time would be acceptable only for cases where |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here is the conversation where we discussed localtime vs. gmtime.
My concern at the time was that the code was changing localtime(time.time()) to gmtime(time.time()) even for the case where SOURCE_DATE_EPOCH was unset. And at the time, there was no explanation for why that change should be made and it seemed unrelated to the proposed change.
I'm pleased to see that this PR addresses my concern by keeping the behavior unchanged for unset SOURCE_DATE_EPOCH.
Unfortunately, even the tests are merely reflecting the implementation, so aren't capturing an external expectation. We can improve that situation in this PR, at least for the SOURCE_DATE_EPOCH case.
I do think we should apply this proposed change as a bugfix to all relevant Pythons. It seems to me this value was never correct. It will mean some instability, but I'm struggling to think of any other option. Better to have consistent behavior across all patched Pythons than have reproducibility dependent on minor Python version.
It's conceivable that gmtime should also be used unconditionally, but that's a broader problem with greater backward compatibility concerns and would demand larger scrutiny.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Documentation build overview
481 files changed ·
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Emma Smith <[email protected]>
|
CI runners are flaky. I've had to retry the jobs twice, both for unrelated reasons. I expect them to pass soon. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sadly the second retry failed in the same Ubuntu job. Sadly, it's a spurious error unrelated to this change. Here's Copilot's analysis: This job did not fail because of a code or test regression in the PR. It was terminated by the runner infrastructure: Relevant evidence: Solution: If you want a code-level mitigation for repeat occurrences, the best change is in the workflow, not CPython itself. For example, replace the broad ASAN command with a more targeted test invocation in .github/workflows/build.yml:
or, if ASAN-specific coverage is still desired but runtime needs to be reduced, run a curated subset instead of make ci. Bottom line: the correct solution for this job is to rerun it; there is no evidence of a bug in the referenced code from this log. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @ctrlaltf2 for the PR, and @jaraco for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-150137 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-150138 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I thought maybe there was a timeout, but that doesn't seem likely, as the second attempt ended after ~15 minutes and the third after ~9 minutes. The fourth attempt (second retry/third attempt of ubuntu freethreading) succeeded. So whatever it is is spurious. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… builds & tests (GH-134264) (#150138) gh-134261: ZipFile - Don't rely on local time for reproducible builds & tests (GH-134264) --------- (cherry picked from commit 9dcf94e) Co-authored-by: Caleb <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Emma Smith <[email protected]> Co-authored-by: Jason R. Coombs <[email protected]>
… builds & tests (GH-134264) (#150137) gh-134261: ZipFile - Don't rely on local time for reproducible builds & tests (GH-134264) --------- (cherry picked from commit 9dcf94e) Co-authored-by: Caleb <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Emma Smith <[email protected]> Co-authored-by: Jason R. Coombs <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.