Skip to content

Commit 83e7979

Browse files
author
Adi Roiban
committed
Update after review from Brian
1 parent d7baea1 commit 83e7979

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

Doc/library/zipfile.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,16 @@ ZipFile Objects
229229
:meth:`closed <close>` without adding any files to the archive, the appropriate
230230
ZIP structures for an empty archive will be written to the file.
231231

232+
The *zipinfo_class* and *zipextfile_class* arguments can be used to replace
233+
the default :class:`ZipInfo` and :class:`!ZipExtFile` classes with different ones.
234+
232235
ZipFile is also a context manager and therefore supports the
233236
:keyword:`with` statement. In the example, *myzip* is closed after the
234237
:keyword:`!with` statement's suite is finished---even if an exception occurs::
235238

236239
with ZipFile('spam.zip', 'w') as myzip:
237240
myzip.write('eggs.txt')
238241

239-
The *zipinfo_class* and *zipextfile_class* are designed to help extend the
240-
functionalities.
241-
For now, there is no stable public protocol or interface for these classes.
242-
When implementing custom classes you will need to follow the public and
243-
private API from :class:`ZipInfo` and ``ZipExtFile``.
244-
245242
.. note::
246243

247244
*metadata_encoding* is an instance-wide setting for the ZipFile.
@@ -285,8 +282,8 @@ ZipFile Objects
285282
Added support for specifying member name encoding for reading
286283
metadata in the zipfile's directory and file headers.
287284

288-
.. versionchanged:: 3.15
289-
Add the *zipinfo_class* and *zipextfile_class* parameters.
285+
.. versionchanged:: next
286+
Added the *zipinfo_class* and *zipextfile_class* parameters.
290287

291288

292289
.. method:: ZipFile.close()
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
:class:`zipfile.ZipFile` was given the ``zipinfo_class`` and ``zipextfile_class`` to make it easier to subclass and
2-
extend it.
1+
:class:`zipfile.ZipFile` was given the *zipinfo_class* and *zipextfile_class* to make it easier to subclass and extend it.

0 commit comments

Comments
 (0)