﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
590,"""yield from"" expression is unsupported in template",vagran.ast@…,hodgestar,"Version 0.7.

I have such snippet in a template:

{{{
<?python
def GetParentList(catList, nesting):
    for c in catList:
        if c.id == cat.id:
            continue
        c.nesting = nesting
        yield c
        yield from GetParentList(c.children, nesting + 1)
?>
}}}

which causes exception:

{{{
File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/loader.py"", line 236, in load
    filename, encoding=encoding)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/loader.py"", line 274, in _instantiate
    allow_exec=self.allow_exec)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/markup.py"", line 67, in __init__
    allow_exec=allow_exec)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/base.py"", line 418, in __init__
    self._stream = self._parse(source, encoding)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/markup.py"", line 95, in _parse
    lookup=self.lookup)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/eval.py"", line 93, in __init__
    filename=filename, lineno=lineno, xform=xform)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/eval.py"", line 463, in _compile
    new_source = ASTCodeGenerator(tree).code
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 43, in __init__
    self.visit(tree)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 91, in visit
    ret = visitor(node)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 98, in visit_Module
    self.visit(n)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 91, in visit
    ret = visitor(node)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 156, in visit_FunctionDef
    self.visit(statement)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 91, in visit
    ret = visitor(node)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 237, in visit_For
    self.visit(statement)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 91, in visit
    ret = visitor(node)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 480, in visit_Expr
    self.visit(node.value)
  File ""/usr/local/lib/python3.3/dist-packages/Genshi-0.7-py3.3-linux-x86_64.egg/genshi/template/astutil.py"", line 90, in visit
    raise Exception('Unhandled node type %r' % type(node))
Exception: Unhandled node type <class '_ast.YieldFrom'>
}}}
",defect,new,major,0.8,Template processing,0.6,,python3,
