summaryrefslogtreecommitdiffstats
path: root/Doc/library/zipapp.rst
diff options
context:
space:
mode:
authorPaul Moore <p.f.moore@gmail.com>2015-03-22 15:32:36 (GMT)
committerPaul Moore <p.f.moore@gmail.com>2015-03-22 15:32:36 (GMT)
commita4d4dd3a9dff1aaf24a3d9df301fef614625eee9 (patch)
treea06e7af01a5bf7ed2e6a1d5f5094e48804c2aac6 /Doc/library/zipapp.rst
parent67057ab57cd7e4872d9483cf259f7c26c992adcc (diff)
downloadcpython-a4d4dd3a9dff1aaf24a3d9df301fef614625eee9.zip
cpython-a4d4dd3a9dff1aaf24a3d9df301fef614625eee9.tar.gz
cpython-a4d4dd3a9dff1aaf24a3d9df301fef614625eee9.tar.bz2
#23657 Don't explicitly do an isinstance check for str in zipapp
As a result, explicitly support pathlib.Path objects as arguments. Also added tests for the CLI interface.
Diffstat (limited to 'Doc/library/zipapp.rst')
-rw-r--r--Doc/library/zipapp.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/zipapp.rst b/Doc/library/zipapp.rst
index 00250b0..b4484c8 100644
--- a/Doc/library/zipapp.rst
+++ b/Doc/library/zipapp.rst
@@ -104,12 +104,13 @@ The module defines two convenience functions:
Create an application archive from *source*. The source can be any
of the following:
- * The name of a directory, in which case a new application archive
- will be created from the content of that directory.
- * The name of an existing application archive file, in which case the file is
- copied to the target (modifying it to reflect the value given for the
- *interpreter* argument). The file name should include the ``.pyz``
- extension, if required.
+ * The name of a directory, or a :class:`pathlib.Path` object referring
+ to a directory, in which case a new application archive will be
+ created from the content of that directory.
+ * The name of an existing application archive file, or a :class:`pathlib.Path`
+ object referring to such a file, in which case the file is copied to
+ the target (modifying it to reflect the value given for the *interpreter*
+ argument). The file name should include the ``.pyz`` extension, if required.
* A file object open for reading in bytes mode. The content of the
file should be an application archive, and the file object is
assumed to be positioned at the start of the archive.
@@ -117,8 +118,8 @@ The module defines two convenience functions:
The *target* argument determines where the resulting archive will be
written:
- * If it is the name of a file, the archive will be written to that
- file.
+ * If it is the name of a file, or a :class:`pathlb.Path` object,
+ the archive will be written to that file.
* If it is an open file object, the archive will be written to that
file object, which must be open for writing in bytes mode.
* If the target is omitted (or None), the source must be a directory