From 4cceb84d1c4a43fe4f984e6e4126c08175a97c6d Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Wed, 2 Aug 2017 10:31:54 -0700 Subject: Update third party DMG dependencies mac_alias is updated from 2.0.4 to 2.0.6 and biplist is updated from 1.0.1 to 1.0.2 since pip has trouble properly updating packages, so now we download all packages directly from our Git forks. Change-Id: Ia8533b90a19483763f6e48693124361eb32c3651 Reviewed-by: Christian Kandeler --- .../python/lib/python2.7/site-packages/biplist/__init__.py | 7 +++++-- .../lib/python2.7/site-packages/mac_alias/bookmark.py | 14 ++++---------- .../python2.7/site-packages/mac_alias/qt_attribution.json | 2 +- src/3rdparty/python/update.sh | 6 +++++- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/3rdparty/python/lib/python2.7/site-packages/biplist/__init__.py b/src/3rdparty/python/lib/python2.7/site-packages/biplist/__init__.py index 9cab05ec3..17d35178d 100644 --- a/src/3rdparty/python/lib/python2.7/site-packages/biplist/__init__.py +++ b/src/3rdparty/python/lib/python2.7/site-packages/biplist/__init__.py @@ -507,6 +507,9 @@ class StringWrapper(object): else: return len(self.encodedValue)//2 + def __lt__(self, other): + return self.encodedValue < other.encodedValue + @property def encodingMarker(self): if self.encoding == 'ascii': @@ -770,7 +773,7 @@ class PlistWriter(object): output += proc_variable_length(0b1010, len(obj)) objectsToWrite = [] - for objRef in obj: + for objRef in sorted(obj) if isinstance(obj, set) else obj: (isNew, output) = self.writeObjectReference(objRef, output) if isNew: objectsToWrite.append(objRef) @@ -781,7 +784,7 @@ class PlistWriter(object): keys = [] values = [] objectsToWrite = [] - for key, value in iteritems(obj): + for key, value in sorted(iteritems(obj)): keys.append(key) values.append(value) for key in keys: diff --git a/src/3rdparty/python/lib/python2.7/site-packages/mac_alias/bookmark.py b/src/3rdparty/python/lib/python2.7/site-packages/mac_alias/bookmark.py index 409ed8297..0de6b9404 100644 --- a/src/3rdparty/python/lib/python2.7/site-packages/mac_alias/bookmark.py +++ b/src/3rdparty/python/lib/python2.7/site-packages/mac_alias/bookmark.py @@ -317,6 +317,9 @@ class Bookmark (object): if len(data) < 16: raise ValueError('Not a bookmark file (too short)') + if isinstance(data, bytearray): + data = bytes(data) + magic,size,dummy,hdrsize = struct.unpack(b'<4sIII', data[0:16]) if magic != b'book': @@ -508,7 +511,7 @@ class Bookmark (object): # binary search to find data entries.sort() - tocs.append((tid, b''.join([struct.pack('