Skip to content

v0.0.8

Latest
Compare
Choose a tag to compare
@MrMino MrMino released this 02 Aug 23:29
· 21 commits to master since this release

0.0.8 - 2021-08-03

Changed

  • Since WheelFile write methods now have skipdir=True default (see below),
    writing recursively from a directory will no longer produce entries for
    directories. This also means, that attempting to write an empty directory (or
    any directory, even with recursive=False) is no longer possible, unless
    skipdir=False is specified.

    This does not apply to writestr_* methods - attempting to write to an
    arcname ending in / will produce an entry that is visible as a
    directory.

  • WheelFile.validate will now fail and raise ValueError if WHEEL build
    tag field (.wheeldata.build) contains a value that is different from the
    wheel name (.build_tag).

Added

  • WheelFile.from_wheelfile - a constructor class-method that makes it
    possible to recreate a wheel and: rename it (change distname, version,
    buildnumber and/or tags), append files to it, change its metadata, etc.
  • WheelFile.METADATA_FILENAMES - a static field with a set of names of
    metadata files managed by this class.
  • WheelFile.writestr_distinfo - similar to write_distinfo, this is a safe
    shortcut for writing into .dist-info directory.
  • WheelFile.__init__ now takes configuration arguments known from ZipFile:
    compression, compression, allowZip64, and strict_timestamps. They
    work the same way, except that they are keyword only in WheelFile, and the
    default value for compression is zipfile.ZIP_DEFLATED.
  • WheelFile write methods now take optional compress_type and
    compresslevel arguments known from ZipFile.
  • New skipdir argument in WheelFile write methods: write, write_data,
    and write_distinfo. When True (which is the default), these methods will
    not write ZIP entries for directories into the archive.

Fixed

  • Docstring of the WheelFile.filename property, which was innacurate.
  • MetaData.from_str will now correctly unpack Keywords field into a list of
    strings, instead of a one-element list with a string containing
    comma-separated tags.