Skip to content

Commit 974fa2b

Browse files
blurb-it[bot]Lohitha0-0
authored andcommitted
📜🤖 Added by blurb_it.
1 parent bb0a1d1 commit 974fa2b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎Lib/test/test_zipfile/test_core.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4019,7 +4019,7 @@ def test_write_without_source_date_epoch(self):
40194019
with zipfile.ZipFile(TESTFN, "r") as zf:
40204020
zip_info = zf.getinfo("test_no_source_date_epoch.txt")
40214021
self.assertTimestampAlmostEqual(time.localtime(), zip_info.date_time, tolerance=2)
4022-
4022+
40234023
def test_writestr_strict_timestamps_false_with_pre1980_source_date_epoch(self):
40244024
# gh-152445: writestr() with strict_timestamps=False should clamp
40254025
# SOURCE_DATE_EPOCH before 1980 to 1980-01-01, not raise.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix :func:`zipfile.ZipFile.writestr` ignoring ``strict_timestamps=False`` when ``SOURCE_DATE_EPOCH`` is set to a date before 1980 or after 2107.

0 commit comments

Comments
 (0)