File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,9 +227,10 @@ ZipFile objects
227227 Similar behavior occurs with files newer than 2107-12-31,
228228 the timestamp is also set to the limit.
229229
230- When mode is ``'r' ``, *metadata_encoding * may be set to the name of a codec,
231- which will be used to decode metadata such as the names of members and ZIP
232- comments.
230+ The *metadata_encoding * argument may be set to the name of a codec, which
231+ will be used to decode metadata such as the names of members and ZIP
232+ comments when reading from an archive. This argument is ignored for writing
233+ new members.
233234
234235 If the file is created with mode ``'w' ``, ``'x' `` or ``'a' `` and then
235236 :meth: `closed <close> ` without adding any files to the archive, the appropriate
@@ -285,6 +286,10 @@ ZipFile objects
285286 Added support for specifying member name encoding for reading
286287 metadata in the zipfile's directory and file headers.
287288
289+ .. versionchanged :: next
290+ The *metadata_encoding * parameter is now allowed in all modes. Previously
291+ it could only be specified in mode ``'r' ``.
292+
288293
289294.. method :: ZipFile.close()
290295
You can’t perform that action at this time.
0 commit comments