aboutsummaryrefslogtreecommitdiffstats
path: root/mako/runtime.py
Commit message (Collapse)AuthorAgeFilesLines
* happy new yearMike Bayer2020-01-051-1/+1
| | | | | | also fix one flake8 error Change-Id: Ia828267fce34d5b194898e3e301b6d463470f068
* Bump Python versions, remove conditional importsMike Bayer2019-07-271-9/+10
| | | | | | | | | | | | | | | | | | | | | | Mako 1.1 now supports Python versions: * 2.7 * 3.4 and higher This includes that setup.py no longer includes any conditionals, allowing for a pure Python wheel build, however this is not necessarily part of the Pypi release process as of yet. The test suite also raises for Python deprecation warnings. Fixes: #249 Replaced usage of ``inspect.getfullargspec()`` with the vendored version used by SQLAlchemy, Alembic to avoid future deprecation warnings. Also cleans up an additional version of the same function that's apparently been floating around for some time. Fixes: #295 Change-Id: I98274c16b6022289d1890f4daf532bab323ab112
* - update copyrightMike Bayer2019-05-311-1/+1
| | | | Change-Id: I258e9ff77e5a9ac687cd20d33b6d75de7c79b4dc
* Use tox / zimportsMike Bayer2019-05-311-66/+117
| | | | Change-Id: Ia047c7052a6d242c2cf1c7a83981f1e38ea4d928
* Add include_error_handler parameter.Huayi Zhang2016-11-081-1/+10
| | | | | | | | This works like error_handler but is specific to a template when included in another using the include tag. Change-Id: Ie5506a8cba42c71519c703eacc82050902b9ceba Pull-request: https://bitbucket.org/zzzeek/mako/pull-requests/22
* - happy new yearMike Bayer2016-03-101-1/+1
|
* - get flake8 to pass fully for mako/ (tests are a much bigger deal)Mike Bayer2015-03-251-38/+68
|
* Add STOP_RENDERING keyword; exiting of a template.Cody Taylor2015-03-241-0/+1
| | | | Signed-off-by: Cody Taylor <codemister99@yahoo.com>
* happy new yearrel_1_0_1Mike Bayer2015-01-221-1/+1
|
* use reraise function for error_handlerdesignst2014-05-221-10/+3
|
* reraise more exception information if template error_handler is defineddesignst2014-05-211-3/+10
|
* - will now be 1.0Mike Bayer2014-04-281-12/+8
| | | | | - drop python 2.4, 2.5 support - various pep8ing
* - 2014Mike Bayer2014-01-091-1/+1
| | | | - move CHANGES to changelog.rst
* - [bug] The Context.locals_() method becomes a private underscoredMike Bayer2013-08-031-8/+32
| | | | | | | method, as this method has a specific internal use. The purpose of Context.kwargs has been clarified, in that it only delivers top level keyword arguments originally passed to template.render(). [ticket:219]
* - [bug] Using <%namespace import="*" module="somemodule"/> nowMike Bayer2013-08-031-6/+6
| | | | | | skips over module elements that are not explcitly callable, avoiding TypeError when trying to produce partials. [ticket:207]
* update copyrightMike Bayer2013-08-031-1/+1
|
* - add static dependencies exampleMike Bayer2012-11-251-2/+7
|
* py2.5 worksMike Bayer2012-11-111-5/+5
|
* - first pass at running a py3k compatible base in py2k as well.Mike Bayer2012-11-111-22/+34
| | | | | having some weird unicode issues I can't debug; the meaning of str.encode() seems to be changing globally somehow
* epic trailing whitespace removalMike Bayer2012-07-071-82/+82
|
* Add some `reStructuredText` (or `Sphinx` related) markups:Vincent Férotin2012-05-141-30/+32
| | | | | add more litterals, systematicaly use ``.. sourcecode::`` before code samples, add some ``:func:``, ``:class:`` and so on, fix some links, etc.
* Fix some various typos in documentation:Vincent Férotin2012-05-141-59/+59
| | | | | | fix misspelled words, remove line ending spaces, change ``-`` to ``--``, add some ``'`` between subject and 'to be' verb (e.g. "it's", "i'm"), add some ending dots to sentences, change some letters "capitalness", etc.
* - add a path to disable the loop feature - enable_loop=FalseMike Bayer2012-03-291-1/+4
| | | | | - fix up links, formatting in docs - remove some repetition in the _compile logic
* Brought all modules into PEP 8 width complianceBenjamin Trofatter2012-03-241-2/+2
|
* - apply the #125 patchMike Bayer2012-03-241-3/+114
| | | | - changelog
* - [bug] Fixed endless recursion bug whenMike Bayer2012-03-081-1/+5
| | | | | nesting multiple def-calls with content. Thanks to Jeff Dairiki. [ticket:186]
* 2012Mike Bayer2012-01-161-1/+1
|
* make it more clear about what "context" is called in a templateMike Bayer2011-12-051-1/+1
|
* - Template caching has been converted into a pluginMike Bayer2011-10-011-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | system, whereby the usage of Beaker is just the default plugin. Template and TemplateLookup now accept a string "cache_impl" parameter which refers to the name of a cache plugin, defaulting to the name 'beaker'. New plugins can be registered as pkg_resources entrypoints under the group "mako.cache", or registered directly using mako.cache.register_plugin(). The core plugin is the mako.cache.CacheImpl class. - The <%def>, <%block> and <%page> tags now accept any argument named "cache_*", and the key minus the "cache_" prefix will be passed as keyword arguments to the CacheImpl methods. - Template and TemplateLookup now accept an argument cache_args, which refers to a dictionary containing cache parameters. The cache_dir, cache_url, cache_type, cache_timeout arguments are deprecated (will probably never be removed, however) and can be passed now as cache_args={'url':<some url>, 'type':'memcached', 'timeout':50, 'dir':'/path/to/some/directory'}
* - the "ascii encoding by default" approach doesn't work in Py3K,Mike Bayer2011-02-211-3/+3
| | | | | | | | | because a string and an ascii encoded string are of course different things, and we'd like render() by default to return a string. So go the other way, use FEB in all cases, add a new flag bytestring_passthrough which goes back to StringIO, to support that one guy who wanted to force a bytestring through in an expression.
* - the keys() in the Context, as well asMike Bayer2011-02-201-10/+9
| | | | | | | | it's internal _data dictionary, now include just what was specified to render() as well as Mako builtins 'caller', 'capture'. The contents of __builtin__ are no longer copied.
* - use inlined getargspecMike Bayer2011-02-201-2/+2
| | | | | | | | | | | | | | | - The "output encoding" now defaults to "ascii", whereas previously it was set to None. This has the effect of FastEncodingBuffer being used internally by default when render() is called, instead of cStringIO or StringIO, which are slower, but allow bytestrings with unknown encoding to pass right through. It is of course not recommended to use bytestrings of unknown encoding. Usage of the "disable_unicode" mode also requires that output_encoding be set to None.
* got all tests to pass againMike Bayer2011-02-201-12/+32
|
* moving around getargs and such, have a recursion error in one test not ↵Mike Bayer2011-02-191-66/+107
| | | | figured out yet
* step 1, three separate classes, new magic numberMike Bayer2011-02-191-25/+50
|
* - add AUTHORS fileMike Bayer2011-02-191-2/+2
| | | | - convert heading copyrights to 2006-2011, reference AUTHORS file
* - now that trailing whitespace comes up in red, need to get rid of itMike Bayer2011-01-191-88/+88
|
* cleanuprel_0_3_6Mike Bayer2010-11-131-12/+27
|
* - more cleanupMike Bayer2010-11-131-29/+132
| | | | | | - move Namespace docs inline to attributes on Namespace - document Cache methods, add to caching.rst - use functools.partial for partials, part of [ticket:156]
* looks goodMike Bayer2010-11-121-13/+70
|
* - Calling a def from the top, viarel_0_3_2Mike Bayer2010-03-111-3/+18
| | | | | | | 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 [ticket:116]
* - added docs for supports_caller() as well as runtime.py capture(), [ticket:124]Mike Bayer2010-03-051-9/+30
| | | | - cleanup
* - The <%page args> tag can now be used in a baseMike Bayer2010-03-051-1/+2
| | | | | | | inheriting template - the full set of render() arguments are passed down through the inherits chain. Undeclared arguments go into **pageargs as usual. [ticket:116]
* - RichTraceback(), html_error_template().render(),Mike Bayer2010-03-051-1/+4
| | | | | | text_error_template().render() now accept "error" and "traceback" as optional arguments, and these are now actually used. [ticket:122]
* - merged -r481:499 of py3k branch.Mike Bayer2010-03-041-14/+27
| | | | | | - Python 3 support is added ! See README.py3k for installation and testing notes. [ticket:119]
* - ensure lru threading test doesn't runMike Bayer2010-03-021-1/+4
| | | | | | | | | | | - 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. [ticket:99]
* move lib/mako to makoMike Bayer2010-02-051-0/+419