Skip to content

1.0.0

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

1.0.0

Released: Sun Jun 8 2014

  • [bug] [py2k] Improved the error re-raise operation when a custom
    Template.error_handler is used that does not handle
    the exception; the original stack trace etc. is now preserved.
    Pull request courtesy Manfred Haltner.

  • [bug] [filters] [py2k] Added an html_escape filter that works in "non unicode" mode.
    Previously, when using disable_unicode=True, the u filter
    would fail to handle non-ASCII bytes properly. Pull request
    courtesy George Xie.

  • [general] Compatibility changes; in order to modernize the codebase, Mako
    is now dropping support for Python 2.4 and Python 2.5 altogether.
    The source base is now targeted at Python 2.6 and forwards.

  • [feature] Template modules now generate a JSON "metadata" structure at the bottom
    of the source file which includes parseable information about the
    templates' source file, encoding etc. as well as a mapping of module
    source lines to template lines, thus replacing the "# SOURCE LINE"
    markers throughout the source code. The structure also indicates those
    lines that are explicitly not part of the template's source; the goal
    here is to allow better integration with coverage and other tools.

  • [bug] [py3k] Fixed bug in decode.<encoding> filter where a non-string object
    would not be correctly interpreted in Python 3.

  • [bug] [py3k] Fixed bug in Python parsing logic which would fail on Python 3
    when a "try/except" targeted a tuple of exception types, rather
    than a single exception.

    References: #227

  • [feature] mako-render is now implemented as a setuptools entrypoint script;
    a standalone mako.cmd.cmdline() callable is now available, and the
    system also uses argparse now instead of optparse. Pull request
    courtesy Derek Harland.

  • [feature] The mako-render script will now catch exceptions and run them
    into the text error handler, and exit with a non-zero exit code.
    Pull request courtesy Derek Harland.

  • [bug] A rework of the mako-render script allows the script to run
    correctly when given a file pathname that is outside of the current
    directory, e.g. mako-render ../some_template.mako. In this case,
    the "template root" defaults to the directory in which the template
    is located, instead of ".". The script also accepts a new argument
    --template-dir which can be specified multiple times to establish
    template lookup directories. Standard input for templates also works
    now too. Pull request courtesy Derek Harland.

  • [feature] [py3k] Support is added for Python 3 "keyword only" arguments, as used in
    defs. Pull request courtesy Eevee.

    References: pull request github:7