Skip to content

Commit 6470201

Browse files
committed
Document enumeration type
1 parent 8a6a2c4 commit 6470201

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Doc/library/zipfile.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,22 @@ The module defines the following items:
120120
methods, and may either refuse to process the ZIP file altogether,
121121
or fail to extract individual files.
122122

123-
.. data:: PERMS_PRESERVE_NONE
123+
.. data:: PreserveMode.NONE
124124

125125
Constant for use in :meth:`extractall` and :meth:`extract` methods. Do not
126126
preserve permissions of zipped files.
127127

128128
.. versionadded:: 3.11
129129

130-
.. data:: PERMS_PRESERVE_SAFE
130+
.. data:: PreserveMode.SAFE
131131

132132
Constant for use in :meth:`extractall` and :meth:`extract` methods.
133133
Preserve safe subset of permissions of the zipped files only: permissions
134134
for reading, writing, execution for user, group and others.
135135

136136
.. versionadded:: 3.11
137137

138-
.. data:: PERMS_PRESERVE_ALL
138+
.. data:: PreserveMode.ALL
139139

140140
Constant for use in :meth:`extractall` and :meth:`extract` methods.
141141
Preserve all the permissions of the zipped files, including unsafe ones:
@@ -343,18 +343,18 @@ ZipFile Objects
343343

344344

345345
.. method:: ZipFile.extract(member, path=None, pwd=None, \
346-
preserve_permissions=zipfile.PERMS_PRESERVE_NONE)
346+
preserve_permissions=zipfile.PreserveMode.NONE)
347347

348348
Extract a member from the archive to the current working directory; *member*
349349
must be its full name or a :class:`ZipInfo` object. Its file information is
350350
extracted as accurately as possible. *path* specifies a different directory
351351
to extract to. *member* can be a filename or a :class:`ZipInfo` object.
352352
*pwd* is the password used for encrypted files. *preserve_permissions*
353353
controls how the permissions of zipped files are preserved. The default is
354-
:data:`PERMS_PRESERVE_NONE` --- do not preserve any permissions. Other
354+
:data:`PreserveMode.NONE` --- do not preserve any permissions. Other
355355
options are to preserve a safe subset of permissions
356-
(:data:`PERMS_PRESERVE_SAFE`) or all permissions
357-
(:data:`PERMS_PRESERVE_ALL`).
356+
(:data:`PreserveMode.SAFE`) or all permissions
357+
(:data:`PreserveMode.ALL`).
358358

359359
Returns the normalized path created (a directory or new file).
360360

@@ -377,16 +377,16 @@ ZipFile Objects
377377

378378

379379
.. method:: ZipFile.extractall(path=None, members=None, pwd=None, \
380-
preserve_permissions=zipfile.PERMS_PRESERVE_NONE)
380+
preserve_permissions=zipfile.PreserveMode.NONE)
381381

382382
Extract all members from the archive to the current working directory. *path*
383383
specifies a different directory to extract to. *members* is optional and must
384384
be a subset of the list returned by :meth:`namelist`. *pwd* is the password
385385
used for encrypted files. *preserve_permissions* controls how the permissions
386-
of zipped files are preserved. The default is :data:`PERMS_PRESERVE_NONE`
386+
of zipped files are preserved. The default is :data:`PreserveMode.NONE`
387387
--- do not preserve any permissions. Other options are to preserve a safe
388-
subset of permissions (:data:`PERMS_PRESERVE_SAFE`) or all permissions
389-
(:data:`PERMS_PRESERVE_ALL`).
388+
subset of permissions (:data:`PreserveMode.SAFE`) or all permissions
389+
(:data:`PreserveMode.ALL`).
390390

391391

392392
.. warning::

0 commit comments

Comments
 (0)