Edgewall Software

Opened 10 years ago

Closed 10 years ago

#582 closed defect (fixed)

genshi broken with python 3.4

Reported by: Rene Peinthor Owned by: hodgestar
Priority: critical Milestone: 0.7
Component: Parsing Version: 0.6
Keywords: Cc:

Description

hi!

Due to python AST changes (arguments node was changed) genshi will not work with python3.4.

I attached a patch(probably not the cleanest fix).

Attachments (2)

genshi_py34.diff (2.6 KB) - added by anonymous 10 years ago.
ticket582.patch (2.3 KB) - added by barry@… 10 years ago.
A slightly better patch

Download all attachments as: .zip

Change History (14)

Changed 10 years ago by anonymous

comment:1 Changed 10 years ago by barry@…

I don't think this patch is going to work. With this applied to 0.7, it breaks the test suite for Python 2.7 and still doesn't quite fix it for 3.4.

======================================================================
ERROR: test_def_kwargs (genshi.template.tests.eval.SuiteTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/genshi/template/tests/eval.py", line 588, in test_def_kwargs
    """)
  File "/«PKGBUILDDIR»/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 100, in visit_Module
    self.visit(n)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 166, in visit_FunctionDef
    self.visit(node.args)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 145, in visit_arguments
    self.visit(node.kwarg)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <type 'str'>

======================================================================
ERROR: test_def_vararg (genshi.template.tests.eval.SuiteTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/genshi/template/tests/eval.py", line 578, in test_def_vararg
    """)
  File "/«PKGBUILDDIR»/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 100, in visit_Module
    self.visit(n)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 166, in visit_FunctionDef
    self.visit(node.args)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 135, in visit_arguments
    self.visit(node.vararg)
  File "/«PKGBUILDDIR»/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <type 'str'>

----------------------------------------------------------------------
Ran 854 tests in 1.172s

FAILED (errors=2, skipped=1)

Changed 10 years ago by barry@…

A slightly better patch

comment:2 Changed 10 years ago by barry@…

I attached a slightly better patch which doesn't break 2.7 compatibility. Unfortunately, it still doesn't fix Python 3.4.

comment:3 Changed 10 years ago by barry@…

Remaining Python 3.4 test failures, even with patch applied:

======================================================================
ERROR: test_pickle (genshi.tests.core.NamespaceTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/tests/core.py", line 203, in test_pickle
    pickle.dump(ns, buf, 2)
TypeError: 'QName' object is not callable

======================================================================
ERROR: test_extract_py_def_directive_with_py_strip (genshi.filters.tests.i18n.ExtractTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/filters/tests/i18n.py", line 1980, in test_extract_py_def_directive_with_py_strip
    messages = list(translator.extract(tmpl.stream))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 454, in stream
    self._stream = list(self._prepare(self._stream))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 490, in _prepare
    yield kind, (directives, list(substream)), pos
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 488, in _prepare
    substream = self._prepare(substream)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 288, in _prepare
    self._extract_includes(self._interpolate_attrs(stream))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 210, in _extract_includes
    for kind, data, pos in stream:
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 278, in _interpolate_attrs
    pos[2], lookup=self.lookup))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/interpolation.py", line 78, in interpolate
    lookup=lookup)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 515, in _f
    f(self, node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 528, in visit_BoolOp
    self.visit(value)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_remove_existing_attr (genshi.template.tests.directives.AttrsDirectiveTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/directives.py", line 60, in test_remove_existing_attr
    </doc>""", tmpl.generate().render(encoding=None))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 544, in generate
    stream = self.stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 454, in stream
    self._stream = list(self._prepare(self._stream))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 485, in _prepare
    namespaces, pos)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 82, in attach
    return cls(value, template, namespaces, *pos[1:]), stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 60, in __init__
    self.expr = self._parse_expr(value, template, lineno, offset)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 109, in _parse_expr
    lookup=template.lookup) or None
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 587, in visit_Dict
    self.visit(value)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_otherwise (genshi.template.tests.directives.ChooseDirectiveTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/directives.py", line 88, in test_otherwise
    </div>""", tmpl.generate().render(encoding=None))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 544, in generate
    stream = self.stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 454, in stream
    self._stream = list(self._prepare(self._stream))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 490, in _prepare
    yield kind, (directives, list(substream)), pos
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 485, in _prepare
    namespaces, pos)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 617, in attach
    namespaces, pos)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 82, in attach
    return cls(value, template, namespaces, *pos[1:]), stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 609, in __init__
    Directive.__init__(self, value, template, namespaces, lineno, offset)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 60, in __init__
    self.expr = self._parse_expr(value, template, lineno, offset)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 109, in _parse_expr
    lookup=template.lookup) or None
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_def_in_matched (genshi.template.tests.directives.DefDirectiveTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/directives.py", line 370, in test_def_in_matched
    </doc>""")
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 67, in __init__
    allow_exec=allow_exec)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 418, in __init__
    self._stream = self._parse(source, encoding)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 86, in _parse
    pos[2], lookup=self.lookup):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/interpolation.py", line 78, in interpolate
    lookup=lookup)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 659, in visit_Call
    self.visit(arg)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_function_with_default_arg (genshi.template.tests.directives.DefDirectiveTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/directives.py", line 332, in test_function_with_default_arg
    </doc>""", tmpl.generate().render(encoding=None))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 544, in generate
    stream = self.stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 454, in stream
    self._stream = list(self._prepare(self._stream))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 485, in _prepare
    namespaces, pos)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 287, in attach
    namespaces, pos)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 82, in attach
    return cls(value, template, namespaces, *pos[1:]), stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 273, in __init__
    lineno, lookup=template.lookup)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_invocation_in_attribute_none (genshi.template.tests.directives.DefDirectiveTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/directives.py", line 347, in test_invocation_in_attribute_none
    </doc>""")
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 67, in __init__
    allow_exec=allow_exec)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 418, in __init__
    self._stream = self._parse(source, encoding)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 86, in _parse
    pos[2], lookup=self.lookup):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/interpolation.py", line 78, in interpolate
    lookup=lookup)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_def_in_match (genshi.template.tests.directives.MatchDirectiveTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/directives.py", line 772, in test_def_in_match
    </doc>""")
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 67, in __init__
    allow_exec=allow_exec)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 418, in __init__
    self._stream = self._parse(source, encoding)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/markup.py", line 86, in _parse
    pos[2], lookup=self.lookup):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/interpolation.py", line 78, in interpolate
    lookup=lookup)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 659, in visit_Call
    self.visit(arg)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_strip_false (genshi.template.tests.directives.StripDirectiveTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/directives.py", line 1093, in test_strip_false
    </div>""", tmpl.generate().render(encoding=None))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 544, in generate
    stream = self.stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 454, in stream
    self._stream = list(self._prepare(self._stream))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 485, in _prepare
    namespaces, pos)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 82, in attach
    return cls(value, template, namespaces, *pos[1:]), stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 60, in __init__
    self.expr = self._parse_expr(value, template, lineno, offset)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 109, in _parse_expr
    lookup=template.lookup) or None
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_boolop_and (genshi.template.tests.eval.ExpressionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/eval.py", line 194, in test_boolop_and
    self.assertEqual(False, Expression("True and False").evaluate({}))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 515, in _f
    f(self, node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 525, in visit_BoolOp
    self.visit(node.values[0])
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_boolop_or (genshi.template.tests.eval.ExpressionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/eval.py", line 199, in test_boolop_or
    self.assertEqual(True, Expression("True or False").evaluate({}))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 515, in _f
    f(self, node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 525, in visit_BoolOp
    self.visit(node.values[0])
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_unaryop_not (genshi.template.tests.eval.ExpressionTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/eval.py", line 118, in test_unaryop_not
    self.assertEqual(False, Expression("not True").evaluate({}))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 562, in visit_UnaryOp
    self.visit(node.operand)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_def_with_multiple_statements (genshi.template.tests.eval.SuiteTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/eval.py", line 525, in test_def_with_multiple_statements
    """)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 100, in visit_Module
    self.visit(n)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 170, in visit_FunctionDef
    self.visit(statement)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 283, in visit_If
    self.visit(node.test)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_finally (genshi.template.tests.eval.SuiteTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/eval.py", line 731, in test_finally
    """)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 100, in visit_Module
    self.visit(n)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 428, in visit_Try
    self.visit(statement)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 213, in visit_Assign
    self.visit(node.value)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_if (genshi.template.tests.eval.SuiteTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/eval.py", line 706, in test_if
    """)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 100, in visit_Module
    self.visit(n)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 287, in visit_If
    self.visit(statement)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 213, in visit_Assign
    self.visit(node.value)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_try_except (genshi.template.tests.eval.SuiteTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/eval.py", line 721, in test_try_except
    somemod.dosth()""")
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 100, in visit_Module
    self.visit(n)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 415, in visit_Try
    self.visit(handler)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 383, in visit_ExceptHandler
    self.visit(statement)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 213, in visit_Assign
    self.visit(node.value)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_yield_expression (genshi.template.tests.eval.SuiteTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/eval.py", line 858, in test_yield_expression
    """)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 100, in visit_Module
    self.visit(n)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 170, in visit_FunctionDef
    self.visit(statement)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 269, in visit_While
    self.visit(statement)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 283, in visit_If
    self.visit(node.test)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 515, in _f
    f(self, node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 647, in visit_Compare
    self.visit(comparator)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
ERROR: test_include_fallback_with_directive (genshi.template.tests.markup.MarkupTemplateTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 504, in _prepare
    cls=cls or self.__class__)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/loader.py", line 246, in load
    raise TemplateNotFound(filename, search_path)
genshi.template.loader.TemplateNotFound: Template "tmpl1.html" not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/tests/markup.py", line 525, in test_include_fallback_with_directive
    </html>""", tmpl.generate(debug=True).render(encoding=None))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 544, in generate
    stream = self.stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 454, in stream
    self._stream = list(self._prepare(self._stream))
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 510, in _prepare
    for event in self._prepare(fallback):
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 485, in _prepare
    namespaces, pos)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 397, in attach
    namespaces, pos)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 82, in attach
    return cls(value, template, namespaces, *pos[1:]), stream
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 60, in __init__
    self.expr = self._parse_expr(value, template, lineno, offset)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 109, in _parse_expr
    lookup=template.lookup) or None
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
    new_source = ASTCodeGenerator(tree).code
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
    self.visit(tree)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
    ret = visitor(node)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
    return self.visit(node.body)
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.NameConstant'>

======================================================================
FAIL: StripDirective (genshi.template.directives)
Doctest: genshi.template.directives.StripDirective
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.4/doctest.py", line 2187, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for genshi.template.directives.StripDirective
  File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 495, in StripDirective

----------------------------------------------------------------------
File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 505, in genshi.template.directives.StripDirective
Failed example:
    print((tmpl.generate()))
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.4/doctest.py", line 1318, in __run
        compileflags, 1), test.globs)
      File "<doctest genshi.template.directives.StripDirective[2]>", line 1, in <module>
        print((tmpl.generate()))
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 544, in generate
        stream = self.stream
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 454, in stream
        self._stream = list(self._prepare(self._stream))
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/base.py", line 485, in _prepare
        namespaces, pos)
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 82, in attach
        return cls(value, template, namespaces, *pos[1:]), stream
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 60, in __init__
        self.expr = self._parse_expr(value, template, lineno, offset)
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/directives.py", line 109, in _parse_expr
        lookup=template.lookup) or None
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 94, in __init__
        filename=filename, lineno=lineno, xform=xform)
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/eval.py", line 464, in _compile
        new_source = ASTCodeGenerator(tree).code
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 45, in __init__
        self.visit(tree)
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 93, in visit
        ret = visitor(node)
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 106, in visit_Expression
        return self.visit(node.body)
      File "/«PKGBUILDDIR»/.pybuild/pythonX.Y_3.4/build/genshi/template/astutil.py", line 92, in visit
        raise Exception('Unhandled node type %r' % type(node))
    Exception: Unhandled node type <class '_ast.NameConstant'>


----------------------------------------------------------------------
Ran 858 tests in 1.181s

FAILED (failures=1, errors=18, skipped=1)

comment:4 Changed 10 years ago by hodgestar

  • Owner changed from cmlenz to hodgestar
  • Status changed from new to assigned

comment:5 Changed 10 years ago by hodgestar

There are a bunch more places this new AST node will have to be handled. Thankfully we've done this a bunch of times before (so there are already a variety of compatibility hooks for this kind of thing in place). I'll try make a better patch this evening. Thanks for poking this.

comment:6 Changed 10 years ago by barry

Just wondering if there's any status on this issue?

comment:7 Changed 10 years ago by hodgestar

Test suite now passes. Changes made so far:

  • r1245: Work around for Python 3.4 regression in pickle (http://bugs.python.org/issue16251).
  • r1246: Also allow stripping of unsafe script tags (Python 3.4 parses the second example as a tag whose name is script&xyz).
  • r1247: Disable the speedups C extension on CPython >= 3.3 since Genshi doesn't support the new Unicode C API yet.
  • r1248: Add isstring helper.
  • r1249: Add support for Python 3.4 AST (support for NameConstants and changes to existing to arguments node attributes).

Support is still needed for the new kwonlyargs and kw_defaults attributes of the AST arguments node.

Reviews of AST changes by those interested appreciated.

comment:8 Changed 10 years ago by hodgestar

Benjamin fixed the pickle issue in http://hg.python.org/cpython/rev/b328f8ccbccf so r1245 can be reverted.

comment:9 Changed 10 years ago by hodgestar

Support for kwonlyargs and kw_defaults added in r1250.

Still to do:

  • revert r1245
  • run full test suite inside tox on all supported Python versions
  • merge to 0.7.x branch

comment:10 Changed 10 years ago by hodgestar

r1245 was reverted in r1251.

comment:11 Changed 10 years ago by barry

I'll try to cherry pick the changes into the Debian package and see if that helps. Of course, a new upstream release with Python 3.4 support would be best. Thanks for working on this fix!

comment:12 Changed 10 years ago by hodgestar

  • Resolution set to fixed
  • Status changed from assigned to closed

Tests look good. Merged into 0.7.x in r1252.

Note: See TracTickets for help on using tickets.