From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 22 Sep 2018 18:03:04 +0000 (-0700) Subject: bpo-34472: Add data descriptor signature to zipfile (GH-8871) (GH-9399) X-Git-Tag: v3.7.1rc1~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44989bc2696320cf55ae6f329aaf58edd49d792a;p=thirdparty%2FPython%2Fcpython.git bpo-34472: Add data descriptor signature to zipfile (GH-8871) (GH-9399) This makes streamed zips compatible with MacOS Archive Utility and other applications. (cherry picked from commit 4ba3b50bfe6d50cd82d208023ea23e203ab50589) Co-authored-by: Silas Sewell --- diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 9f88512d9838..a43878575db8 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -159,6 +159,8 @@ _CD64_NUMBER_ENTRIES_TOTAL = 7 _CD64_DIRECTORY_SIZE = 8 _CD64_OFFSET_START_CENTDIR = 9 +_DD_SIGNATURE = 0x08074b50 + _EXTRA_FIELD_STRUCT = struct.Struct('