Jinja2 v2.1 Release Notes

  • ๐Ÿš€ Released 2008-11-23, codename Yasuzล

    • ๐Ÿ›  Fixed a bug with nested loops and the special loop variable. Before the change an inner loop overwrote the loop variable from the outer one after iteration.
    • ๐Ÿ›  Fixed a bug with the i18n extension that caused the explicit pluralization block to look up the wrong variable.
    • ๐Ÿ›  Fixed a limitation in the lexer that made {{ foo.0.0 }} impossible.
    • Index based subscribing of variables with a constant value returns an undefined object now instead of raising an index error. This was a bug caused by eager optimizing.
    • The i18n extension looks up foo.ugettext now followed by foo.gettext if an translations object is installed. This makes dealing with custom translations classes easier.
    • ๐Ÿ›  Fixed a confusing behavior with conditional extending. loops were partially executed under some conditions even though they were not part of a visible area.
    • Added sort filter that works like dictsort but for arbitrary sequences.
    • ๐Ÿ›  Fixed a bug with empty statements in macros.
    • Implemented a bytecode cache system. (:ref:bytecode-cache)
    • The template context is now weakref-able
    • Inclusions and imports "with context" forward all variables now, not only the initial context.
    • Added a cycle helper called cycler.
    • Added a joining helper called joiner.
    • Added a compile_expression method to the environment that allows compiling of Jinja expressions into callable Python objects.
    • ๐Ÿ›  Fixed an escaping bug in urlize