[Python-checkins] cpython (3.4): #22613: elaborate on arguments of shutil archival functions (thanks Jacques
georg.brandl
python-checkins at python.org
Fri Oct 31 10:39:44 CET 2014
https://hg.python.org/cpython/rev/7d40eff70601
changeset: 93308:7d40eff70601
branch: 3.4
user: Georg Brandl <georg at python.org>
date: Fri Oct 31 10:02:40 2014 +0100
summary:
#22613: elaborate on arguments of shutil archival functions (thanks Jacques Ducasse)
files:
Doc/library/shutil.rst | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -449,12 +449,17 @@
*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.
+
.. function:: get_archive_formats()
@@ -474,14 +479,19 @@
.. 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)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list