diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2017-02-02 19:17:51 +0000 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2017-02-02 19:17:51 +0000 |
commit | b8cf82474245d48753ae34b76a272d5120895add (patch) | |
tree | 8bec37e99a342ac40fc8a0619897feaad7615061 /Doc/library/tarfile.rst | |
parent | 474ecf16ed434144efc0e1de383efda76f011e3f (diff) | |
parent | 14593e19e199dd34f268b35987ddb288bf022039 (diff) | |
download | cpython-b8cf82474245d48753ae34b76a272d5120895add.tar.gz |
Closes #24875: Merged fix from 3.6.
Diffstat (limited to 'Doc/library/tarfile.rst')
-rw-r--r-- | Doc/library/tarfile.rst | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst index d8f809753d..2167f32f6a 100644 --- a/Doc/library/tarfile.rst +++ b/Doc/library/tarfile.rst @@ -429,16 +429,13 @@ be finalized; only the internally used file object will be closed. See the Return an :class:`io.BufferedReader` object. -.. method:: TarFile.add(name, arcname=None, recursive=True, exclude=None, *, filter=None) +.. method:: TarFile.add(name, arcname=None, recursive=True, *, filter=None) Add the file *name* to the archive. *name* may be any type of file (directory, fifo, symbolic link, etc.). If given, *arcname* specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by setting *recursive* to - :const:`False`. If *exclude* is given, it must be a function that takes one - filename argument and returns a boolean value. Depending on this value the - respective file is either excluded (:const:`True`) or added - (:const:`False`). If *filter* is specified it must be a keyword argument. It + :const:`False`. If *filter* is given, it should be a function that takes a :class:`TarInfo` object argument and returns the changed :class:`TarInfo` object. If it instead returns :const:`None` the :class:`TarInfo` object will be excluded from the @@ -447,10 +444,6 @@ be finalized; only the internally used file object will be closed. See the .. versionchanged:: 3.2 Added the *filter* parameter. - .. deprecated:: 3.2 - The *exclude* parameter is deprecated, please use the *filter* parameter - instead. - .. method:: TarFile.addfile(tarinfo, fileobj=None) |