From e4db231760c11037126a5dfeff35d3ca40c970ed Mon Sep 17 00:00:00 2001 From: Silas Sewell Date: Thu, 23 Aug 2018 09:02:38 -0400 Subject: [PATCH] bpo-34472: Add data descriptor signature to zipfile (GH-8871) This makes streamed zips compatible with MacOS Archive Utility and other applications. --- Lib/zipfile.py | 6 ++++-- Misc/ACKS | 1 + .../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 89df90b25209f8..4a6b40ee441c6f 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -159,6 +159,8 @@ class LargeZipFile(Exception): _CD64_DIRECTORY_SIZE = 8 _CD64_OFFSET_START_CENTDIR = 9 +_DD_SIGNATURE = 0x08074b50 + _EXTRA_FIELD_STRUCT = struct.Struct('