Skip to content

Releases: sqlalchemy/mako

0.3.4

02 Sep 18:49
Compare
Choose a tag to compare

0.3.4

Released: Tue Jun 22 2010

  • Now using MarkupSafe for HTML escaping,
    i.e. in place of cgi.escape(). Faster
    C-based implementation and also escapes
    single quotes for additional security.
    Supports the html attribute for
    the given expression as well.

    When using "disable_unicode" mode,
    a pure Python HTML escaper function
    is used which also quotes single quotes.

    Note that Pylons by default doesn't
    use Mako's filter - check your
    environment.py file.

  • Fixed call to "unicode.strip" in
    exceptions.text_error_template which
    is not Py3k compatible.

    References: #137

0.3.3

02 Sep 18:49
Compare
Choose a tag to compare

0.3.3

Released: Mon May 31 2010

  • Added conditional to RichTraceback
    such that if no traceback is passed
    and sys.exc_info() has been reset,
    the formatter just returns blank
    for the "traceback" portion.

    References: #135

  • Fixed sometimes incorrect usage of
    exc.class.name
    in html/text error templates when using
    Python 2.4

    References: #131

  • Fixed broken @Property decorator on
    template.last_modified

  • Fixed error formatting when a stacktrace
    line contains no line number, as in when
    inside an eval/exec-generated function.

    References: #132

  • When a .py is being created, the tempfile
    where the source is stored temporarily is
    now made in the same directory as that of
    the .py file. This ensures that the two
    files share the same filesystem, thus
    avoiding cross-filesystem synchronization
    issues. Thanks to Charles Cazabon.

0.3.2

02 Sep 18:49
Compare
Choose a tag to compare

0.3.2

Released: Thu Mar 11 2010

  • Calling a def from the top, via
    template.get_def(...).render() now checks the
    argument signature the same way as it did in
    0.2.5, so that TypeError is not raised.
    reopen of

    References: #116

0.3.1

02 Sep 18:49
Compare
Choose a tag to compare

0.3.1

Released: Sun Mar 7 2010

  • Fixed incorrect dir name in setup.py

    References: #129

0.3.0

02 Sep 18:49
Compare
Choose a tag to compare

0.3.0

Released: Fri Mar 5 2010

  • Python 2.3 support is dropped.

    References: #123

  • Python 3 support is added ! See README.py3k
    for installation and testing notes.

    References: #119

  • Unit tests now run with nose.

    References: #127

  • Source code escaping has been simplified.
    In particular, module source files are now
    generated with the Python "magic encoding
    comment", and source code is passed through
    mostly unescaped, except for that code which
    is regenerated from parsed Python source.
    This fixes usage of unicode in
    <%namespace:defname> tags.

    References: #99

  • RichTraceback(), html_error_template().render(),
    text_error_template().render() now accept "error"
    and "traceback" as optional arguments, and
    these are now actually used.

    References: #122

  • The exception output generated when
    format_exceptions=True will now be as a Python
    unicode if it occurred during render_unicode(),
    or an encoded string if during render().

  • A percent sign can be emitted as the first
    non-whitespace character on a line by escaping
    it as in "%%".

    References: #112

  • Template accepts empty control structure, i.e.
    % if: %endif, etc.

    References: #94

  • The <%page args> tag can now be used in a base
    inheriting template - the full set of render()
    arguments are passed down through the inherits
    chain. Undeclared arguments go into **pageargs
    as usual.

    References: #116

  • defs declared within a <%namespace> section, an
    uncommon feature, have been improved. The defs
    no longer get doubly-rendered in the body() scope,
    and now allow local variable assignment without
    breakage.

    References: #109

  • Windows paths are handled correctly if a Template
    is passed only an absolute filename (i.e. with c:
    drive etc.) and no URI - the URI is converted
    to a forward-slash path and module_directory
    is treated as a windows path.

    References: #128

  • TemplateLookup raises TopLevelLookupException for
    a given path that is a directory, not a filename,
    instead of passing through to the template to
    generate IOError.

    References: #73

0.2.5

02 Sep 18:49
Compare
Choose a tag to compare

0.2.5

Released: Mon Sep 7 2009

  • Added a "decorator" kw argument to <%def>,
    allows custom decoration functions to wrap
    rendering callables. Mainly intended for
    custom caching algorithms, not sure what
    other uses there may be (but there may be).
    Examples are in the "filtering" docs.

  • When Mako creates subdirectories in which
    to store templates, it uses the more
    permissive mode of 0775 instead of 0750,
    helping out with certain multi-process
    scenarios. Note that the mode is always
    subject to the restrictions of the existing
    umask.

    References: #101

  • Fixed namespace.getattr() to raise
    AttributeError on attribute not found
    instead of RuntimeError.

    References: #104

  • Added last_modified accessor to Template,
    returns the time.time() when the module
    was created.

    References: #97

  • Fixed lexing support for whitespace
    around '=' sign in defs.

    References: #102

  • Removed errant "lower()" in the lexer which
    was causing tags to compile with
    case-insensitive names, thus messing up
    custom <%call> names.

    References: #108

  • added "mako.version" attribute to
    the base module.

    References: #110

0.2.4

02 Sep 18:49
Compare
Choose a tag to compare

0.2.4

Released: Tue Dec 23 2008

  • Fixed compatibility with Jython 2.5b1.

0.2.3

02 Sep 18:49
Compare
Choose a tag to compare

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).

0.2.2

02 Sep 18:49
Compare
Choose a tag to compare

0.2.2

Released: Mon Jun 23 2008

  • cached blocks now use the current context when rendering
    an expired section, instead of the original context
    passed in

    References: #87

  • fixed a critical issue regarding caching, whereby
    a cached block would raise an error when called within a
    cache-refresh operation that was initiated after the
    initiating template had completed rendering.

0.2.1

02 Sep 18:49
Compare
Choose a tag to compare

0.2.1

Released: Mon Jun 16 2008

  • fixed bug where 'output_encoding' parameter would prevent
    render_unicode() from returning a unicode object.

  • bumped magic number, which forces template recompile for
    this version (fixes incompatible compile symbols from 0.1
    series).

  • added a few docs for cache options, specifically those that
    help with memcached.