Run `./2to3.py -w jinja2`
[jinja2.git] / CHANGES
1 Jinja2 Changelog
2 ================
3
4 Version 2.7
5 -----------
6 (codename to be selected, release date to be announced)
7
8 - Choice and prefix loaders now dispatch source and template lookup
9   separately in order to work in combination with module loaders as
10   advertised.
11 - Fixed filesizeformat.
12 - Added a non-silent option for babel extraction.
13 - Added `urlencode` filter that automatically quotes values for
14   URL safe usage with utf-8 as only supported encoding.  If applications
15   want to change this encoding they can override the filter.
16 - Accessing `last` on the loop context no longer causes the iterator
17   to be consumed into a list.
18
19 Version 2.6
20 -----------
21 (codename Convolution, released on July 24th 2011)
22
23 - internal attributes now raise an internal attribute error now instead
24   of returning an undefined.  This fixes problems when passing undefined
25   objects to Python semantics expecting APIs.
26 - traceback support now works properly for PyPy.  (Tested with 1.4)
27 - implemented operator intercepting for sandboxed environments.  This
28   allows application developers to disable builtin operators for better
29   security.  (For instance limit the mathematical operators to actual
30   integers instead of longs)
31 - groupby filter now supports dotted notation for grouping by attributes
32   of attributes.
33 - scoped blocks now properly treat toplevel assignments and imports.
34   Previously an import suddenly "disappeared" in a scoped block.
35 - automatically detect newer Python interpreter versions before loading code
36   from bytecode caches to prevent segfaults on invalid opcodes.  The segfault
37   in earlier Jinja2 versions here was not a Jinja2 bug but a limitation in
38   the underlying Python interpreter.  If you notice Jinja2 segfaulting in
39   earlier versions after an upgrade of the Python interpreter you don't have
40   to upgrade, it's enough to flush the bytecode cache.  This just no longer
41   makes this necessary, Jinja2 will automatically detect these cases now.
42 - the sum filter can now sum up values by attribute.  This is a backwards
43   incompatible change.  The argument to the filter previously was the
44   optional starting index which defaultes to zero.  This now became the
45   second argument to the function because it's rarely used.
46 - like sum, sort now also makes it possible to order items by attribute.
47 - like sum and sort, join now also is able to join attributes of objects
48   as string.
49 - the internal eval context now has a reference to the environment.
50 - added a mapping test to see if an object is a dict or an object with
51   a similar interface.
52
53 Version 2.5.5
54 -------------
55 (re-release of 2.5.4 with built documentation removed for filesize.
56  Released on October 18th 2010)
57
58 - built documentation is no longer part of release.
59
60 Version 2.5.4
61 -------------
62 (bugfix release, released on October 17th 2010)
63
64 - Fixed extensions not loading properly with overlays.
65 - Work around a bug in cpython for the debugger that causes segfaults
66   on 64bit big-endian architectures.
67
68 Version 2.5.3
69 -------------
70 (bugfix release, released on October 17th 2010)
71
72 - fixed an operator precedence error introduced in 2.5.2.  Statements
73   like "-foo.bar" had their implicit parentheses applied around the
74   first part of the expression ("(-foo).bar") instead of the more
75   correct "-(foo.bar)".
76
77 Version 2.5.2
78 -------------
79 (bugfix release, released on August 18th 2010)
80
81 - improved setup.py script to better work with assumptions people
82   might still have from it (``--with-speedups``).
83 - fixed a packaging error that excluded the new debug support.
84
85 Version 2.5.1
86 -------------
87 (bugfix release, released on August 17th 2010)
88
89 - StopIteration exceptions raised by functions called from templates
90   are now intercepted and converted to undefineds.  This solves a
91   lot of debugging grief.  (StopIteration is used internally to
92   abort template execution)
93 - improved performance of macro calls slightly.
94 - babel extraction can now properly extract newstyle gettext calls.
95 - using the variable `num` in newstyle gettext for something else
96   than the pluralize count will no longer raise a :exc:`KeyError`.
97 - removed builtin markup class and switched to markupsafe.  For backwards
98   compatibility the pure Python implementation still exists but is
99   pulled from markupsafe by the Jinja2 developers.  The debug support
100   went into a separate feature called "debugsupport" and is disabled
101   by default because it is only relevant for Python 2.4
102 - fixed an issue with unary operators having the wrong precendence.
103
104 Version 2.5
105 -----------
106 (codename Incoherence, relased on May 29th 2010)
107
108 - improved the sort filter (should have worked like this for a
109   long time) by adding support for case insensitive searches.
110 - fixed a bug for getattribute constant folding.
111 - support for newstyle gettext translations which result in a
112   nicer in-template user interface and more consistent
113   catalogs. (:ref:`newstyle-gettext`)
114 - it's now possible to register extensions after an environment
115   was created.
116
117 Version 2.4.1
118 -------------
119 (bugfix release, released on April 20th 2010)
120
121 - fixed an error reporting bug for undefineds.
122
123 Version 2.4
124 -----------
125 (codename Correlation, released on April 13th 2010)
126
127 - the environment template loading functions now transparently
128   pass through a template object if it was passed to it.  This
129   makes it possible to import or extend from a template object
130   that was passed to the template.
131 - added a :class:`ModuleLoader` that can load templates from
132   precompiled sources.  The environment now features a method
133   to compile the templates from a configured loader into a zip
134   file or folder.
135 - the _speedups C extension now supports Python 3.
136 - added support for autoescaping toggling sections and support
137   for evaluation contexts (:ref:`eval-context`).
138 - extensions have a priority now.
139
140 Version 2.3.1
141 -------------
142 (bugfix release, released on February 19th 2010)
143
144 - fixed an error reporting bug on all python versions
145 - fixed an error reporting bug on Python 2.4
146
147 Version 2.3
148 -----------
149 (3000 Pythons, released on February 10th 2010)
150
151 - fixes issue with code generator that causes unbound variables
152   to be generated if set was used in if-blocks and other small
153   identifier problems.
154 - include tags are now able to select between multiple templates
155   and take the first that exists, if a list of templates is
156   given.
157 - fixed a problem with having call blocks in outer scopes that
158   have an argument that is also used as local variable in an
159   inner frame (#360).
160 - greatly improved error message reporting (#339)
161 - implicit tuple expressions can no longer be totally empty.
162   This change makes ``{% if %}...{% endif %}`` a syntax error
163   now. (#364)
164 - added support for translator comments if extracted via babel.
165 - added with-statement extension.
166 - experimental Python 3 support.
167
168 Version 2.2.1
169 -------------
170 (bugfix release, released on September 14th 2009)
171
172 - fixes some smaller problems for Jinja2 on Jython.
173
174 Version 2.2
175 -----------
176 (codename Kong, released on September 13th 2009)
177
178 - Include statements can now be marked with ``ignore missing`` to skip
179   non existing templates.
180 - Priority of `not` raised.  It's now possible to write `not foo in bar`
181   as an alias to `foo not in bar` like in python.  Previously the grammar
182   required parentheses (`not (foo in bar)`) which was odd.
183 - Fixed a bug that caused syntax errors when defining macros or using the
184   `{% call %}` tag inside loops.
185 - Fixed a bug in the parser that made ``{{ foo[1, 2] }}`` impossible.
186 - Made it possible to refer to names from outer scopes in included templates
187   that were unused in the callers frame (#327)
188 - Fixed a bug that caused internal errors if names where used as iteration
189   variable and regular variable *after* the loop if that variable was unused
190   *before* the loop.  (#331)
191 - Added support for optional `scoped` modifier to blocks.
192 - Added support for line-comments.
193 - Added the `meta` module.
194 - Renamed (undocumented) attribute "overlay" to "overlayed" on the
195   environment because it was clashing with a method of the same name.
196 - speedup extension is now disabled by default.
197
198 Version 2.1.1
199 -------------
200 (Bugfix release)
201
202 - Fixed a translation error caused by looping over empty recursive loops.
203
204 Version 2.1
205 -----------
206 (codename Yasuzō, released on November 23rd 2008)
207
208 - fixed a bug with nested loops and the special loop variable.  Before the
209   change an inner loop overwrote the loop variable from the outer one after
210   iteration.
211
212 - fixed a bug with the i18n extension that caused the explicit pluralization
213   block to look up the wrong variable.
214
215 - fixed a limitation in the lexer that made ``{{ foo.0.0 }}`` impossible.
216
217 - index based subscribing of variables with a constant value returns an
218   undefined object now instead of raising an index error.  This was a bug
219   caused by eager optimizing.
220
221 - the i18n extension looks up `foo.ugettext` now followed by `foo.gettext`
222   if an translations object is installed.  This makes dealing with custom
223   translations classes easier.
224
225 - fixed a confusing behavior with conditional extending.  loops were partially
226   executed under some conditions even though they were not part of a visible
227   area.
228
229 - added `sort` filter that works like `dictsort` but for arbitrary sequences.
230
231 - fixed a bug with empty statements in macros.
232
233 - implemented a bytecode cache system.  (:ref:`bytecode-cache`)
234
235 - the template context is now weakref-able
236
237 - inclusions and imports "with context" forward all variables now, not only
238   the initial context.
239
240 - added a cycle helper called `cycler`.
241
242 - added a joining helper called `joiner`.
243
244 - added a `compile_expression` method to the environment that allows compiling
245   of Jinja expressions into callable Python objects.
246
247 - fixed an escaping bug in urlize
248
249 Version 2.0
250 -----------
251 (codename jinjavitus, released on July 17th 2008)
252
253 - the subscribing of objects (looking up attributes and items) changed from
254   slightly.  It's now possible to give attributes or items a higher priority
255   by either using dot-notation lookup or the bracket syntax.  This also
256   changed the AST slightly.  `Subscript` is gone and was replaced with
257   :class:`~jinja2.nodes.Getitem` and :class:`~jinja2.nodes.Getattr`.
258
259   For more information see :ref:`the implementation details <notes-on-subscriptions>`.
260
261 - added support for preprocessing and token stream filtering for extensions.
262   This would allow extensions to allow simplified gettext calls in template
263   data and something similar.
264
265 - added :meth:`jinja2.environment.TemplateStream.dump`.
266
267 - added missing support for implicit string literal concatenation.
268   ``{{ "foo" "bar" }}`` is equivalent to ``{{ "foobar" }}``
269
270 - `else` is optional for conditional expressions.  If not given it evaluates
271   to `false`.
272
273 - improved error reporting for undefined values by providing a position.
274
275 - `filesizeformat` filter uses decimal prefixes now per default and can be
276   set to binary mode with the second parameter.
277
278 - fixed bug in finalizer
279
280 Version 2.0rc1
281 --------------
282 (no codename, released on June 9th 2008)
283
284 - first release of Jinja2