summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-11-20 22:22:49 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-11-20 22:22:49 +0000
commit68957e2cf33c780dc5bd37ddfc83db9d30894476 (patch)
treeae14ac9e322247ebf620a9ad11e43c86d3f0ea89 /dev-python/lxml/files
parentVersion bump. (diff)
downloadgentoo-2-68957e2cf33c780dc5bd37ddfc83db9d30894476.tar.gz
gentoo-2-68957e2cf33c780dc5bd37ddfc83db9d30894476.tar.bz2
gentoo-2-68957e2cf33c780dc5bd37ddfc83db9d30894476.zip
Disable tests with Python 3. Fix SyntaxErrors with Python 3.
(Portage version: 14854-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/lxml/files')
-rw-r--r--dev-python/lxml/files/lxml-2.2.4-python-3.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/dev-python/lxml/files/lxml-2.2.4-python-3.patch b/dev-python/lxml/files/lxml-2.2.4-python-3.patch
new file mode 100644
index 000000000000..2b606a1c5613
--- /dev/null
+++ b/dev-python/lxml/files/lxml-2.2.4-python-3.patch
@@ -0,0 +1,44 @@
+This patch is probably incomplete.
+
+--- src/lxml/html/_diffcommand.py
++++ src/lxml/html/_diffcommand.py
+@@ -34,7 +34,7 @@
+ if options.annotation:
+ return annotate(options, args)
+ if len(args) != 2:
+- print 'Error: you must give two files'
++ print('Error: you must give two files')
+ parser.print_help()
+ sys.exit(1)
+ file1, file2 = args
+@@ -82,6 +82,6 @@
+ return pre, html, post
+
+ def annotate(options, args):
+- print "Not yet implemented"
++ print("Not yet implemented")
+ sys.exit(1)
+
+--- src/lxml/html/_html5builder.py
++++ src/lxml/html/_html5builder.py
+@@ -6,6 +6,7 @@
+
+ from html5lib.treebuilders import _base, etree as etree_builders
+ from lxml import html, etree
++from sys import hexversion
+
+
+ class DocumentType(object):
+@@ -77,7 +78,11 @@
+ self.doctype.systemId))
+ buf.append('>')
+ buf.append('<html></html>')
+- root = html.fromstring(u''.join(buf))
++ if hexversion >= 0x3000000:
++ joining_str = ''
++ else:
++ joining_str = ''.decode()
++ root = html.fromstring(joining_str.join(buf))
+
+ # Append the initial comments:
+ for comment in self.initialComments: