Codebase list jinja2 / 3e33997
Imported Debian patch 2.2.1-1 Piotr Ożarowski 14 years ago
41 changed file(s) with 67 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
00 Jinja2 Changelog
11 ================
2
3 Version 2.2.1
4 -------------
5 (bugfix release, released on September 14th 2009)
6
7 - fixes some smaller problems for Jinja2 on Jython.
28
39 Version 2.2
410 -----------
2026 - Added support for optional `scoped` modifier to blocks.
2127 - Added support for line-comments.
2228 - Added the `meta` module.
23 - Renamed (undocumented) attribute overlay to overlayed on the environment
24 because it was clashing with a method of the same name. The new attribute
25 is called "overlayed".
29 - Renamed (undocumented) attribute "overlay" to "overlayed" on the
30 environment because it was clashing with a method of the same name.
31 - speedup extension is now disabled by default.
2632
2733 Version 2.1.1
2834 -------------
00 Metadata-Version: 1.0
11 Name: Jinja2
2 Version: 2.2
2 Version: 2.2.1
33 Summary: A small but fast and easy to use stand-alone template engine written in pure python.
44 Home-page: http://jinja.pocoo.org/
55 Author: Armin Ronacher
161161 jinja2/tests.py
162162 jinja2/utils.py
163163 jinja2/visitor.py
164 tests/test_debug$py.class
164165 tests/test_debug.py
165166 tests/test_debug.pyc
167 tests/test_ext$py.class
166168 tests/test_ext.py
167169 tests/test_ext.pyc
170 tests/test_filters$py.class
168171 tests/test_filters.py
169172 tests/test_filters.pyc
173 tests/test_forloop$py.class
170174 tests/test_forloop.py
171175 tests/test_forloop.pyc
176 tests/test_heavy$py.class
172177 tests/test_heavy.py
173178 tests/test_heavy.pyc
179 tests/test_i18n$py.class
174180 tests/test_i18n.py
175181 tests/test_i18n.pyc
182 tests/test_ifcondition$py.class
176183 tests/test_ifcondition.py
177184 tests/test_ifcondition.pyc
185 tests/test_imports$py.class
178186 tests/test_imports.py
179187 tests/test_imports.pyc
188 tests/test_inheritance$py.class
180189 tests/test_inheritance.py
181190 tests/test_inheritance.pyc
191 tests/test_lexer$py.class
182192 tests/test_lexer.py
183193 tests/test_lexer.pyc
194 tests/test_loaders$py.class
184195 tests/test_loaders.py
185196 tests/test_loaders.pyc
197 tests/test_lrucache$py.class
186198 tests/test_lrucache.py
187199 tests/test_lrucache.pyc
200 tests/test_macros$py.class
188201 tests/test_macros.py
189202 tests/test_macros.pyc
203 tests/test_meta$py.class
190204 tests/test_meta.py
191205 tests/test_meta.pyc
206 tests/test_old_bugs$py.class
192207 tests/test_old_bugs.py
193208 tests/test_old_bugs.pyc
209 tests/test_parser$py.class
194210 tests/test_parser.py
195211 tests/test_parser.pyc
212 tests/test_security$py.class
196213 tests/test_security.py
197214 tests/test_security.pyc
215 tests/test_streaming$py.class
198216 tests/test_streaming.py
199217 tests/test_streaming.pyc
218 tests/test_syntax$py.class
200219 tests/test_syntax.py
201220 tests/test_syntax.pyc
221 tests/test_tests$py.class
202222 tests/test_tests.py
203223 tests/test_tests.pyc
224 tests/test_undefined$py.class
204225 tests/test_undefined.py
205226 tests/test_undefined.pyc
227 tests/test_various$py.class
206228 tests/test_various.py
207229 tests/test_various.pyc
230 tests/loaderres/__init__$py.class
208231 tests/loaderres/__init__.py
209232 tests/loaderres/__init__.pyc
210233 tests/loaderres/templates/broken.html
211234 tests/loaderres/templates/syntaxerror.html
212235 tests/loaderres/templates/test.html
213 tests/loaderres/templates/foo/test.html
236 tests/loaderres/templates/foo/test.html
00 Metadata-Version: 1.0
11 Name: Jinja2
2 Version: 2.2
2 Version: 2.2.1
33 Summary: A small but fast and easy to use stand-alone template engine written in pure python.
44 Home-page: http://jinja.pocoo.org/
55 Author: Armin Ronacher
0 jinja2 (2.2.1-1) unstable; urgency=low
1
2 * New upstream release
3
4 -- Piotr Ożarowski <piotr@debian.org> Tue, 15 Sep 2009 19:38:47 +0200
5
06 jinja2 (2.2-1) unstable; urgency=low
17
28 [ Jakub Wilk ]
4141 circumvented by passing the ``--without-speedups`` command line argument to the
4242 setup script::
4343
44 $ python setup.py install --with-speedups
44 $ python setup.py --with-speedups install
4545
4646 (As of Jinja 2.2, the speedups are disabled by default and can be enabled
4747 with ``--with-speedups``. See :ref:`enable-speedups`)
121121 You can enable the speedups extension when installing using the
122122 ``--with-speedups`` flag::
123123
124 sudo python setup.py install --with-speedups
124 sudo python setup.py --with-speedups install
125125
126 You can also pass this parameter to `pip`::
127
128 $ pip install --install-option='--with-speedups' Jinja2
129126
130127
131128 Basic API Usage
408408 <li>{% block loop_item scoped %}{{ item }}{% endblock %}</li>
409409 {% endfor %}
410410
411 When overriding a block the `scoped` modifier does not have to be provided.
411 When overriding a block the `scoped` modifier does not have to be provided.
412412
413413
414414 HTML Escaping
88 Inspired by chartypes_create.py from the MoinMoin project, original
99 implementation from Pygments.
1010
11 :copyright: Copyright 2006-2009 by the Jinja2 team, see AUTHORS.
11 :copyright: Copyright 2006-2009 by the Jinja team, see AUTHORS.
1212 :license: BSD, see LICENSE for details.
1313 """
1414
654654 # leaking into a new python frame and might be used both unassigned
655655 # and assigned.
656656 if 'loop' in frame.identifiers.declared:
657 args.append('l_loop=l_loop')
657 args = args + ['l_loop=l_loop']
658658 self.writeline('def macro(%s):' % ', '.join(args), node)
659659 self.indent()
660660 self.buffer(frame)
55 This module implements various functions that exposes information about
66 templates that might be interesting for various kinds of applications.
77
8 :copyright: (c) 2009 by the Jinja2 Team, see AUTHORS for more details.
8 :copyright: (c) 2009 by the Jinja Team, see AUTHORS for more details.
99 :license: BSD, see LICENSE for more details.
1010 """
1111 from jinja2 import nodes
612612 if self._queue[-1] != key:
613613 try:
614614 self._remove(key)
615 except:
615 except ValueError:
616616 # if something removed the key from the container
617617 # when we read, ignore the ValueError that we would
618618 # get otherwise.
642642 self._wlock.acquire()
643643 try:
644644 del self._mapping[key]
645 self._remove(key)
645 try:
646 self._remove(key)
647 except ValueError:
648 # __getitem__ is not locked, it might happen
649 pass
646650 finally:
647651 self._wlock.release()
648652
4848
4949 setup(
5050 name='Jinja2',
51 version='2.2',
51 version='2.2.1',
5252 url='http://jinja.pocoo.org/',
5353 license='BSD',
5454 author='Armin Ronacher',
Binary diff not shown
Binary diff not shown
1414 importable_object = 23
1515
1616
17 _gettext_re = re.compile(r'_\((.*?)\)')
17 _gettext_re = re.compile(r'_\((.*?)\)(?s)')
1818
1919
2020 class TestExtension(Extension):
4848
4949 def filter_stream(self, stream):
5050 for token in stream:
51 if token.type is 'data':
51 if token.type == 'data':
5252 for t in self.interpolate(token):
5353 yield t
5454 else:
131131
132132 def test_streamfilter_extension():
133133 env = Environment(extensions=[StreamFilterExtension])
134 env.globals['gettext'] = lambda x: x.title()
134 env.globals['gettext'] = lambda x: x.upper()
135135 tmpl = env.from_string('Foo _(bar) Baz')
136 assert tmpl.render() == 'Foo Bar Baz'
136 out = tmpl.render()
137 assert out == 'Foo BAR Baz'
137138
138139
139140 class WithExtension(Extension):
Binary diff not shown
8888
8989 def test_dictsort():
9090 tmpl = env.from_string(DICTSORT)
91 out = tmpl.render(foo={"a": 0, "b": 1, "c": 2, "A": 3})
92 assert out == ("[('a', 0), ('A', 3), ('b', 1), ('c', 2)]|"
93 "[('A', 3), ('a', 0), ('b', 1), ('c', 2)]|"
94 "[('a', 0), ('b', 1), ('c', 2), ('A', 3)]")
91 out = tmpl.render(foo={"aa": 0, "b": 1, "c": 2, "AB": 3})
92 assert out == ("[('aa', 0), ('AB', 3), ('b', 1), ('c', 2)]|"
93 "[('AB', 3), ('aa', 0), ('b', 1), ('c', 2)]|"
94 "[('aa', 0), ('b', 1), ('c', 2), ('AB', 3)]")
9595
9696
9797 def test_batch():
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
1010 from jinja2.utils import Cycler
1111 from jinja2.exceptions import TemplateSyntaxError
1212
13 from nose import SkipTest
1314 from nose.tools import assert_raises
1415
1516 env = Environment()
5253
5354
5455 def test_markup_leaks():
56 # this test only tests the c extension
57 if hasattr(escape, 'func_code'):
58 raise SkipTest()
5559 counts = set()
5660 for count in xrange(20):
5761 for item in xrange(1000):
Binary diff not shown