summaryrefslogtreecommitdiffstats
path: root/Doc/library/shutil.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-31 09:39:29 (GMT)
committerGeorg Brandl <georg@python.org>2014-10-31 09:39:29 (GMT)
commite21a531ef10e120a94434b3d4806a8106dd6f271 (patch)
tree0b1d0245388effa5cbf130744b50af6ab6a1eb5f /Doc/library/shutil.rst
parentfe98180bced16be7d62b762cc85d400f929d0885 (diff)
parenta4c8c47961305487ef6c40a6d882bb956f2c5a0b (diff)
downloadcpython-e21a531ef10e120a94434b3d4806a8106dd6f271.zip
cpython-e21a531ef10e120a94434b3d4806a8106dd6f271.tar.gz
cpython-e21a531ef10e120a94434b3d4806a8106dd6f271.tar.bz2
merge with 3.4
Diffstat (limited to 'Doc/library/shutil.rst')
-rw-r--r--Doc/library/shutil.rst16
1 files changed, 13 insertions, 3 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index 4717134..6dade30 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -482,12 +482,17 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
*root_dir* and *base_dir* both default to the current directory.
+ If *dry_run* is true, no archive is created, but the operations that would be
+ executed are logged to *logger*.
+
*owner* and *group* are used when creating a tar archive. By default,
uses the current owner and group.
*logger* must be an object compatible with :pep:`282`, usually an instance of
:class:`logging.Logger`.
+ The *verbose* argument is currently unused.
+
.. versionchanged:: 3.5
Added support for the *xztar* format.
@@ -511,14 +516,19 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
.. function:: register_archive_format(name, function, [extra_args, [description]])
- Register an archiver for the format *name*. *function* is a callable that
- will be used to invoke the archiver.
+ Register an archiver for the format *name*.
+
+ *function* is the callable that will be used to unpack archives. The callable
+ will receive the *base_name* of the file to create, followed by the
+ *base_dir* (which defaults to :data:`os.curdir`) to start archiving from.
+ Further arguments are passed as keyword arguments: *owner*, *group*,
+ *dry_run* and *logger* (as passed in :func:`make_archive`).
If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be
used as extra keywords arguments when the archiver callable is used.
*description* is used by :func:`get_archive_formats` which returns the
- list of archivers. Defaults to an empty list.
+ list of archivers. Defaults to an empty string.
.. function:: unregister_archive_format(name)