[Python-checkins] cpython (3.4): document the compress_level argument to tarfile.open (closes #21404)

benjamin.peterson python-checkins at python.org
Sat Jun 7 21:48:20 CEST 2014


http://hg.python.org/cpython/rev/0c712828fb6e
changeset:   91065:0c712828fb6e
branch:      3.4
parent:      91061:4ad33d82193d
user:        Benjamin Peterson <benjamin at python.org>
date:        Sat Jun 07 12:45:37 2014 -0700
summary:
  document the compress_level argument to tarfile.open (closes #21404)

Patch by Katherine Busch.

files:
  Doc/library/tarfile.rst |  4 ++++
  Misc/ACKS               |  1 +
  2 files changed, 5 insertions(+), 0 deletions(-)


diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -81,6 +81,10 @@
    If *fileobj* is specified, it is used as an alternative to a :term:`file object`
    opened in binary mode for *name*. It is supposed to be at position 0.
 
+   For modes ``'w:gz'``, ``'r:gz'``, ``'w:bz2'``, ``'r:bz2'``, :func:`tarfile.open`
+   accepts the keyword argument *compresslevel* to specify the compression level of
+   the file.
+
    For special purposes, there is a second format for *mode*:
    ``'filemode|[compression]'``.  :func:`tarfile.open` will return a :class:`TarFile`
    object that processes its data as a stream of blocks.  No random seeking will
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -195,6 +195,7 @@
 Alastair Burt
 Tarn Weisner Burton
 Lee Busby
+Katherine Busch
 Ralph Butler
 Nicolas Cadou
 Jp Calderone

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list