Skip to content

Commit 8b447fb

Browse files
miss-islingtonWulian233vstinner
authored
[3.14] gh-91279: Note SOURCE_DATE_EPOCH support in ZipFile.writestr() doc (GH-139396) (#146222)
gh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (GH-139396) (cherry picked from commit 5ad738f) Co-authored-by: Wulian233 <1055917385@qq.com> Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 2105187 commit 8b447fb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/zipfile.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,11 @@ ZipFile objects
536536
a closed ZipFile will raise a :exc:`ValueError`. Previously,
537537
a :exc:`RuntimeError` was raised.
538538

539+
.. versionchanged:: 3.14
540+
Now respects the :envvar:`SOURCE_DATE_EPOCH` environment variable.
541+
If set, it uses this value as the modification timestamp for the file
542+
written into the ZIP archive, instead of using the current time.
543+
539544
.. method:: ZipFile.mkdir(zinfo_or_directory, mode=511)
540545

541546
Create a directory inside the archive. If *zinfo_or_directory* is a string,

0 commit comments

Comments
 (0)