Skip to content

v0.0.7

Compare
Choose a tag to compare
@MrMino MrMino released this 19 Jul 03:00
· 85 commits to master since this release

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 raise RecordContainsDirectoryError.

  • 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 the mode 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 in RECORD, making them incompatible with this release.

  • In anticipation of an actual implementation, WheelFile.open() raises
    NotImplementedError now, as it should. Previously only a def ...: pass
    stub was present.

Added

  • Implemented WheelFile.namelist(), which, similarily to ZipFile.namelist(),
    returns a list of archive members, but omits the metadata files which should
    not be written manually: RECORD, WHEEL and METADATA.
  • Added WheelFile.infolist(). Similarily to the namelist() above - it
    returns a ZipInfo for each member, but omits the ones corresponding to
    metadata files.
  • RecordContainsDirectoryError exception class.
  • distinfo_dirname and data_dirname properties, for easier browsing.

Fixed

  • Wheel contents written using write(..., recursive=True) no longer contain
    entries corresponding to directories in their RECORD.
  • Removed a bunch of cosmetic mistakes from exception messages.