[Python-checkins] bpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389)

Gregory P. Smith webhook-mailer at python.org
Sat Sep 28 11:04:48 EDT 2019


https://github.com/python/cpython/commit/c5a7e0ce194c0eafe82eb3e431881012398e7d46
commit: c5a7e0ce194c0eafe82eb3e431881012398e7d46
branch: master
author: Pascal Chambon <pythoniks at gmail.com>
committer: Gregory P. Smith <greg at krypto.org>
date: 2019-09-28T08:04:44-07:00
summary:

bpo-37408: Precise that Tarfile "format" argument only concerns writing. (GH-14389)

files:
M Doc/library/tarfile.rst

diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index f25af8ca6a33..c34f2c4a5702 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -290,9 +290,10 @@ be finalized; only the internally used file object will be closed. See the
 
       *fileobj* is not closed, when :class:`TarFile` is closed.
 
-   *format* controls the archive format. It must be one of the constants
+   *format* controls the archive format for writing. It must be one of the constants
    :const:`USTAR_FORMAT`, :const:`GNU_FORMAT` or :const:`PAX_FORMAT` that are
-   defined at module level.
+   defined at module level. When reading, format will be automatically detected, even
+   if different formats are present in a single archive.
 
    The *tarinfo* argument can be used to replace the default :class:`TarInfo` class
    with a different one.



More information about the Python-checkins mailing list