components/libxml2/patches/python34.patch
changeset 2176 18d982113fd0
parent 2032 916ced318d1e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libxml2/patches/python34.patch	Mon Oct 27 18:46:06 2014 -0700
@@ -0,0 +1,28 @@
+# This patch has been submitted upstream but not yet accepted:
+# https://bugzilla.gnome.org/show_bug.cgi?id=734005
+
+--- libxml2-2.9.1/python/drv_libxml2.py.~1~	2009-07-30 08:24:34.000000000 -0700
++++ libxml2-2.9.1/python/drv_libxml2.py	2014-07-30 10:43:36.655237802 -0700
+@@ -38,8 +38,11 @@
+ __version__ = "0.3"
+ 
+ import codecs
+-from types import StringType, UnicodeType
+-StringTypes = (StringType,UnicodeType)
++try:
++    from types import StringType, UnicodeType
++    StringTypes = (StringType,UnicodeType)
++except:
++    StringTypes = (bytes,str)
+ 
+ from xml.sax._exceptions import *
+ from xml.sax import xmlreader, saxutils
+@@ -65,7 +68,7 @@
+ 
+ try:
+     import libxml2
+-except ImportError, e:
++except ImportError as e:
+     raise SAXReaderNotAvailable("libxml2 not available: " \
+                                 "import error was: %s" % e)
+