[Python-apps-commits] r6814 - in packages/pypar2/trunk/debian (3 files)

stefanor at users.alioth.debian.org stefanor at users.alioth.debian.org
Wed Mar 23 20:35:25 UTC 2011


    Date: Wednesday, March 23, 2011 @ 20:35:15
  Author: stefanor
Revision: 6814

* Team upload.
* typeorder.patch: Use list of tuples instead of depending on the iteration
  order of a dict. (Closes: #617966, LP: #719708)

Added:
  packages/pypar2/trunk/debian/patches/typeorder.patch
Modified:
  packages/pypar2/trunk/debian/changelog
  packages/pypar2/trunk/debian/patches/series

Modified: packages/pypar2/trunk/debian/changelog
===================================================================
--- packages/pypar2/trunk/debian/changelog	2011-03-23 18:41:42 UTC (rev 6813)
+++ packages/pypar2/trunk/debian/changelog	2011-03-23 20:35:15 UTC (rev 6814)
@@ -1,3 +1,11 @@
+pypar2 (1.4-6) unstable; urgency=low
+
+  * Team upload.
+  * typeorder.patch: Use list of tuples instead of depending on the iteration
+    order of a dict. (Closes: #617966, LP: #719708)
+
+ -- Stefano Rivera <stefanor at debian.org>  Wed, 23 Mar 2011 21:55:07 +0200
+
 pypar2 (1.4-5) unstable; urgency=low
 
   [ Sandro Tosi ]

Modified: packages/pypar2/trunk/debian/patches/series
===================================================================
--- packages/pypar2/trunk/debian/patches/series	2011-03-23 18:41:42 UTC (rev 6813)
+++ packages/pypar2/trunk/debian/patches/series	2011-03-23 20:35:15 UTC (rev 6814)
@@ -1 +1,2 @@
 no_pyxml.patch
+typeorder.patch

Added: packages/pypar2/trunk/debian/patches/typeorder.patch
===================================================================
--- packages/pypar2/trunk/debian/patches/typeorder.patch	                        (rev 0)
+++ packages/pypar2/trunk/debian/patches/typeorder.patch	2011-03-23 20:35:15 UTC (rev 6814)
@@ -0,0 +1,27 @@
+Description: Use a list of tuples instead of depending on dict iteration order
+Author: Stefano Rivera <stefanor at debian.org>
+Bug-Debian: http://bugs.debian.org/617966
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/719708
+Forwarded: yes
+Last-Update: 2011-03-23
+
+--- a/src/typeToolBox.py
++++ b/src/typeToolBox.py
+@@ -20,14 +20,14 @@
+ 
+ # Supported types
+ # 'bool' type must be placed *before* 'int' type, otherwise booleans are detected as integers
+-types = {bool : 'bool', int : 'int', str : 'str'}
++types = [(bool, 'bool'), (int, 'int'), (str, 'str')]
+ 
+ 
+ # Return a String with the type of value
+ def getType(value) :
+-    for type in types.keys() :
++    for type, name in types:
+         if isinstance(value, type) :
+-            return types[type]
++            return name
+     raise TypeError, str(value) + _(' has an unsupported type')
+ 
+ 




More information about the Python-apps-commits mailing list