Skip to content
Myr

Merge branch '2.9-maintenance'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parents 9949832, e73c574 · Browse files · 3 files+8 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+8 added−2 removed

  • tests:+4 added−0 removed
  • other:+4 added−2 removed

3 files+8 added−2 removed

modified:jinja2/compiler.py+1 added-2 removed
371 unmodified lines
372 """Visit a list of nodes as block in a frame. If the current frame373 is no buffer a dummy ``if 0: yield None`` is written automatically.374 """375 try:376 if not nodes:377 self.writeline('pass')376 self.writeline('pass')377 for node in nodes:378 self.visit(node, frame)379 except CompilerExit:380 pass
1313 unmodified lines
modified:tests/test_regression.py+4 added
477 unmodified lines
478 '<url><loc>/</loc></url>',479 '<url><loc>/bar</loc></url>',480 '</urlset>',481 ]482483 def test_empty_if(self, env):484 t = env.from_string('{% if foo %}{% else %}42{% endif %}')485 assert t.render(foo=False) == '42'
modified:CHANGES+3 added
15 unmodified lines
16- Solved some warnings for string literals. (#646)17- Increment the bytecode cache version which was not done due to an18 oversight before.19- Corrected bad code generation and scoping for filtered loops. (#649)20- Resolved an issue where top-level output silencing after known extend21 blocks could generate invalid code when blocks where contained in if22 statements. (#651)2324Version 2.9.325-------------26(bugfix release, released on January 8th 2017)
466 unmodified lines