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