v0.0.7
0.0.7 - 2021-07-19
Changed
-
Default compression method is now set to
zipfile.ZIP_DEFLATED
. -
Wheels with directory entries in their
RECORD
files will now make
WheelFile
raiseRecordContainsDirectoryError
. -
Lazy mode is now allowed, in a very limited version - most methods will still
raise exceptions, even when the documentation states that lazy mode
suppresses them.Use it by specifying
l
in themode
argument, e.g.
WheelFile("path/to/wheel", mode='rl')
. This may be used to read wheels
generated with previous version of wheelfile, which generated directory
entries inRECORD
, making them incompatible with this release. -
In anticipation of an actual implementation,
WheelFile.open()
raises
NotImplementedError
now, as it should. Previously only adef ...: pass
stub was present.
Added
- Implemented
WheelFile.namelist()
, which, similarily toZipFile.namelist()
,
returns a list of archive members, but omits the metadata files which should
not be written manually:RECORD
,WHEEL
andMETADATA
. - Added
WheelFile.infolist()
. Similarily to thenamelist()
above - it
returns aZipInfo
for each member, but omits the ones corresponding to
metadata files. RecordContainsDirectoryError
exception class.distinfo_dirname
anddata_dirname
properties, for easier browsing.
Fixed
- Wheel contents written using
write(..., recursive=True)
no longer contain
entries corresponding to directories in theirRECORD
. - Removed a bunch of cosmetic mistakes from exception messages.