https://github.com/python/cpython/commit/081187f169556fb1b2d6a9b96f7b7e509f6ad985
commit: 081187f169556fb1b2d6a9b96f7b7e509f6ad985
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-05-23T00:17:51+03:00
summary:

[3.15] gh-82907: Document mtime=0 for reproducible tarfile gzip output 
(GH-150269) (GH-150271)

(cherry picked from commit 9df2b6ccc719b0bc0167da65b72b57f9da39398b)

Co-authored-by: Omkar Kabde <[email protected]>

files:
M Doc/library/tarfile.rst

diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index 6f1e01cf5aa6ee..9b9783d8e58013 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -144,7 +144,9 @@ Some facts and figures:
 
    For modes ``'w:gz'`` and ``'w|gz'``, :func:`tarfile.open` accepts the
    keyword argument *mtime* to create a gzip archive header with that mtime. By
-   default, the mtime is set to the time of creation of the archive.
+   default, the mtime is set to the time of creation of the archive. Use
+   *mtime* ``0`` to generate a compressed stream that does not depend on
+   creation time, for reproducible output.
 
    For special purposes, there is a second format for *mode*:
    ``'filemode|[compression]'``.  :func:`tarfile.open` will return a 
:class:`TarFile`

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to