Skip to content

0.2.3

Compare
Choose a tag to compare
@sqla-tester sqla-tester released this 02 Sep 18:49

0.2.3

Released: Sun Nov 23 2008

  • the <%namespacename:defname> syntax described at
    http://techspot.zzzeek.org/?p=28 has now
    been added as a built in syntax, and is recommended
    as a more modern syntax versus <%call expr="expression">.
    The %call tag itself will always remain,
    with <%namespacename:defname> presenting a more HTML-like
    alternative to calling defs, both plain and
    nested. Many examples of the new syntax are in the
    "Calling a def with embedded content" section
    of the docs.

  • added support for Jython 2.5.

  • cache module now uses Beaker's CacheManager
    object directly, so that all cache types are included.
    memcached is available as both "ext:memcached" and
    "memcached", the latter for backwards compatibility.

  • added "cache" accessor to Template, Namespace.
    e.g. ${local.cache.get('somekey')} or
    template.cache.invalidate_body()

  • added "cache_enabled=True" flag to Template,
    TemplateLookup. Setting this to False causes cache
    operations to "pass through" and execute every time;
    this flag should be integrated in Pylons with its own
    cache_enabled configuration setting.

  • the Cache object now supports invalidate_def(name),
    invalidate_body(), invalidate_closure(name),
    invalidate(key), which will remove the given key
    from the cache, if it exists. The cache arguments
    (i.e. storage type) are derived from whatever has
    been already persisted for that template.

    References: #92

  • For cache changes to work fully, Beaker 1.1 is required.
    1.0.1 and up will work as well with the exception of
    cache expiry. Note that Beaker 1.1 is required
    for applications which use dynamically generated keys,
    since previous versions will permanently store state in memory
    for each individual key, thus consuming all available
    memory for an arbitrarily large number of distinct
    keys.

  • fixed bug whereby an <%included> template with
    <%page> args named the same as a builtin would not
    honor the default value specified in <%page>

    References: #93

  • fixed the html_error_template not handling tracebacks from
    normal .py files with a magic encoding comment

    References: #88

  • RichTraceback() now accepts an optional traceback object
    to be used in place of sys.exc_info()[2]. html_error_template()
    and text_error_template() accept an optional
    render()-time argument "traceback" which is passed to the
    RichTraceback object.

  • added ModuleTemplate class, which allows the construction
    of a Template given a Python module generated by a previous
    Template. This allows Python modules alone to be used
    as templates with no compilation step. Source code
    and template source are optional but allow error reporting
    to work correctly.

  • fixed Python 2.3 compat. in mako.pyparser

    References: #90

  • fix Babel 0.9.3 compatibility; stripping comment tags is now
    optional (and enabled by default).