Discussion:
Issue 208 in html5lib: html5lib is incompatible with python 2.4
h***@public.gmane.org
2012-06-01 00:32:14 UTC
Permalink
Status: New
Owner: ----

New issue 208 by andreabr...-***@public.gmane.org: html5lib is incompatible with
python 2.4
http://code.google.com/p/html5lib/issues/detail?id=208

What steps will reproduce the problem?

install html5lib with python 2.4 and use it...

What is the expected output? What do you see instead?

Traceback (most recent call last):
File "xxx.py", line 10, in ?
import html5lib

File "/usr/lib/python2.4/site-packages/html5lib-0.95-py2.4.egg/html5lib/__init__.py",
line 14, in ?
from html5parser import HTMLParser, parse, parseFragment

File "/usr/lib/python2.4/site-packages/html5lib-0.95-py2.4.egg/html5lib/html5parser.py",
line 179
currentNode = self.tree.openElements[-1] if self.tree.openElements else
None
^
SyntaxError: invalid syntax

Please provide any additional information below.

replace 179-181 with:

if self.tree.openElements:
currentNode = self.tree.openElements[-1]
else:
currentNode = None
if currentNode:
currentNodeNamespace = currentNode.namespace
else:
currentNodeNamespace = None
if currentNode:
currentNodeName = currentNode.name
else:
currentNodeName = None
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
h***@public.gmane.org
2012-06-26 07:35:48 UTC
Permalink
Comment #1 on issue 208 by Antono...-***@public.gmane.org: html5lib is incompatible
with python 2.4
http://code.google.com/p/html5lib/issues/detail?id=208

when i replace line 179-181
i have a next errors

File "/usr/lib/python2.4/site-packages/html5lib/__init__.py", line 14, in ?
from html5parser import HTMLParser, parse, parseFragment
File "/usr/lib/python2.4/site-packages/html5lib/html5parser.py", line 183
if self.tree.openElements:
^
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
h***@public.gmane.org
2012-06-26 07:37:28 UTC
Permalink
Comment #2 on issue 208 by Antono...-***@public.gmane.org: html5lib is incompatible
with python 2.4
http://code.google.com/p/html5lib/issues/detail?id=208

when i replace line 179-181
i have a next errors

#xhtml2pdf --encoding utf8 -s index.html


Traceback (most recent call last):
File "/usr/bin/xhtml2pdf", line 7, in ?
sys.exit(
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 236, in
load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 2097, in
load_entry_point
return ep.load()
File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 1830, in
load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.4/site-packages/xhtml2pdf/pisa.py", line 3, in ?
from xhtml2pdf.document import pisaDocument
File "/usr/lib/python2.4/site-packages/xhtml2pdf/document.py", line 2,
in ?
from xhtml2pdf.context import pisaContext
File "/usr/lib/python2.4/site-packages/xhtml2pdf/context.py", line 23,
in ?
import xhtml2pdf.parser
File "/usr/lib/python2.4/site-packages/xhtml2pdf/parser.py", line 17, in ?
from html5lib import treebuilders, inputstream
File "/usr/lib/python2.4/site-packages/html5lib/__init__.py", line 14,
in ?
from html5parser import HTMLParser, parse, parseFragment
File "/usr/lib/python2.4/site-packages/html5lib/html5parser.py", line 183
if self.tree.openElements:
^
IndentationError: expected an indented block
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
h***@public.gmane.org
2012-06-26 07:41:19 UTC
Permalink
Comment #3 on issue 208 by Antono...-***@public.gmane.org: html5lib is incompatible
with python 2.4
http://code.google.com/p/html5lib/issues/detail?id=208

thanks
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
h***@public.gmane.org
2013-04-09 20:19:09 UTC
Permalink
Updates:
Status: WontFix

Comment #4 on issue 208 by geoffers: html5lib is incompatible with python
2.4
http://code.google.com/p/html5lib/issues/detail?id=208

Nothing below 2.6 has been supported for a while, even when stuff has
worked down to 2.4/2.5. 1.0b1 will definitely require 2.6 and will not work
with anything older.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups "html5lib-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to html5lib-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send an email to html5lib-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
Visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...