Imported Debian patch 2.2.1-1
Piotr Ożarowski
14 years ago
0 | 0 | Jinja2 Changelog |
1 | 1 | ================ |
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. | |
2 | 8 | |
3 | 9 | Version 2.2 |
4 | 10 | ----------- |
20 | 26 | - Added support for optional `scoped` modifier to blocks. |
21 | 27 | - Added support for line-comments. |
22 | 28 | - 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. | |
26 | 32 | |
27 | 33 | Version 2.1.1 |
28 | 34 | ------------- |
0 | 0 | Metadata-Version: 1.0 |
1 | 1 | Name: Jinja2 |
2 | Version: 2.2 | |
2 | Version: 2.2.1 | |
3 | 3 | Summary: A small but fast and easy to use stand-alone template engine written in pure python. |
4 | 4 | Home-page: http://jinja.pocoo.org/ |
5 | 5 | Author: Armin Ronacher |
161 | 161 | jinja2/tests.py |
162 | 162 | jinja2/utils.py |
163 | 163 | jinja2/visitor.py |
164 | tests/test_debug$py.class | |
164 | 165 | tests/test_debug.py |
165 | 166 | tests/test_debug.pyc |
167 | tests/test_ext$py.class | |
166 | 168 | tests/test_ext.py |
167 | 169 | tests/test_ext.pyc |
170 | tests/test_filters$py.class | |
168 | 171 | tests/test_filters.py |
169 | 172 | tests/test_filters.pyc |
173 | tests/test_forloop$py.class | |
170 | 174 | tests/test_forloop.py |
171 | 175 | tests/test_forloop.pyc |
176 | tests/test_heavy$py.class | |
172 | 177 | tests/test_heavy.py |
173 | 178 | tests/test_heavy.pyc |
179 | tests/test_i18n$py.class | |
174 | 180 | tests/test_i18n.py |
175 | 181 | tests/test_i18n.pyc |
182 | tests/test_ifcondition$py.class | |
176 | 183 | tests/test_ifcondition.py |
177 | 184 | tests/test_ifcondition.pyc |
185 | tests/test_imports$py.class | |
178 | 186 | tests/test_imports.py |
179 | 187 | tests/test_imports.pyc |
188 | tests/test_inheritance$py.class | |
180 | 189 | tests/test_inheritance.py |
181 | 190 | tests/test_inheritance.pyc |
191 | tests/test_lexer$py.class | |
182 | 192 | tests/test_lexer.py |
183 | 193 | tests/test_lexer.pyc |
194 | tests/test_loaders$py.class | |
184 | 195 | tests/test_loaders.py |
185 | 196 | tests/test_loaders.pyc |
197 | tests/test_lrucache$py.class | |
186 | 198 | tests/test_lrucache.py |
187 | 199 | tests/test_lrucache.pyc |
200 | tests/test_macros$py.class | |
188 | 201 | tests/test_macros.py |
189 | 202 | tests/test_macros.pyc |
203 | tests/test_meta$py.class | |
190 | 204 | tests/test_meta.py |
191 | 205 | tests/test_meta.pyc |
206 | tests/test_old_bugs$py.class | |
192 | 207 | tests/test_old_bugs.py |
193 | 208 | tests/test_old_bugs.pyc |
209 | tests/test_parser$py.class | |
194 | 210 | tests/test_parser.py |
195 | 211 | tests/test_parser.pyc |
212 | tests/test_security$py.class | |
196 | 213 | tests/test_security.py |
197 | 214 | tests/test_security.pyc |
215 | tests/test_streaming$py.class | |
198 | 216 | tests/test_streaming.py |
199 | 217 | tests/test_streaming.pyc |
218 | tests/test_syntax$py.class | |
200 | 219 | tests/test_syntax.py |
201 | 220 | tests/test_syntax.pyc |
221 | tests/test_tests$py.class | |
202 | 222 | tests/test_tests.py |
203 | 223 | tests/test_tests.pyc |
224 | tests/test_undefined$py.class | |
204 | 225 | tests/test_undefined.py |
205 | 226 | tests/test_undefined.pyc |
227 | tests/test_various$py.class | |
206 | 228 | tests/test_various.py |
207 | 229 | tests/test_various.pyc |
230 | tests/loaderres/__init__$py.class | |
208 | 231 | tests/loaderres/__init__.py |
209 | 232 | tests/loaderres/__init__.pyc |
210 | 233 | tests/loaderres/templates/broken.html |
211 | 234 | tests/loaderres/templates/syntaxerror.html |
212 | 235 | tests/loaderres/templates/test.html |
213 | tests/loaderres/templates/foo/test.html⏎ | |
236 | tests/loaderres/templates/foo/test.html |
0 | 0 | Metadata-Version: 1.0 |
1 | 1 | Name: Jinja2 |
2 | Version: 2.2 | |
2 | Version: 2.2.1 | |
3 | 3 | Summary: A small but fast and easy to use stand-alone template engine written in pure python. |
4 | 4 | Home-page: http://jinja.pocoo.org/ |
5 | 5 | 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 | ||
0 | 6 | jinja2 (2.2-1) unstable; urgency=low |
1 | 7 | |
2 | 8 | [ Jakub Wilk ] |
41 | 41 | circumvented by passing the ``--without-speedups`` command line argument to the |
42 | 42 | setup script:: |
43 | 43 | |
44 | $ python setup.py install --with-speedups | |
44 | $ python setup.py --with-speedups install | |
45 | 45 | |
46 | 46 | (As of Jinja 2.2, the speedups are disabled by default and can be enabled |
47 | 47 | with ``--with-speedups``. See :ref:`enable-speedups`) |
121 | 121 | You can enable the speedups extension when installing using the |
122 | 122 | ``--with-speedups`` flag:: |
123 | 123 | |
124 | sudo python setup.py install --with-speedups | |
124 | sudo python setup.py --with-speedups install | |
125 | 125 | |
126 | You can also pass this parameter to `pip`:: | |
127 | ||
128 | $ pip install --install-option='--with-speedups' Jinja2 | |
129 | 126 | |
130 | 127 | |
131 | 128 | Basic API Usage |
408 | 408 | <li>{% block loop_item scoped %}{{ item }}{% endblock %}</li> |
409 | 409 | {% endfor %} |
410 | 410 | |
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. | |
412 | 412 | |
413 | 413 | |
414 | 414 | HTML Escaping |
8 | 8 | Inspired by chartypes_create.py from the MoinMoin project, original |
9 | 9 | implementation from Pygments. |
10 | 10 | |
11 | :copyright: Copyright 2006-2009 by the Jinja2 team, see AUTHORS. | |
11 | :copyright: Copyright 2006-2009 by the Jinja team, see AUTHORS. | |
12 | 12 | :license: BSD, see LICENSE for details. |
13 | 13 | """ |
14 | 14 |
654 | 654 | # leaking into a new python frame and might be used both unassigned |
655 | 655 | # and assigned. |
656 | 656 | if 'loop' in frame.identifiers.declared: |
657 | args.append('l_loop=l_loop') | |
657 | args = args + ['l_loop=l_loop'] | |
658 | 658 | self.writeline('def macro(%s):' % ', '.join(args), node) |
659 | 659 | self.indent() |
660 | 660 | self.buffer(frame) |
5 | 5 | This module implements various functions that exposes information about |
6 | 6 | templates that might be interesting for various kinds of applications. |
7 | 7 | |
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. | |
9 | 9 | :license: BSD, see LICENSE for more details. |
10 | 10 | """ |
11 | 11 | from jinja2 import nodes |
612 | 612 | if self._queue[-1] != key: |
613 | 613 | try: |
614 | 614 | self._remove(key) |
615 | except: | |
615 | except ValueError: | |
616 | 616 | # if something removed the key from the container |
617 | 617 | # when we read, ignore the ValueError that we would |
618 | 618 | # get otherwise. |
642 | 642 | self._wlock.acquire() |
643 | 643 | try: |
644 | 644 | 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 | |
646 | 650 | finally: |
647 | 651 | self._wlock.release() |
648 | 652 |
48 | 48 | |
49 | 49 | setup( |
50 | 50 | name='Jinja2', |
51 | version='2.2', | |
51 | version='2.2.1', | |
52 | 52 | url='http://jinja.pocoo.org/', |
53 | 53 | license='BSD', |
54 | 54 | author='Armin Ronacher', |
Binary diff not shown
Binary diff not shown
Binary diff not shown
14 | 14 | importable_object = 23 |
15 | 15 | |
16 | 16 | |
17 | _gettext_re = re.compile(r'_\((.*?)\)') | |
17 | _gettext_re = re.compile(r'_\((.*?)\)(?s)') | |
18 | 18 | |
19 | 19 | |
20 | 20 | class TestExtension(Extension): |
48 | 48 | |
49 | 49 | def filter_stream(self, stream): |
50 | 50 | for token in stream: |
51 | if token.type is 'data': | |
51 | if token.type == 'data': | |
52 | 52 | for t in self.interpolate(token): |
53 | 53 | yield t |
54 | 54 | else: |
131 | 131 | |
132 | 132 | def test_streamfilter_extension(): |
133 | 133 | env = Environment(extensions=[StreamFilterExtension]) |
134 | env.globals['gettext'] = lambda x: x.title() | |
134 | env.globals['gettext'] = lambda x: x.upper() | |
135 | 135 | tmpl = env.from_string('Foo _(bar) Baz') |
136 | assert tmpl.render() == 'Foo Bar Baz' | |
136 | out = tmpl.render() | |
137 | assert out == 'Foo BAR Baz' | |
137 | 138 | |
138 | 139 | |
139 | 140 | class WithExtension(Extension): |
Binary diff not shown
Binary diff not shown
88 | 88 | |
89 | 89 | def test_dictsort(): |
90 | 90 | 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)]") | |
95 | 95 | |
96 | 96 | |
97 | 97 | 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
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
Binary diff not shown
Binary diff not shown
10 | 10 | from jinja2.utils import Cycler |
11 | 11 | from jinja2.exceptions import TemplateSyntaxError |
12 | 12 | |
13 | from nose import SkipTest | |
13 | 14 | from nose.tools import assert_raises |
14 | 15 | |
15 | 16 | env = Environment() |
52 | 53 | |
53 | 54 | |
54 | 55 | def test_markup_leaks(): |
56 | # this test only tests the c extension | |
57 | if hasattr(escape, 'func_code'): | |
58 | raise SkipTest() | |
55 | 59 | counts = set() |
56 | 60 | for count in xrange(20): |
57 | 61 | for item in xrange(1000): |
Binary diff not shown