Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock python-biplist/1.0.2-1.

This fixes the test failure on 32-bit arches that got it kicked out of
testing.  Attached is the source debdiff.

.hc
diff --git a/PKG-INFO b/PKG-INFO
index 6b4f05f..fb7c53d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: biplist
-Version: 1.0.1
+Version: 1.0.2
 Summary: biplist is a library for reading/writing binary plists.
 Home-page: https://bitbucket.org/wooster/biplist
 Author: Andrew Wooster
 Author-email: and...@planetaryscale.com
 License: BSD
-Download-URL: https://bitbucket.org/wooster/biplist/downloads/biplist-1.0.1.tar.gz
+Download-URL: https://bitbucket.org/wooster/biplist/downloads/biplist-1.0.2.tar.gz
 Description: `biplist` is a binary plist parser/generator for Python.
         
         Binary Property List (plist) files provide a faster and smaller serialization
diff --git a/biplist.egg-info/PKG-INFO b/biplist.egg-info/PKG-INFO
index 6b4f05f..fb7c53d 100644
--- a/biplist.egg-info/PKG-INFO
+++ b/biplist.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: biplist
-Version: 1.0.1
+Version: 1.0.2
 Summary: biplist is a library for reading/writing binary plists.
 Home-page: https://bitbucket.org/wooster/biplist
 Author: Andrew Wooster
 Author-email: and...@planetaryscale.com
 License: BSD
-Download-URL: https://bitbucket.org/wooster/biplist/downloads/biplist-1.0.1.tar.gz
+Download-URL: https://bitbucket.org/wooster/biplist/downloads/biplist-1.0.2.tar.gz
 Description: `biplist` is a binary plist parser/generator for Python.
         
         Binary Property List (plist) files provide a faster and smaller serialization
diff --git a/biplist/__init__.py b/biplist/__init__.py
index 9cab05e..17d3517 100644
--- a/biplist/__init__.py
+++ b/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/debian/changelog b/debian/changelog
index ab6a757..7226d65 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-biplist (1.0.2-1) unstable; urgency=medium
+
+  * New upstream release
+  * fix tests on 32-bit arches (Closes: #860656)
+
+ -- Hans-Christoph Steiner <h...@eds.org>  Mon, 15 May 2017 11:12:50 +0200
+
 python-biplist (1.0.1-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/fix-tests-on-32-bit-860656.patch b/debian/patches/fix-tests-on-32-bit-860656.patch
new file mode 100644
index 0000000..a655f4b
--- /dev/null
+++ b/debian/patches/fix-tests-on-32-bit-860656.patch
@@ -0,0 +1,41 @@
+From: Chris Lamb <la...@debian.org>
+Date: Mon, 22 May 2017 16:04:59 +0100
+Subject: fix tests on 32-bit
+
+plist writer chooses an int size that is big enough to represent the
+value provided, it does not care what type it was.
+
+diff --git a/tests/test_write.py b/tests/test_write.py
+index 83c6419..fabd2be 100644
+--- a/tests/test_write.py
++++ b/tests/test_write.py
+@@ -12,6 +12,7 @@ try:
+     unicodeStr = lambda x: x.decode('utf-8')
+     toUnicode = lambda x: x.decode('unicode-escape')
+ except NameError:
++    long = int
+     unicode = str
+     unicodeStr = lambda x: x
+     toUnicode = lambda x: x
+@@ -20,6 +21,12 @@ try:
+ except NameError:
+     xrange = range
+ 
++# Ensure integers are always shown as '1L' regardless of size on Python 2
++def repr_(x):
++    if isinstance(x, int):
++        x = long(x)
++    return repr(x)
++
+ class TestWritePlist(unittest.TestCase):
+     
+     def roundTrip(self, case, xml=False, expected=None, reprTest=True):
+@@ -38,7 +45,7 @@ class TestWritePlist(unittest.TestCase):
+         
+         # test equality
+         if reprTest is True:
+-            self.assertEqual(repr(case if expected is None else expected), repr(readResult))
++            self.assertEqual(repr_(case if expected is None else expected), repr_(readResult))
+         else:
+             self.assertEqual((case if expected is None else expected), readResult)
+         
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..31bbeb5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-tests-on-32-bit-860656.patch
diff --git a/setup.py b/setup.py
old mode 100644
new mode 100755
index 4db6d33..5fb6f62
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ if major <= 1 or (major == 2 and minor < 6) or (major == 3 and minor < 4):
 
 author = 'Andrew Wooster'
 email = 'and...@planetaryscale.com'
-version = '1.0.1'
+version = '1.0.2'
 desc = 'biplist is a library for reading/writing binary plists.'
 
 setup(

Reply via email to