[Python-modules-team] Bug#507266: python-soappy: diff for NMU version 0.12.0-2.1

Thomas Viehmann tv at beamnet.de
Sat Nov 29 16:24:20 UTC 2008


tags 507266 + patch pending
thanks

Hi Python-Modules-Team,

I've prepared an NMU for python-soappy (versioned as 0.12.0-2.1) and
will upload in a few days. Please do to tell me if I should upload
sooner.

Kind Regards

T.

diff -u python-soappy-0.12.0/debian/changelog python-soappy-0.12.0/debian/changelog
--- python-soappy-0.12.0/debian/changelog
+++ python-soappy-0.12.0/debian/changelog
@@ -1,3 +1,12 @@
+python-soappy (0.12.0-2.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * debian/patches/fix_new_style_classes.dpatch:
+    fix SOAPBuilder to gracefully handle new style classes
+    (e.g. faultType in python 2.5). Closes: #507266
+
+ -- Thomas Viehmann <tv at beamnet.de>  Sat, 29 Nov 2008 17:09:34 +0100
+
 python-soappy (0.12.0-2) unstable; urgency=low
 
   * debian/control:
diff -u python-soappy-0.12.0/debian/patches/00list python-soappy-0.12.0/debian/patches/00list
--- python-soappy-0.12.0/debian/patches/00list
+++ python-soappy-0.12.0/debian/patches/00list
@@ -3,0 +4 @@
+fix_new_style_classes.dpatch
only in patch2:
unchanged:
--- python-soappy-0.12.0.orig/debian/patches/fix_new_style_classes.dpatch
+++ python-soappy-0.12.0/debian/patches/fix_new_style_classes.dpatch
@@ -0,0 +1,38 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix_new_style_classes.dpatch by Thomas Viehmann <tv at beamnet.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix SOAPBuilder.py dump to gracefully handle new style classes
+## DP: such as faulType (new style in python2.5 as subclass of
+## DP: Exception)
+
+ at DPATCH@
+--- trunk~/SOAPpy/SOAPBuilder.py	2005-02-21 21:24:13.000000000 +0100
++++ trunk/SOAPpy/SOAPBuilder.py	2008-11-29 16:57:21.000000000 +0100
+@@ -281,12 +281,14 @@
+         if Config.debug: print "In dump.", "obj=", obj
+         ns_map = ns_map.copy()
+         self.depth += 1
+-
+         if type(tag) not in (NoneType, StringType, UnicodeType):
+             raise KeyError, "tag must be a string or None"
+-
++        if isinstance(obj, anyType):
++            methname = "dump_instance"
++        else:
++            methname = "dump_" + type(obj).__name__
+         try:
+-            meth = getattr(self, "dump_" + type(obj).__name__)
++            meth = getattr(self, methname)
+         except AttributeError:
+             if type(obj) == LongType:
+                 obj_type = "integer"
+@@ -392,7 +394,7 @@
+         tag = tag or self.gentag()
+         tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding
+ 
+-        if type(obj) == InstanceType:
++        if type(obj) == InstanceType or isinstance(obj, anyType):
+             data = obj.data
+         else:
+             data = obj





More information about the Python-modules-team mailing list