Jinja2 2.9 introduces change with free variables in loops that breaks Lektor #649
Using Lektor 2.3; If you have a project with a sitemap (using the template suggested by the Lektor docs):
and you have jinja2 2.9 - 2.9.3, in your environment, you get a build error:
Downgrading to Jinja2 2.8.1 seems to resolve the problem.
Reporting there because it would seem to be a regression in Jinja2; however, it's also been reported as lektor/lektor#343 in case it's a usage error.
Second note to self: the old and new compilation for loop filters is unsound. It compiles to two different modes depending on the extended loop flag but which on the generated code side produces different scoping rules. In extended loops a new frame is needed according to the generated code, in non extended looping the scope can be reused.
However if the latter compilation mode is actually valid is unclear and needs to be investigated.