From 63f7dde2e01bf52727f02d14e3091d5e3deab450 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sat, 7 Jan 2023 09:38:22 +0100 Subject: [PATCH] Make tests pass after 2038 inspired by https://github.com/python/cpython/commit/0af681b652c43f0ba90988400ecc1e7934fbfc5d Background: As part of my work on reproducible builds for openSUSE, I check that software still gives identical build results in the future. The usual offset is +16 years, because that is how long I expect some software will be used in some places. This showed up failing tests in our package build. See https://reproducible-builds.org/ for why this matters. --- enaml/core/import_hooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enaml/core/import_hooks.py b/enaml/core/import_hooks.py index d2779fe75..fef481770 100644 --- a/enaml/core/import_hooks.py +++ b/enaml/core/import_hooks.py @@ -307,7 +307,7 @@ def _write_cache(self, code, ts, file_info): os.mkdir(file_info.cache_dir) with open(file_info.cache_path, 'w+b') as cache_file: cache_file.write(MAGIC_NUMBER) - cache_file.write(struct.pack('i', ts)) + cache_file.write(struct.pack('