David Lord | 989a7db | 2018-02-06 07:48:10 -0800 | [diff] [blame] | 1 | .. currentmodule:: jinja2 |
| 2 | |
David Lord | aaf13a2 | 2019-10-13 06:40:54 -0700 | [diff] [blame] | 3 | Version 2.11.0 |
| 4 | -------------- |
David Lord | b2dd36b | 2017-11-08 12:01:29 -0800 | [diff] [blame] | 5 | |
David Lord | 9550dc8 | 2019-07-26 15:21:16 -0700 | [diff] [blame] | 6 | Unreleased |
David Lord | b2dd36b | 2017-11-08 12:01:29 -0800 | [diff] [blame] | 7 | |
David Lord | 9550dc8 | 2019-07-26 15:21:16 -0700 | [diff] [blame] | 8 | - Async support is only loaded the first time an |
| 9 | :class:`~environment.Environment` enables it, in order to avoid a |
| 10 | slow initial import. :issue:`765` |
| 11 | - Python 2.6 and 3.3 are not supported anymore. |
| 12 | - The ``map`` filter in async mode now automatically awaits |
| 13 | - Added a new ``ChainableUndefined`` class to support getitem and |
| 14 | getattr on an undefined object. :issue:`977` |
| 15 | - Allow ``{%+`` syntax (with NOP behavior) when ``lstrip_blocks`` is |
| 16 | disabled. :issue:`748` |
| 17 | - Added a ``default`` parameter for the ``map`` filter. :issue:`557` |
Brendan | f7b110c | 2019-05-07 12:00:06 -0400 | [diff] [blame] | 18 | - Exclude environment globals from |
David Lord | 9550dc8 | 2019-07-26 15:21:16 -0700 | [diff] [blame] | 19 | :func:`meta.find_undeclared_variables`. :issue:`931` |
David Lord | 483b62e | 2019-07-23 08:19:51 -0700 | [diff] [blame] | 20 | - Float literals can be written with scientific notation, like |
David Lord | 9550dc8 | 2019-07-26 15:21:16 -0700 | [diff] [blame] | 21 | 2.56e-3. :issue:`912`, :pr:`922` |
David Lord | 733851e | 2019-07-23 11:07:09 -0700 | [diff] [blame] | 22 | - Int and float literals can be written with the '_' separator for |
David Lord | 9550dc8 | 2019-07-26 15:21:16 -0700 | [diff] [blame] | 23 | legibility, like 12_345. :pr:`923` |
EtiennePelletier | 065b58f | 2019-05-09 16:47:54 -0400 | [diff] [blame] | 24 | - Fix a bug causing deadlocks in ``LRUCache.setdefault``. :pr:`1000` |
Matteo Ferrando | 9a5d522 | 2018-03-21 12:47:46 -0400 | [diff] [blame] | 25 | - The ``trim`` filter takes an optional string of characters to trim. |
| 26 | :pr:`828` |
David Lord | 5e645ab | 2019-10-04 19:00:11 -0700 | [diff] [blame] | 27 | - A new ``jinja2.ext.debug`` extension adds a ``{% debug %}`` tag to |
| 28 | quickly dump the current context and available filters and tests. |
| 29 | :issue:`174`, :pr:`798, 983` |
David Lord | c8b1b02 | 2019-10-06 23:42:36 -0700 | [diff] [blame] | 30 | - Lexing templates with large amounts of whitespace is much faster. |
| 31 | :issue:`857`, :pr:`858` |
David Lord | 0a4dad6 | 2019-10-07 07:42:04 -0700 | [diff] [blame] | 32 | - Parentheses around comparisons are preserved, so |
| 33 | ``{{ 2 * (3 < 5) }}`` outputs "2" instead of "False". |
| 34 | :issue:`755`, :pr:`938` |
Dag Wieers | 9bd3cb2 | 2018-03-17 04:00:11 +0100 | [diff] [blame] | 35 | - Add new ``boolean``, ``false``, ``true``, ``integer`` and ``float`` |
| 36 | tests. :pr:`824` |
David Lord | 719537a | 2019-10-12 21:04:31 -0700 | [diff] [blame] | 37 | - The environment's ``finalize`` function is only applied to the |
| 38 | output of expressions (constant or not), not static template data. |
| 39 | :issue:`63` |
David Lord | aaf13a2 | 2019-10-13 06:40:54 -0700 | [diff] [blame] | 40 | - When providing multiple paths to ``FileSystemLoader``, a template |
| 41 | can have the same name as a directory. :issue:`821` |
David Lord | 468b2df | 2019-10-14 07:03:03 -0700 | [diff] [blame] | 42 | - Always return :class:`Undefined` when omitting the ``else`` clause |
| 43 | in a ``{{ 'foo' if bar }}`` expression, regardless of the |
| 44 | environment's ``undefined`` class. Omitting the ``else`` clause is a |
| 45 | valid shortcut and should not raise an error when using |
| 46 | :class:`StrictUndefined`). :issue:`710`, :pr:`1079` |
aayushuppal | ef1a4c6 | 2019-05-06 17:17:43 -0400 | [diff] [blame] | 47 | - Fix behavior of ``loop`` control variables such as ``length`` and |
| 48 | ``revindex0`` when looping over a generator. :issue:`459, 751, 794`, |
| 49 | :pr:`993` |
David Lord | 4b6077a | 2019-10-16 13:23:36 -0700 | [diff] [blame^] | 50 | - ``PackageLoader`` doesn't depend on setuptools or pkg_resources. |
| 51 | :issue:`970` |
David Lord | 989a7db | 2018-02-06 07:48:10 -0800 | [diff] [blame] | 52 | |
David Lord | b2dd36b | 2017-11-08 12:01:29 -0800 | [diff] [blame] | 53 | |
David Lord | c6a71f9 | 2019-10-04 11:50:02 -0700 | [diff] [blame] | 54 | Version 2.10.3 |
| 55 | -------------- |
| 56 | |
Josh Holland | b5adc65 | 2019-10-04 20:38:17 +0100 | [diff] [blame] | 57 | Released 2019-10-04 |
David Lord | c6a71f9 | 2019-10-04 11:50:02 -0700 | [diff] [blame] | 58 | |
| 59 | - Fix a typo in Babel entry point in ``setup.py`` that was preventing |
| 60 | installation. |
| 61 | |
| 62 | |
Juan Barreneche | 4b1cae9 | 2019-06-18 10:51:55 -0300 | [diff] [blame] | 63 | Version 2.10.2 |
| 64 | -------------- |
| 65 | |
David Lord | 0fee409 | 2019-10-04 11:18:56 -0700 | [diff] [blame] | 66 | Released 2019-10-04 |
Juan Barreneche | 4b1cae9 | 2019-06-18 10:51:55 -0300 | [diff] [blame] | 67 | |
Prakhar Bhandari | 35fcd9f | 2019-05-06 12:00:53 -0400 | [diff] [blame] | 68 | - Fix Python 3.7 deprecation warnings. |
| 69 | - Using ``range`` in the sandboxed environment uses ``xrange`` on |
David Lord | 288dd42 | 2019-07-26 14:57:58 -0700 | [diff] [blame] | 70 | Python 2 to avoid memory use. :issue:`933` |
Victor Stinner | 3a86ef3 | 2019-08-20 00:40:39 +0200 | [diff] [blame] | 71 | - Use Python 3.7's better traceback support to avoid a core dump when |
| 72 | using debug builds of Python 3.7. :issue:`1050` |
Armin Ronacher | 6173cf6 | 2017-01-08 12:01:27 +0100 | [diff] [blame] | 73 | |
| 74 | |
David Lord | c4c4088 | 2019-04-06 11:02:53 -0700 | [diff] [blame] | 75 | Version 2.10.1 |
| 76 | -------------- |
| 77 | |
| 78 | Released 2019-04-06 |
| 79 | |
| 80 | - ``SandboxedEnvironment`` securely handles ``str.format_map`` in |
| 81 | order to prevent code execution through untrusted format strings. |
| 82 | The sandbox already handled ``str.format``. |
| 83 | |
| 84 | |
Armin Ronacher | 5e58d43 | 2008-11-23 15:45:13 +0100 | [diff] [blame] | 85 | Version 2.10 |
Armin Ronacher | 6173cf6 | 2017-01-08 12:01:27 +0100 | [diff] [blame] | 86 | ------------ |
| 87 | |
David Lord | 288dd42 | 2019-07-26 14:57:58 -0700 | [diff] [blame] | 88 | Released 2017-11-08 |
Armin Ronacher | 6173cf6 | 2017-01-08 12:01:27 +0100 | [diff] [blame] | 89 | |
David Lord | 288dd42 | 2019-07-26 14:57:58 -0700 | [diff] [blame] | 90 | - Added a new extension node called ``OverlayScope`` which can be used |
| 91 | to create an unoptimized scope that will look up all variables from |
| 92 | a derived context. |
| 93 | - Added an ``in`` test that works like the in operator. This can be |
| 94 | used in combination with ``reject`` and ``select``. |
| 95 | - Added ``previtem`` and ``nextitem`` to loop contexts, providing |
| 96 | access to the previous/next item in the loop. If such an item does |
| 97 | not exist, the value is undefined. |
| 98 | - Added ``changed(*values)`` to loop contexts, providing an easy way |
| 99 | of checking whether a value has changed since the last iteration (or |
| 100 | rather since the last call of the method) |
| 101 | - Added a ``namespace`` function that creates a special object which |
| 102 | allows attribute assignment using the ``set`` tag. This can be used |
| 103 | to carry data across scopes, e.g. from a loop body to code that |
| 104 | comes after the loop. |
| 105 | - Added a ``trimmed`` modifier to ``{% trans %}`` to strip linebreaks |
| 106 | and surrounding whitespace. Also added a new policy to enable this |
| 107 | for all ``trans`` blocks. |
| 108 | - The ``random`` filter is no longer incorrectly constant folded and |
| 109 | will produce a new random choice each time the template is rendered. |
| 110 | :pr:`478` |
| 111 | - Added a ``unique`` filter. :pr:`469` |
| 112 | - Added ``min`` and ``max`` filters. :pr:`475` |
| 113 | - Added tests for all comparison operators: ``eq``, ``ne``, ``lt``, |
| 114 | ``le``, ``gt``, ``ge``. :pr:`665` |
| 115 | - ``import`` statement cannot end with a trailing comma. :pr:`617`, |
| 116 | :pr:`618` |
| 117 | - ``indent`` filter will not indent blank lines by default. :pr:`685` |
| 118 | - Add ``reverse`` argument for ``dictsort`` filter. :pr:`692` |
| 119 | - Add a ``NativeEnvironment`` that renders templates to native Python |
| 120 | types instead of strings. :pr:`708` |
| 121 | - Added filter support to the block ``set`` tag. :pr:`489` |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 122 | - ``tojson`` filter marks output as safe to match documented behavior. |
| 123 | :pr:`718` |
| 124 | - Resolved a bug where getting debug locals for tracebacks could |
| 125 | modify template context. |
| 126 | - Fixed a bug where having many ``{% elif ... %}`` blocks resulted in |
| 127 | a "too many levels of indentation" error. These blocks now compile |
| 128 | to native ``elif ..:`` instead of ``else: if ..:`` :issue:`759` |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 129 | |
David Lord | 8634697 | 2017-05-23 14:57:34 -0700 | [diff] [blame] | 130 | |
Adrian Moennich | a8a9ec2 | 2017-03-15 19:19:04 +0100 | [diff] [blame] | 131 | Version 2.9.6 |
| 132 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 133 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 134 | Released 2017-04-03 |
Adrian Moennich | a8a9ec2 | 2017-03-15 19:19:04 +0100 | [diff] [blame] | 135 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 136 | - Fixed custom context behavior in fast resolve mode :issue:`675` |
Adrian Moennich | a8a9ec2 | 2017-03-15 19:19:04 +0100 | [diff] [blame] | 137 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 138 | |
Armin Ronacher | 7854851 | 2017-01-12 15:53:09 +0100 | [diff] [blame] | 139 | Version 2.9.5 |
| 140 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 141 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 142 | Released 2017-01-28 |
Armin Ronacher | 7854851 | 2017-01-12 15:53:09 +0100 | [diff] [blame] | 143 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 144 | - Restored the original repr of the internal ``_GroupTuple`` because |
| 145 | this caused issues with ansible and it was an unintended change. |
| 146 | :issue:`654` |
| 147 | - Added back support for custom contexts that override the old |
| 148 | ``resolve`` method since it was hard for people to spot that this |
| 149 | could cause a regression. |
| 150 | - Correctly use the buffer for the else block of for loops. This |
| 151 | caused invalid syntax errors to be caused on 2.x and completely |
| 152 | wrong behavior on Python 3 :issue:`669` |
| 153 | - Resolve an issue where the ``{% extends %}`` tag could not be used |
| 154 | with async environments. :issue:`668` |
| 155 | - Reduce memory footprint slightly by reducing our unicode database |
| 156 | dump we use for identifier matching on Python 3 :issue:`666` |
| 157 | - Fixed autoescaping not working for macros in async compilation mode. |
| 158 | :issue:`671` |
Armin Ronacher | 7854851 | 2017-01-12 15:53:09 +0100 | [diff] [blame] | 159 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 160 | |
Armin Ronacher | be16786 | 2017-01-08 23:40:38 +0100 | [diff] [blame] | 161 | Version 2.9.4 |
| 162 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 163 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 164 | Released 2017-01-10 |
Armin Ronacher | be16786 | 2017-01-08 23:40:38 +0100 | [diff] [blame] | 165 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 166 | - Solved some warnings for string literals. :issue:`646` |
| 167 | - Increment the bytecode cache version which was not done due to an |
| 168 | oversight before. |
| 169 | - Corrected bad code generation and scoping for filtered loops. |
| 170 | :issue:`649` |
| 171 | - Resolved an issue where top-level output silencing after known |
| 172 | extend blocks could generate invalid code when blocks where |
| 173 | contained in if statements. :issue:`651` |
| 174 | - Made the ``truncate.leeway`` default configurable to improve |
| 175 | compatibility with older templates. |
Armin Ronacher | be16786 | 2017-01-08 23:40:38 +0100 | [diff] [blame] | 176 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 177 | |
Armin Ronacher | 53e3c95 | 2017-01-08 09:41:34 +0100 | [diff] [blame] | 178 | Version 2.9.3 |
| 179 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 180 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 181 | Released 2017-01-08 |
Armin Ronacher | 53e3c95 | 2017-01-08 09:41:34 +0100 | [diff] [blame] | 182 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 183 | - Restored the use of blocks in macros to the extend that was possible |
| 184 | before. On Python 3 it would render a generator repr instead of the |
| 185 | block contents. :issue:`645` |
| 186 | - Set a consistent behavior for assigning of variables in inner scopes |
| 187 | when the variable is also read from an outer scope. This now sets |
| 188 | the intended behavior in all situations however it does not restore |
| 189 | the old behavior where limited assignments to outer scopes was |
| 190 | possible. For more information and a discussion see :issue:`641` |
| 191 | - Resolved an issue where ``block scoped`` would not take advantage of |
| 192 | the new scoping rules. In some more exotic cases a variable |
| 193 | overriden in a local scope would not make it into a block. |
| 194 | - Change the code generation of the ``with`` statement to be in line |
| 195 | with the new scoping rules. This resolves some unlikely bugs in edge |
| 196 | cases. This also introduces a new internal ``With`` node that can be |
| 197 | used by extensions. |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 198 | |
Armin Ronacher | 53e3c95 | 2017-01-08 09:41:34 +0100 | [diff] [blame] | 199 | |
Armin Ronacher | 6235644 | 2017-01-08 02:16:41 +0100 | [diff] [blame] | 200 | Version 2.9.2 |
Armin Ronacher | bf7b924 | 2017-01-07 16:56:13 +0100 | [diff] [blame] | 201 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 202 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 203 | Released 2017-01-08 |
Armin Ronacher | e302252 | 2017-01-07 23:15:07 +0100 | [diff] [blame] | 204 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 205 | - Fixed a regression that caused for loops to not be able to use the |
| 206 | same variable for the target as well as source iterator. |
| 207 | :issue:`640` |
| 208 | - Add support for a previously unknown behavior of macros. It used to |
| 209 | be possible in some circumstances to explicitly provide a caller |
| 210 | argument to macros. While badly buggy and unintended it turns out |
| 211 | that this is a common case that gets copy pasted around. To not |
| 212 | completely break backwards compatibility with the most common cases |
| 213 | it's now possible to provide an explicit keyword argument for caller |
| 214 | if it's given an explicit default. :issue:`642` |
Armin Ronacher | e302252 | 2017-01-07 23:15:07 +0100 | [diff] [blame] | 215 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 216 | |
Armin Ronacher | e302252 | 2017-01-07 23:15:07 +0100 | [diff] [blame] | 217 | Version 2.9.1 |
| 218 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 219 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 220 | Released 2017-01-07 |
Armin Ronacher | bf7b924 | 2017-01-07 16:56:13 +0100 | [diff] [blame] | 221 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 222 | - Resolved a regression with call block scoping for macros. Nested |
| 223 | caller blocks that used the same identifiers as outer macros could |
| 224 | refer to the wrong variable incorrectly. |
Armin Ronacher | bf7b924 | 2017-01-07 16:56:13 +0100 | [diff] [blame] | 225 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 226 | |
Armin Ronacher | e7e14cf | 2016-12-27 19:52:43 +0100 | [diff] [blame] | 227 | Version 2.9 |
| 228 | ----------- |
| 229 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 230 | Released 2017-01-07, codename Derivation |
Armin Ronacher | e7e14cf | 2016-12-27 19:52:43 +0100 | [diff] [blame] | 231 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 232 | - Change cache key definition in environment. This fixes a performance |
| 233 | regression introduced in 2.8. |
| 234 | - Added support for ``generator_stop`` on supported Python versions |
| 235 | (Python 3.5 and later) |
| 236 | - Corrected a long standing issue with operator precedence of math |
| 237 | operations not being what was expected. |
| 238 | - Added support for Python 3.6 async iterators through a new async |
| 239 | mode. |
| 240 | - Added policies for filter defaults and similar things. |
| 241 | - Urlize now sets "rel noopener" by default. |
| 242 | - Support attribute fallback for old-style classes in 2.x. |
| 243 | - Support toplevel set statements in extend situations. |
| 244 | - Restored behavior of Cycler for Python 3 users. |
| 245 | - Subtraction now follows the same behavior as other operators on |
| 246 | undefined values. |
| 247 | - ``map`` and friends will now give better error messages if you |
| 248 | forgot to quote the parameter. |
| 249 | - Depend on MarkupSafe 0.23 or higher. |
| 250 | - Improved the ``truncate`` filter to support better truncation in |
| 251 | case the string is barely truncated at all. |
| 252 | - Change the logic for macro autoescaping to be based on the runtime |
| 253 | autoescaping information at call time instead of macro define time. |
| 254 | - Ported a modified version of the ``tojson`` filter from Flask to |
| 255 | Jinja2 and hooked it up with the new policy framework. |
| 256 | - Block sets are now marked ``safe`` by default. |
| 257 | - On Python 2 the asciification of ASCII strings can now be disabled |
| 258 | with the ``compiler.ascii_str`` policy. |
| 259 | - Tests now no longer accept an arbitrary expression as first argument |
| 260 | but a restricted one. This means that you can now properly use |
| 261 | multiple tests in one expression without extra parentheses. In |
| 262 | particular you can now write ``foo is divisibleby 2 or foo is |
| 263 | divisibleby 3`` as you would expect. |
| 264 | - Greatly changed the scoping system to be more consistent with what |
| 265 | template designers and developers expect. There is now no more magic |
| 266 | difference between the different include and import constructs. |
| 267 | Context is now always propagated the same way. The only remaining |
| 268 | differences is the defaults for ``with context`` and ``without |
| 269 | context``. |
| 270 | - The ``with`` and ``autoescape`` tags are now built-in. |
| 271 | - Added the new ``select_autoescape`` function which helps configuring |
| 272 | better autoescaping easier. |
| 273 | - Fixed a runtime error in the sandbox when attributes of async |
| 274 | generators were accessed. |
Armin Ronacher | 74bd64e | 2016-12-29 16:01:35 +0100 | [diff] [blame] | 275 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 276 | |
Armin Ronacher | f51862d | 2015-11-20 10:04:20 +0100 | [diff] [blame] | 277 | Version 2.8.1 |
| 278 | ------------- |
| 279 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 280 | Released 2016-12-29 |
Armin Ronacher | f51862d | 2015-11-20 10:04:20 +0100 | [diff] [blame] | 281 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 282 | - Fixed the ``for_qs`` flag for ``urlencode``. |
| 283 | - Fixed regression when applying ``int`` to non-string values. |
| 284 | - SECURITY: if the sandbox mode is used format expressions are now |
| 285 | sandboxed with the same rules as in Jinja. This solves various |
| 286 | information leakage problems that can occur with format strings. |
Armin Ronacher | 8189d21 | 2015-11-20 10:05:12 +0100 | [diff] [blame] | 287 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 288 | |
Armin Ronacher | 853d865 | 2013-12-12 22:26:29 +0000 | [diff] [blame] | 289 | Version 2.8 |
| 290 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 291 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 292 | Released 2015-07-26, codename Replacement |
Armin Ronacher | 853d865 | 2013-12-12 22:26:29 +0000 | [diff] [blame] | 293 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 294 | - Added ``target`` parameter to urlize function. |
| 295 | - Added support for ``followsymlinks`` to the file system loader. |
| 296 | - The truncate filter now counts the length. |
| 297 | - Added equalto filter that helps with select filters. |
| 298 | - Changed cache keys to use absolute file names if available instead |
| 299 | of load names. |
| 300 | - Fixed loop length calculation for some iterators. |
| 301 | - Changed how Jinja2 enforces strings to be native strings in Python 2 |
| 302 | to work when people break their default encoding. |
| 303 | - Added :func:`make_logging_undefined` which returns an undefined |
| 304 | object that logs failures into a logger. |
| 305 | - If unmarshalling of cached data fails the template will be reloaded |
| 306 | now. |
| 307 | - Implemented a block ``set`` tag. |
| 308 | - Default cache size was increased to 400 from a low 50. |
| 309 | - Fixed ``is number`` test to accept long integers in all Python |
| 310 | versions. |
| 311 | - Changed ``is number`` to accept Decimal as a number. |
| 312 | - Added a check for default arguments followed by non-default |
| 313 | arguments. This change makes ``{% macro m(x, y=1, z) %}`` a syntax |
| 314 | error. The previous behavior for this code was broken anyway |
| 315 | (resulting in the default value being applied to ``y``). |
| 316 | - Add ability to use custom subclasses of |
| 317 | ``jinja2.compiler.CodeGenerator`` and ``jinja2.runtime.Context`` by |
| 318 | adding two new attributes to the environment |
| 319 | (``code_generator_class`` and ``context_class``) (pull request |
| 320 | ``:issue:`404```). |
| 321 | - Added support for context/environment/evalctx decorator functions on |
| 322 | the finalize callback of the environment. |
| 323 | - Escape query strings for urlencode properly. Previously slashes were |
| 324 | not escaped in that place. |
| 325 | - Add 'base' parameter to 'int' filter. |
Armin Ronacher | 853d865 | 2013-12-12 22:26:29 +0000 | [diff] [blame] | 326 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 327 | |
Armin Ronacher | f8bca13 | 2014-06-06 22:49:07 +0600 | [diff] [blame] | 328 | Version 2.7.3 |
| 329 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 330 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 331 | Released 2014-06-06 |
Armin Ronacher | f8bca13 | 2014-06-06 22:49:07 +0600 | [diff] [blame] | 332 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 333 | - Security issue: Corrected the security fix for the cache folder. |
| 334 | This fix was provided by RedHat. |
Armin Ronacher | f8bca13 | 2014-06-06 22:49:07 +0600 | [diff] [blame] | 335 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 336 | |
Armin Ronacher | c6519c1 | 2013-08-07 15:59:07 +0100 | [diff] [blame] | 337 | Version 2.7.2 |
| 338 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 339 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 340 | Released 2014-01-10 |
Armin Ronacher | c6519c1 | 2013-08-07 15:59:07 +0100 | [diff] [blame] | 341 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 342 | - Prefix loader was not forwarding the locals properly to inner |
| 343 | loaders. This is now fixed. |
| 344 | - Security issue: Changed the default folder for the filesystem cache |
| 345 | to be user specific and read and write protected on UNIX systems. |
| 346 | See `Debian bug 734747`_ for more information. |
Armin Ronacher | acb672b | 2014-01-10 10:40:51 +0000 | [diff] [blame] | 347 | |
David Lord | 0669656 | 2019-07-26 12:12:41 -0700 | [diff] [blame] | 348 | .. _Debian bug 734747: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734747 |
Armin Ronacher | 701e9ad | 2013-08-07 16:01:00 +0100 | [diff] [blame] | 349 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 350 | |
Armin Ronacher | 5ca2529 | 2013-07-04 16:24:31 +0200 | [diff] [blame] | 351 | Version 2.7.1 |
| 352 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 353 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 354 | Released 2013-08-07 |
Armin Ronacher | 5ca2529 | 2013-07-04 16:24:31 +0200 | [diff] [blame] | 355 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 356 | - Fixed a bug with ``call_filter`` not working properly on environment |
| 357 | and context filters. |
| 358 | - Fixed lack of Python 3 support for bytecode caches. |
| 359 | - Reverted support for defining blocks in included templates as this |
| 360 | broke existing templates for users. |
| 361 | - Fixed some warnings with hashing of undefineds and nodes if Python |
| 362 | is run with warnings for Python 3. |
| 363 | - Added support for properly hashing undefined objects. |
| 364 | - Fixed a bug with the title filter not working on already uppercase |
| 365 | strings. |
Armin Ronacher | 5ca2529 | 2013-07-04 16:24:31 +0200 | [diff] [blame] | 366 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 367 | |
Armin Ronacher | 6fa6cb0 | 2011-09-13 23:27:41 +0200 | [diff] [blame] | 368 | Version 2.7 |
| 369 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 370 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 371 | Released 2013-05-20, codename Translation |
Armin Ronacher | 6fa6cb0 | 2011-09-13 23:27:41 +0200 | [diff] [blame] | 372 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 373 | - Choice and prefix loaders now dispatch source and template lookup |
| 374 | separately in order to work in combination with module loaders as |
| 375 | advertised. |
| 376 | - Fixed filesizeformat. |
| 377 | - Added a non-silent option for babel extraction. |
| 378 | - Added ``urlencode`` filter that automatically quotes values for URL |
| 379 | safe usage with utf-8 as only supported encoding. If applications |
| 380 | want to change this encoding they can override the filter. |
| 381 | - Added ``keep-trailing-newline`` configuration to environments and |
| 382 | templates to optionally preserve the final trailing newline. |
| 383 | - Accessing ``last`` on the loop context no longer causes the iterator |
| 384 | to be consumed into a list. |
| 385 | - Python requirement changed: 2.6, 2.7 or >= 3.3 are required now, |
| 386 | supported by same source code, using the "six" compatibility |
| 387 | library. |
| 388 | - Allow ``contextfunction`` and other decorators to be applied to |
| 389 | ``__call__``. |
| 390 | - Added support for changing from newline to different signs in the |
| 391 | ``wordwrap`` filter. |
| 392 | - Added support for ignoring memcache errors silently. |
| 393 | - Added support for keeping the trailing newline in templates. |
| 394 | - Added finer grained support for stripping whitespace on the left |
| 395 | side of blocks. |
| 396 | - Added ``map``, ``select``, ``reject``, ``selectattr`` and |
| 397 | ``rejectattr`` filters. |
| 398 | - Added support for ``loop.depth`` to figure out how deep inside a |
| 399 | recursive loop the code is. |
| 400 | - Disabled py_compile for pypy and python 3. |
Armin Ronacher | 6fa6cb0 | 2011-09-13 23:27:41 +0200 | [diff] [blame] | 401 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 402 | |
Armin Ronacher | 44e1f56 | 2010-10-17 16:43:07 +0200 | [diff] [blame] | 403 | Version 2.6 |
| 404 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 405 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 406 | Released 2011-07-24, codename Convolution |
Armin Ronacher | 44e1f56 | 2010-10-17 16:43:07 +0200 | [diff] [blame] | 407 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 408 | - Internal attributes now raise an internal attribute error now |
| 409 | instead of returning an undefined. This fixes problems when passing |
| 410 | undefined objects to Python semantics expecting APIs. |
| 411 | - Traceback support now works properly for PyPy. (Tested with 1.4) |
| 412 | - Implemented operator intercepting for sandboxed environments. This |
| 413 | allows application developers to disable builtin operators for |
| 414 | better security. (For instance limit the mathematical operators to |
| 415 | actual integers instead of longs) |
| 416 | - Groupby filter now supports dotted notation for grouping by |
| 417 | attributes of attributes. |
| 418 | - Scoped blocks now properly treat toplevel assignments and imports. |
| 419 | Previously an import suddenly "disappeared" in a scoped block. |
| 420 | - Automatically detect newer Python interpreter versions before |
| 421 | loading code from bytecode caches to prevent segfaults on invalid |
| 422 | opcodes. The segfault in earlier Jinja2 versions here was not a |
| 423 | Jinja2 bug but a limitation in the underlying Python interpreter. If |
| 424 | you notice Jinja2 segfaulting in earlier versions after an upgrade |
| 425 | of the Python interpreter you don't have to upgrade, it's enough to |
| 426 | flush the bytecode cache. This just no longer makes this necessary, |
| 427 | Jinja2 will automatically detect these cases now. |
| 428 | - The sum filter can now sum up values by attribute. This is a |
| 429 | backwards incompatible change. The argument to the filter previously |
| 430 | was the optional starting index which defaults to zero. This now |
| 431 | became the second argument to the function because it's rarely used. |
| 432 | - Like sum, sort now also makes it possible to order items by |
| 433 | attribute. |
| 434 | - Like sum and sort, join now also is able to join attributes of |
| 435 | objects as string. |
| 436 | - The internal eval context now has a reference to the environment. |
| 437 | - Added a mapping test to see if an object is a dict or an object with |
| 438 | a similar interface. |
Armin Ronacher | 6a3e95d | 2010-11-19 13:51:38 +0100 | [diff] [blame] | 439 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 440 | |
Armin Ronacher | 1116573 | 2010-10-18 14:38:03 +0200 | [diff] [blame] | 441 | Version 2.5.5 |
| 442 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 443 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 444 | Released 2010-10-18 |
Armin Ronacher | 1116573 | 2010-10-18 14:38:03 +0200 | [diff] [blame] | 445 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 446 | - Built documentation is no longer part of release. |
Armin Ronacher | 1116573 | 2010-10-18 14:38:03 +0200 | [diff] [blame] | 447 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 448 | |
Armin Ronacher | e104f30 | 2010-10-17 16:42:26 +0200 | [diff] [blame] | 449 | Version 2.5.4 |
| 450 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 451 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 452 | Released 2010-10-17 |
Armin Ronacher | e104f30 | 2010-10-17 16:42:26 +0200 | [diff] [blame] | 453 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 454 | - Fixed extensions not loading properly with overlays. |
| 455 | - Work around a bug in cpython for the debugger that causes segfaults |
| 456 | on 64bit big-endian architectures. |
Armin Ronacher | 7b93e7e | 2010-10-17 16:44:19 +0200 | [diff] [blame] | 457 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 458 | |
Armin Ronacher | 613912d | 2010-10-17 15:53:59 +0200 | [diff] [blame] | 459 | Version 2.5.3 |
| 460 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 461 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 462 | Released 2010-10-17 |
Armin Ronacher | 613912d | 2010-10-17 15:53:59 +0200 | [diff] [blame] | 463 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 464 | - Fixed an operator precedence error introduced in 2.5.2. Statements |
| 465 | like "-foo.bar" had their implicit parentheses applied around the |
| 466 | first part of the expression ("(-foo).bar") instead of the more |
| 467 | correct "-(foo.bar)". |
Armin Ronacher | 613912d | 2010-10-17 15:53:59 +0200 | [diff] [blame] | 468 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 469 | |
Armin Ronacher | 4603694 | 2010-08-18 11:10:50 +0200 | [diff] [blame] | 470 | Version 2.5.2 |
| 471 | ------------- |
Armin Ronacher | 4603694 | 2010-08-18 11:10:50 +0200 | [diff] [blame] | 472 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 473 | Released 2010-08-18 |
| 474 | |
| 475 | - Improved setup.py script to better work with assumptions people |
| 476 | might still have from it (``--with-speedups``). |
| 477 | - Fixed a packaging error that excluded the new debug support. |
Armin Ronacher | 4603694 | 2010-08-18 11:10:50 +0200 | [diff] [blame] | 478 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 479 | |
Armin Ronacher | 02ea18a | 2010-07-01 11:30:42 +0200 | [diff] [blame] | 480 | Version 2.5.1 |
| 481 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 482 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 483 | Released 2010-08-17 |
Armin Ronacher | 9fb6042 | 2010-06-05 14:41:34 +0200 | [diff] [blame] | 484 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 485 | - StopIteration exceptions raised by functions called from templates |
| 486 | are now intercepted and converted to undefineds. This solves a lot |
| 487 | of debugging grief. (StopIteration is used internally to abort |
| 488 | template execution) |
| 489 | - Improved performance of macro calls slightly. |
| 490 | - Babel extraction can now properly extract newstyle gettext calls. |
| 491 | - Using the variable ``num`` in newstyle gettext for something else |
| 492 | than the pluralize count will no longer raise a :exc:`KeyError`. |
| 493 | - Removed builtin markup class and switched to markupsafe. For |
| 494 | backwards compatibility the pure Python implementation still exists |
| 495 | but is pulled from markupsafe by the Jinja2 developers. The debug |
| 496 | support went into a separate feature called "debugsupport" and is |
| 497 | disabled by default because it is only relevant for Python 2.4 |
| 498 | - Fixed an issue with unary operators having the wrong precedence. |
Armin Ronacher | 9fb6042 | 2010-06-05 14:41:34 +0200 | [diff] [blame] | 499 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 500 | |
Armin Ronacher | 4da9034 | 2010-05-29 17:35:10 +0200 | [diff] [blame] | 501 | Version 2.5 |
| 502 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 503 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 504 | Released 2010-05-29, codename Incoherence |
Armin Ronacher | 7379549 | 2010-05-23 23:07:08 +0200 | [diff] [blame] | 505 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 506 | - Improved the sort filter (should have worked like this for a long |
| 507 | time) by adding support for case insensitive searches. |
| 508 | - Fixed a bug for getattribute constant folding. |
| 509 | - Support for newstyle gettext translations which result in a nicer |
| 510 | in-template user interface and more consistent catalogs. |
| 511 | (:ref:`newstyle-gettext`) |
| 512 | - It's now possible to register extensions after an environment was |
| 513 | created. |
Armin Ronacher | 2ec1d2c | 2010-04-20 13:46:08 +0200 | [diff] [blame] | 514 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 515 | |
Armin Ronacher | 800ac7f | 2010-04-20 13:45:11 +0200 | [diff] [blame] | 516 | Version 2.4.1 |
| 517 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 518 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 519 | Released 2010-04-20 |
Armin Ronacher | 800ac7f | 2010-04-20 13:45:11 +0200 | [diff] [blame] | 520 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 521 | - Fixed an error reporting bug for undefined. |
Armin Ronacher | 27387aa | 2010-04-13 00:56:34 +0200 | [diff] [blame] | 522 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 523 | |
Armin Ronacher | 559025a | 2010-02-10 02:23:56 +0100 | [diff] [blame] | 524 | Version 2.4 |
| 525 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 526 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 527 | Released 2010-04-13, codename Correlation |
Armin Ronacher | 559025a | 2010-02-10 02:23:56 +0100 | [diff] [blame] | 528 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 529 | - The environment template loading functions now transparently pass |
| 530 | through a template object if it was passed to it. This makes it |
| 531 | possible to import or extend from a template object that was passed |
| 532 | to the template. |
| 533 | - Added a :class:`ModuleLoader` that can load templates from |
| 534 | precompiled sources. The environment now features a method to |
| 535 | compile the templates from a configured loader into a zip file or |
| 536 | folder. |
| 537 | - The _speedups C extension now supports Python 3. |
| 538 | - Added support for autoescaping toggling sections and support for |
| 539 | evaluation contexts (:ref:`eval-context`). |
| 540 | - Extensions have a priority now. |
Georg Brandl | 05be95a | 2010-02-21 17:50:32 +0100 | [diff] [blame] | 541 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 542 | |
Armin Ronacher | 549f6b5 | 2010-02-19 11:09:28 +0100 | [diff] [blame] | 543 | Version 2.3.1 |
| 544 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 545 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 546 | Released 2010-02-19 |
Armin Ronacher | 549f6b5 | 2010-02-19 11:09:28 +0100 | [diff] [blame] | 547 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 548 | - Fixed an error reporting bug on all python versions |
| 549 | - Fixed an error reporting bug on Python 2.4 |
Armin Ronacher | 549f6b5 | 2010-02-19 11:09:28 +0100 | [diff] [blame] | 550 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 551 | |
Armin Ronacher | 31bbd9e | 2010-01-14 00:41:30 +0100 | [diff] [blame] | 552 | Version 2.3 |
| 553 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 554 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 555 | Released 2010-02-10, codename 3000 Pythons |
Armin Ronacher | f1c421d | 2009-09-17 00:48:41 +0200 | [diff] [blame] | 556 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 557 | - Fixes issue with code generator that causes unbound variables to be |
| 558 | generated if set was used in if-blocks and other small identifier |
| 559 | problems. |
| 560 | - Include tags are now able to select between multiple templates and |
| 561 | take the first that exists, if a list of templates is given. |
| 562 | - Fixed a problem with having call blocks in outer scopes that have an |
| 563 | argument that is also used as local variable in an inner frame |
| 564 | :issue:`360`. |
| 565 | - Greatly improved error message reporting :pr:`339` |
| 566 | - Implicit tuple expressions can no longer be totally empty. This |
| 567 | change makes ``{% if %}`` a syntax error now. :issue:`364` |
| 568 | - Added support for translator comments if extracted via babel. |
| 569 | - Added with-statement extension. |
| 570 | - Experimental Python 3 support. |
Armin Ronacher | f1c421d | 2009-09-17 00:48:41 +0200 | [diff] [blame] | 571 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 572 | |
Armin Ronacher | 9e6400e | 2009-09-14 14:58:01 -0700 | [diff] [blame] | 573 | Version 2.2.1 |
| 574 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 575 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 576 | Released 2009-09-14 |
Armin Ronacher | 9e6400e | 2009-09-14 14:58:01 -0700 | [diff] [blame] | 577 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 578 | - Fixes some smaller problems for Jinja2 on Jython. |
Armin Ronacher | 9e6400e | 2009-09-14 14:58:01 -0700 | [diff] [blame] | 579 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 580 | |
Armin Ronacher | 37f58ce | 2008-12-27 13:10:38 +0100 | [diff] [blame] | 581 | Version 2.2 |
| 582 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 583 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 584 | Released 2009-09-13, codename Kong |
Armin Ronacher | 37f58ce | 2008-12-27 13:10:38 +0100 | [diff] [blame] | 585 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 586 | - Include statements can now be marked with ``ignore missing`` to skip |
| 587 | non existing templates. |
| 588 | - Priority of ``not`` raised. It's now possible to write ``not foo in |
| 589 | bar`` as an alias to ``foo not in bar`` like in python. Previously |
| 590 | the grammar required parentheses (``not (foo in bar)``) which was |
| 591 | odd. |
| 592 | - Fixed a bug that caused syntax errors when defining macros or using |
| 593 | the ``{% call %}`` tag inside loops. |
| 594 | - Fixed a bug in the parser that made ``{{ foo[1, 2] }}`` impossible. |
| 595 | - Made it possible to refer to names from outer scopes in included |
| 596 | templates that were unused in the callers frame :issue:`327` |
| 597 | - Fixed a bug that caused internal errors if names where used as |
| 598 | iteration variable and regular variable *after* the loop if that |
| 599 | variable was unused *before* the loop. :pr:`331` |
| 600 | - Added support for optional ``scoped`` modifier to blocks. |
| 601 | - Added support for line-comments. |
| 602 | - Added the ``meta`` module. |
| 603 | - Renamed (undocumented) attribute "overlay" to "overlayed" on the |
| 604 | environment because it was clashing with a method of the same name. |
| 605 | - Speedup extension is now disabled by default. |
Armin Ronacher | 37f58ce | 2008-12-27 13:10:38 +0100 | [diff] [blame] | 606 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 607 | |
Armin Ronacher | cebd838 | 2008-12-25 18:33:46 +0100 | [diff] [blame] | 608 | Version 2.1.1 |
| 609 | ------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 610 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 611 | Released 2008-12-25 |
Armin Ronacher | cebd838 | 2008-12-25 18:33:46 +0100 | [diff] [blame] | 612 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 613 | - Fixed a translation error caused by looping over empty recursive |
| 614 | loops. |
Armin Ronacher | a22a53d | 2007-03-31 20:44:33 +0200 | [diff] [blame] | 615 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 616 | |
Armin Ronacher | 237cdde | 2008-07-17 23:34:44 +0200 | [diff] [blame] | 617 | Version 2.1 |
| 618 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 619 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 620 | Released 2008-11-23, codename Yasuzō |
Armin Ronacher | 237cdde | 2008-07-17 23:34:44 +0200 | [diff] [blame] | 621 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 622 | - Fixed a bug with nested loops and the special loop variable. Before |
| 623 | the change an inner loop overwrote the loop variable from the outer |
| 624 | one after iteration. |
| 625 | - Fixed a bug with the i18n extension that caused the explicit |
| 626 | pluralization block to look up the wrong variable. |
| 627 | - Fixed a limitation in the lexer that made ``{{ foo.0.0 }}`` |
| 628 | impossible. |
| 629 | - Index based subscribing of variables with a constant value returns |
| 630 | an undefined object now instead of raising an index error. This was |
| 631 | a bug caused by eager optimizing. |
| 632 | - The i18n extension looks up ``foo.ugettext`` now followed by |
| 633 | ``foo.gettext`` if an translations object is installed. This makes |
| 634 | dealing with custom translations classes easier. |
| 635 | - Fixed a confusing behavior with conditional extending. loops were |
| 636 | partially executed under some conditions even though they were not |
| 637 | part of a visible area. |
| 638 | - Added ``sort`` filter that works like ``dictsort`` but for arbitrary |
| 639 | sequences. |
| 640 | - Fixed a bug with empty statements in macros. |
| 641 | - Implemented a bytecode cache system. (:ref:`bytecode-cache`) |
| 642 | - The template context is now weakref-able |
| 643 | - Inclusions and imports "with context" forward all variables now, not |
| 644 | only the initial context. |
| 645 | - Added a cycle helper called ``cycler``. |
| 646 | - Added a joining helper called ``joiner``. |
| 647 | - Added a ``compile_expression`` method to the environment that allows |
| 648 | compiling of Jinja expressions into callable Python objects. |
| 649 | - Fixed an escaping bug in urlize |
Armin Ronacher | d9342dc | 2008-11-17 00:35:30 +0100 | [diff] [blame] | 650 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 651 | |
Armin Ronacher | 9d472df | 2008-05-04 19:56:34 +0200 | [diff] [blame] | 652 | Version 2.0 |
Armin Ronacher | c689cf1 | 2007-11-18 11:23:58 +0100 | [diff] [blame] | 653 | ----------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 654 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 655 | Released 2008-07-17, codename Jinjavitus |
Armin Ronacher | c689cf1 | 2007-11-18 11:23:58 +0100 | [diff] [blame] | 656 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 657 | - The subscribing of objects (looking up attributes and items) changed |
| 658 | from slightly. It's now possible to give attributes or items a |
| 659 | higher priority by either using dot-notation lookup or the bracket |
| 660 | syntax. This also changed the AST slightly. ``Subscript`` is gone |
| 661 | and was replaced with :class:`~jinja2.nodes.Getitem` and |
| 662 | :class:`~jinja2.nodes.Getattr`. For more information see :ref:`the |
| 663 | implementation details <notes-on-subscriptions>`. |
| 664 | - Added support for preprocessing and token stream filtering for |
| 665 | extensions. This would allow extensions to allow simplified gettext |
| 666 | calls in template data and something similar. |
| 667 | - Added :meth:`jinja2.environment.TemplateStream.dump`. |
| 668 | - Added missing support for implicit string literal concatenation. |
| 669 | ``{{ "foo" "bar" }}`` is equivalent to ``{{ "foobar" }}`` |
| 670 | - ``else`` is optional for conditional expressions. If not given it |
| 671 | evaluates to ``false``. |
| 672 | - Improved error reporting for undefined values by providing a |
| 673 | position. |
| 674 | - ``filesizeformat`` filter uses decimal prefixes now per default and |
| 675 | can be set to binary mode with the second parameter. |
| 676 | - Fixed bug in finalizer |
Armin Ronacher | 665bfb8 | 2008-07-14 13:41:46 +0200 | [diff] [blame] | 677 | |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 678 | |
Armin Ronacher | 6dc6f29 | 2008-06-12 08:50:07 +0200 | [diff] [blame] | 679 | Version 2.0rc1 |
| 680 | -------------- |
David Lord | d9d3fc3 | 2017-11-01 07:57:12 -0700 | [diff] [blame] | 681 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 682 | Released 2008-06-09 |
Armin Ronacher | 6dc6f29 | 2008-06-12 08:50:07 +0200 | [diff] [blame] | 683 | |
David Lord | 90756da | 2019-07-26 14:36:55 -0700 | [diff] [blame] | 684 | - First release of Jinja2 |