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 d927c88, 8df94bd · Browse files · 3 files+10 added−3 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+10 added−3 removed

  • tests:+4 added−0 removed
  • other:+6 added−3 removed

3 files+10 added−3 removed

modified:jinja2/compiler.py+4 added-3 removed
759 unmodified lines
760 if not self.has_known_extends:761 self.indent()762 self.writeline('if parent_template is not None:')763 self.indent()764 if supports_yield_from:764 if supports_yield_from and not self.environment.is_async:765 self.writeline('yield from parent_template.'766 'root_render_func(context)')767 else:768 self.writeline('for event in parent_template.'769 'root_render_func(context):')768 self.writeline('%sfor event in parent_template.'769 'root_render_func(context):' %770 (self.environment.is_async and 'async ' or ''))771 self.indent()772 self.writeline('yield event')773 self.outdent()774 self.outdent(1 + (not self.has_known_extends))
923 unmodified lines
modified:tests/test_async.py+4 added
462 unmodified lines
463 '<url><loc>/</loc></url>',464 '<url><loc>/bar</loc></url>',465 '</urlset>',466 ]467468 def test_bare_async(self, test_env_async):469 t = test_env_async.from_string('{% extends "header" %}')470 assert t.render(foo=42) == '[42|23]'
modified:CHANGES+2 added
21 unmodified lines
22 regression.23- Correctly use the buffer for the else block of for loops. This caused24 invalid syntax errors to be caused on 2.x and completely wrong behavior25 on Python 3 (#669)26- Resolve an issue where the `{% extends %}` tag could not be used with27 async environments. (#668)2829Version 2.9.430-------------31(bugfix release, released on January 10th 2017)
480 unmodified lines