diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2010-02-10 02:13:51 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2010-02-10 02:13:51 +0100 |
commit | 1540b2bae3ebe4c3ef5df0cf7236104a3ada6e3c (patch) | |
tree | 4374b93ac41bc1cfb87ed6e7a8d198eb678e9c4b | |
parent | eb43b12f8198300d1d9c834d513b4a78ac697c6e (diff) | |
download | jinja-1540b2bae3ebe4c3ef5df0cf7236104a3ada6e3c.tar.gz |
Broke a test for 2.x :)
--HG--
branch : trunk
-rw-r--r-- | MANIFEST.in | 3 | ||||
-rw-r--r-- | TODO | 39 | ||||
-rw-r--r-- | jinja2/testsuite/debug.py | 3 |
3 files changed, 3 insertions, 42 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index b341589c..9bebc131 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ -include MANIFEST.in Makefile CHANGES LICENSE AUTHORS TODO ez_setup.py +include MANIFEST.in Makefile CHANGES LICENSE AUTHORS recursive-include docs * +recursive-include custom_fixers * recursive-include tests * recursive-include ext * recursive-include artwork * @@ -1,39 +0,0 @@ -Todo Before Release -=================== - -This has to be implemented before the release: - -Pull Attributes Onces ---------------------- - -Imagine the following template:: - - {% if foo.bar %} - {{ baz(foo.bar) }} - {% endif %} - -Problem with that is that it compiles to this:: - - if environment.subscribe(l_foo, 'bar'): - if 0: yield None - yield u'\n %s\n' % ( - l_baz(environment.subscribe(l_foo, 'bar')), - ) - -As `environment.subscribe` is more expensive then regular attribute lookups -(it tries getitem/getattr and in sandbox mode also permissions) multiple -lookups with the same parameters in the same scope should get local aliases. -The result we have is that one:: - - t1 = environment.subscribe(l_foo, 'bar') - if t1: - if 0: yield None - yield u'\n %s\n' % ( - l_baz(t1), - ) - -However that should only happen if the attribute is accessed multiple times -unlike locals and filters/tests which are always pulled. We're not doing that -for filters/tests/locals as nested scopes may access it and testing is too -complicated for the tiny performance improvement but easy for attribute -lookups, keeping the complexity of the whole thing in mind. diff --git a/jinja2/testsuite/debug.py b/jinja2/testsuite/debug.py index 0c941933..ee794981 100644 --- a/jinja2/testsuite/debug.py +++ b/jinja2/testsuite/debug.py @@ -38,8 +38,7 @@ ZeroDivisionError: int(eger)? division or modulo by zero # be fixed though. self.assert_traceback_matches(lambda: env.get_template('syntaxerror.html'), r'''(?sm) File ".*?syntaxerror.html", line 4, in (template|<module>) - \{% endif %\} - .*? + \{% endif %\}.*? (jinja2\.exceptions\.)?TemplateSyntaxError: Encountered unknown tag 'endif'. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'. ''') |