]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (#139396)
authorWulian233 <1055917385@qq.com>
Fri, 20 Mar 2026 16:14:25 +0000 (00:14 +0800)
committerGitHub <noreply@github.com>
Fri, 20 Mar 2026 16:14:25 +0000 (16:14 +0000)
Co-authored-by: Victor Stinner <vstinner@python.org>
Doc/library/zipfile.rst

index 2d9231707d9f2ddf1797a6f6650dabdd7fcebc24..9999ac26999910b607ed750aaf313073c62d5823 100644 (file)
@@ -533,6 +533,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,