From ed21919d69ac22232cbc0dad0323477818112b6f Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sat, 22 Sep 2018 11:02:53 -0700 Subject: bpo-34472: Add data descriptor signature to zipfile (GH-8871) (GH-9398) This makes streamed zips compatible with MacOS Archive Utility and other applications. (cherry picked from commit 4ba3b50bfe6d50cd82d208023ea23e203ab50589) Co-authored-by: Silas Sewell --- Lib/zipfile.py | 6 ++++-- Misc/ACKS | 1 + Misc/NEWS.d/next/Library/2018-08-23-09-25-08.bpo-34472.cGyYrO.rst | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2018-08-23-09-25-08.bpo-34472.cGyYrO.rst diff --git a/Lib/zipfile.py b/Lib/zipfile.py index bc757a3..5bb3587 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -164,6 +164,8 @@ _CD64_NUMBER_ENTRIES_TOTAL = 7 _CD64_DIRECTORY_SIZE = 8 _CD64_OFFSET_START_CENTDIR = 9 +_DD_SIGNATURE = 0x08074b50 + _EXTRA_FIELD_STRUCT = struct.Struct('