Skip to content

Latest commit

 

History

History
98 lines (82 loc) · 4.94 KB

CHANGELOG.md

File metadata and controls

98 lines (82 loc) · 4.94 KB

zipstream-ng changelog

  • Fix issue where it was possible to add paths with arcnames that didn't match the path contents (file ending with "/", directory not ending with "/")
  • Add the ability to get information on added files using ZipStream.info_list. This function replaces ZipStream.get_info which would only provide information on files that had already been streamed.
  • Deprecate ZipStream.get_info. It will continue to work until the next major version but will now emit a warning when used.
  • Reduce memory usage for sized ZipStream objects by updating the final size of the stream as files are added instead of storing the required information so the size could be calculated later.
  • Add the ability to provide a custom "walk" function to ZipStream.add_path for more control over how directories are walked.
  • Change the exception raised when trying to add a file that doesn't exist from a ValueError to a more appropriate FileNotFoundError.
  • Optimize the number of os.stat calls required to add a file.
  • Fix issue where adding data with an arcname that contained a null byte would lead to an incorrect size being calculated.
  • When ZipStream.add is provided a size alongside an iterable, the size will now be used to determine if Zip64 extensions are needed.
  • Add ZipStream.mkdir method to make an empty directory inside the stream.
  • Fix an issue where ZipStream.get_info would return incorrect values for compress_level in cases where the compression level was specified, but had no effect (ie. when using ZIP_STORED/ZIP_LZMA).
  • Fix an edge case where top-level paths like / could be added with an empty arcname.
  • Improve error messages for adding data as a directory and adding nonexistent paths.
  • The expected size of data added to a ZipStream is now validated as it's generated. For unsized ZipStreams a mismatch in expected vs. actual size emits a warning, for sized ZipStreams a RuntimeError is raised.
  • For sized ZipStreams, add the option to provide the total size of an iterable when adding it. When the size is provided, the iterable will no longer have to immediately be read into memory to compute it.
  • Fix issue where adding data via an iterable to an unsized ZipStream wouldn't fully implement Zip64 extensions. This caused some versions of 7z to emit warnings (but still properly extract the data).
  • Fix issue where adding files with multibyte characters in the filename would lead to an incorrect zip size being calculated.
  • Fix issue where directly adding an empty folder would give it the wrong name in the archive and lead to an incorrect zip size being calculated.
  • Fix documentation issue caused by the import shuffling in v1.3.1
  • Set external attributes (permissions, directory flag, etc) on data added to the ZipStream via add()
  • Allow importing functionality from zipstream.ng as well as zipstream to avoid namespace collisions with other projects that provide a zipstream module.
  • Add a last_modified property to ZipStream objects that returns a datetime of the most recent modified date of all the files in the stream.
  • Fix issue where adding empty directories would lead to an incorrect zip size being calculated.
  • Fix issue where asking for the ZipStream's size multiple times while adding data wouldn't properly check if Zip64 extensions were being used, causing an incorrect size to be calculated.
  • Add a sized property to ZipStream objects that checks if the size can be calculated for it
  • Change ZipStream.from_path to generate a sized ZipStream if no compression is used
  • Add support for Python 3.5 and 3.6
  • Initial version