v0.0.6
0.0.6 - 2021-07-01
This release introduces backwards-incompatible changes in WheelFile.write
.
Overall, it makes the method safer and easier to use. One will no longer create
a wheel-bomb by calling write('./')
.
If you were passing relative paths as filename
without setting arcname
, you
probably want to set resolve=False
for retaining compatibility with this
release. See the "Changed" section.
Added
WheelFile.write
andWheelFile.write_data
now have a new, keyword-only
resolve
argument, that substitutes the defaultarcname
with the name of
the file the path infilename
points to. This is set toTrue
by default
now.- New
WheelFile.write_distinfo
method, as a safe shorthand for writing to
.dist-info/
. - New
resolved
utility function. - New
ProhibitedWriteError
exception class.
Changed
WheelMeta
no longer prohibits reading metadata in versions other than v2.1.
It uses2.1
afterwards, and its still not changeable though.- Since
WheelFile.write
andWheelFile.write_data
methods haveresolve
argument set toTrue
by default now, paths are no longer being put verbatim
into the archive, only the filenames they point to. Setresolve
toFalse
to get the old behavior, the one exhibited byZipFile.write
. - Parts of
WheelFile.__init__
have been refactored for parity between "named"
and "unnamed" modes, i.e. it no longer raises different exceptions based on
whether it is given a file, path to a directory, path to a file, or an io
buffer. - Wheels generated by
WheelFile
are now reproducible. The modification times
written into the resulting archives using.write(...)
no longer differ
between builds consisting of the same, unchanged files - they are taken from
the files itself.
Fixed
WheelFile
no longer accepts arguments of types other thanVersion
and
str
in itsversion
argument, when an io buffer is given.TypeError
is
raised instead.MetaData
started accepting keywords given via single string (comma
separated). Previously this support was documented, but missing.- The
wheelfile
package itself should now have the keywords set properly ;).