]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 20 Mar 2026 16:20:39 +0000 (17:20 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Mar 2026 16:20:39 +0000 (16:20 +0000)
gh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (GH-139396)
(cherry picked from commit 5ad738f8fb214e9852dc527e6754cbfb7abf6cc8)

Co-authored-by: Wulian233 <1055917385@qq.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Doc/library/zipfile.rst

index 082c4f8d3b40c3fd272ab19b7b42e1d5ad08885f..b1a2c820bea11faa03f66afaecff7ee76252cf8a 100644 (file)
@@ -536,6 +536,11 @@ ZipFile objects
       a closed ZipFile will raise a :exc:`ValueError`.  Previously,
       a :exc:`RuntimeError` was raised.
 
+   .. versionchanged:: 3.14
+      Now respects the :envvar:`SOURCE_DATE_EPOCH` environment variable.
+      If set, it uses this value as the modification timestamp for the file
+      written into the ZIP archive, instead of using the current time.
+
 .. method:: ZipFile.mkdir(zinfo_or_directory, mode=511)
 
    Create a directory inside the archive.  If *zinfo_or_directory* is a string,