aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-19 18:56:22 +0900
committerOphestra <cat@gensokyo.uk>2026-04-19 18:56:22 +0900
commit6b98156a3d5513d15a961052bcc347f35ab70c9e (patch)
tree5f8448562885d1bba7ccd82f955bbc4804c69572 /internal
parent753432cf09ac81fbfd9b5357ba6112f0d027c55d (diff)
internal/rosa/python: change insane strict_timestamps default
There is no scenario where this is useful, and it breaks builds. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/python.go28
1 files changed, 27 insertions, 1 deletions
diff --git a/internal/rosa/python.go b/internal/rosa/python.go
index 0da5f5f4..da50cd6a 100644
--- a/internal/rosa/python.go
+++ b/internal/rosa/python.go
@@ -23,6 +23,32 @@ func (t Toolchain) newPython() (pkg.Artifact, string) {
Writable: true,
Chmod: true,
+ Patches: []KV{
+ {"zipfile-no-default-strict_timestamps", `diff --git a/Lib/zipfile/__init__.py b/Lib/zipfile/__init__.py
+index 19aea290b58..51603ba9510 100644
+--- a/Lib/zipfile/__init__.py
++++ b/Lib/zipfile/__init__.py
+@@ -617,7 +617,7 @@ def _decodeExtra(self, filename_crc):
+ extra = extra[ln+4:]
+
+ @classmethod
+- def from_file(cls, filename, arcname=None, *, strict_timestamps=True):
++ def from_file(cls, filename, arcname=None, *, strict_timestamps=False):
+ """Construct an appropriate ZipInfo for a file on the filesystem.
+
+ filename should be the path to a file or directory on the filesystem.
+@@ -1412,7 +1412,7 @@ class ZipFile:
+ _windows_illegal_name_trans_table = None
+
+ def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=True,
+- compresslevel=None, *, strict_timestamps=True, metadata_encoding=None):
++ compresslevel=None, *, strict_timestamps=False, metadata_encoding=None):
+ """Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
+ or append 'a'."""
+ if mode not in ('r', 'w', 'x', 'a'):
+`},
+ },
+
Env: []string{
"EXTRATESTOPTS=-j0 -x " + strings.Join([]string{
// requires internet access (http://www.pythontest.net/)
@@ -36,7 +62,7 @@ func (t Toolchain) newPython() (pkg.Artifact, string) {
"test_os",
"test_subprocess",
- // somehow picks up mtime of source code
+ // patched out insane strict_timestamps default
"test_zipfile",
// requires gcc