diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-20 19:16:16 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-20 19:16:16 -0500 |
commit | 4737c269f5658fdab4190504cd5744e95bae1688 (patch) | |
tree | 5fe1c5244f4e7d263e7d564f924797062859d9c5 /mako/runtime.py | |
parent | bdbe02356b6fa9acb6739879ead25a54e2c62ecb (diff) | |
download | external_python_mako-4737c269f5658fdab4190504cd5744e95bae1688.tar.gz external_python_mako-4737c269f5658fdab4190504cd5744e95bae1688.tar.bz2 external_python_mako-4737c269f5658fdab4190504cd5744e95bae1688.zip |
- use inlined getargspec
- 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.
Diffstat (limited to 'mako/runtime.py')
-rw-r--r-- | mako/runtime.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mako/runtime.py b/mako/runtime.py index e0df124..c13de21 100644 --- a/mako/runtime.py +++ b/mako/runtime.py @@ -662,7 +662,7 @@ def _render(template, callable_, args, data, as_unicode=False): return context._pop_buffer().getvalue() def _kwargs_for_callable(callable_, data): - argspec = inspect.getargspec(callable_) + argspec = util.inspect_func_args(callable_) # for normal pages, **pageargs is usually present if argspec[2]: return data @@ -676,7 +676,7 @@ def _kwargs_for_callable(callable_, data): return kwargs def _kwargs_for_include(callable_, data, **kwargs): - argspec = inspect.getargspec(callable_) + argspec = util.inspect_func_args(callable_) namedargs = argspec[0] + [v for v in argspec[1:3] if v is not None] for arg in namedargs: if arg != 'context' and arg in data and arg not in kwargs: |