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

(cherry picked from commit c5a7e0ce19)

Co-authored-by: Pascal Chambon <pythoniks@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-09-30 00:06:28 -07:00 • committed by Łukasz Langa
parent 2f87a7dc5a
commit 1aeb720d64

View file

@ -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.