gh-101100: Fix sphinx warnings in `zipapp` and `zipfile` modules (GH-102526)

(cherry picked from commit 1f557f94c2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2023-03-08 00:30:44 -08:00 committed by GitHub
parent 7905ae7b1a
commit ffb41eaaf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -215,7 +215,7 @@ using the :func:`create_archive` function::
>>> import zipapp >>> import zipapp
>>> zipapp.create_archive('old_archive.pyz', 'new_archive.pyz', '/usr/bin/python3') >>> zipapp.create_archive('old_archive.pyz', 'new_archive.pyz', '/usr/bin/python3')
To update the file in place, do the replacement in memory using a :class:`BytesIO` To update the file in place, do the replacement in memory using a :class:`~io.BytesIO`
object, and then overwrite the source afterwards. Note that there is a risk object, and then overwrite the source afterwards. Note that there is a risk
when overwriting a file in place that an error will result in the loss of when overwriting a file in place that an error will result in the loss of
the original file. This code does not protect against such errors, but the original file. This code does not protect against such errors, but

View File

@ -288,7 +288,7 @@ ZipFile Objects
(``ZipExtFile``) is read-only and provides the following methods: (``ZipExtFile``) is read-only and provides the following methods:
:meth:`~io.BufferedIOBase.read`, :meth:`~io.IOBase.readline`, :meth:`~io.BufferedIOBase.read`, :meth:`~io.IOBase.readline`,
:meth:`~io.IOBase.readlines`, :meth:`~io.IOBase.seek`, :meth:`~io.IOBase.readlines`, :meth:`~io.IOBase.seek`,
:meth:`~io.IOBase.tell`, :meth:`__iter__`, :meth:`~iterator.__next__`. :meth:`~io.IOBase.tell`, :meth:`~container.__iter__`, :meth:`~iterator.__next__`.
These objects can operate independently of the ZipFile. These objects can operate independently of the ZipFile.
With ``mode='w'``, a writable file handle is returned, which supports the With ``mode='w'``, a writable file handle is returned, which supports the