
kr.motd.maven.sphinx.dist.jinja2.environment$py.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sphinx-maven-plugin Show documentation
Show all versions of sphinx-maven-plugin Show documentation
Maven plugin that creates the site with Sphinx
???? 1~ f$0 R(Lorg/python/core/PyFrame;Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; __doc__ ?
jinja2.environment
~~~~~~~~~~~~~~~~~~
Provides a class that holds runtime and parsing time options.
:copyright: (c) 2017 by the Jinja Team.
:license: BSD, see LICENSE for more details.
org/python/core/PyString fromInterned .(Ljava/lang/String;)Lorg/python/core/PyString;
org/python/core/PyFrame
setglobal /(Ljava/lang/String;Lorg/python/core/PyObject;)V
setline (I)V
os org/python/core/imp importOne H(Ljava/lang/String;Lorg/python/core/PyFrame;I)Lorg/python/core/PyObject;
setlocal
sys " weakref $ functools & java/lang/String ( reduce * partial ,
importFrom \(Ljava/lang/String;[Ljava/lang/String;Lorg/python/core/PyFrame;I)[Lorg/python/core/PyObject; . /
0 jinja2 2 nodes 4 jinja2.defaults 6 BLOCK_START_STRING 8 BLOCK_END_STRING : VARIABLE_START_STRING < VARIABLE_END_STRING > COMMENT_START_STRING @ COMMENT_END_STRING B LINE_STATEMENT_PREFIX D LINE_COMMENT_PREFIX F TRIM_BLOCKS H NEWLINE_SEQUENCE J DEFAULT_FILTERS L
DEFAULT_TESTS N DEFAULT_NAMESPACE P DEFAULT_POLICIES R KEEP_TRAILING_NEWLINE T
LSTRIP_BLOCKS V jinja2.lexer X get_lexer Z TokenStream \
jinja2.parser ^ Parser ` jinja2.nodes b EvalContext d jinja2.compiler f generate h
CodeGenerator j jinja2.runtime l Undefined n new_context p Context r jinja2.exceptions t TemplateSyntaxError v TemplateNotFound x TemplatesNotFound z TemplateRuntimeError | jinja2.utils ~
import_string ? LRUCache ? Markup ? missing ? concat ? consume ? internalcode ? have_async_gen ? jinja2._compat ? imap ? ifilter ? string_types ? iteritems ? text_type ? reraise ? implements_iterator ? implements_to_string ? encode_filename ? PY2 ? PYPY ? getname .(Ljava/lang/String;)Lorg/python/core/PyObject; ? ?
? org/python/core/Py ?
newInteger (I)Lorg/python/core/PyInteger; ? ?
? ? org/python/core/PyObject ? __call__ S(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
? ? _spontaneous_environments ? None ? _make_traceback ? EmptyObjects [Lorg/python/core/PyObject; ? ? ? ? org/python/core/PyFunction ? f_globals Lorg/python/core/PyObject; ? ? ? get_spontaneous_environment$1 ?Return a new spontaneous environment. A spontaneous environment is an
unnamed and unaccessible (in theory) environment that is used for
templates generated from a string and not from the file system.
? getglobal ? ?
? get ? __getattr__ ? ?
? ? getlocal (I)Lorg/python/core/PyObject; ? ?
? (ILorg/python/core/PyObject;)V ?
? setException M(Ljava/lang/Throwable;Lorg/python/core/PyFrame;)Lorg/python/core/PyException; ? ?
? ? TypeError ? org/python/core/PyException ? match (Lorg/python/core/PyObject;)Z ? ?
? ? Environment ?
_callextra ~([Lorg/python/core/PyObject;[Ljava/lang/String;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
? ? f_lasti I ? ? ? java/lang/Throwable ? _isnot 6(Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ? ?
? ? __nonzero__ ()Z ? ?
? ? __setitem__ 7(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)V ? ?
? ? True ? shared __setattr__
? jinja2/environment$py Lorg/python/core/PyCode; ? j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V
? get_spontaneous_environment create_cache$2 *Return the cache class for the given size. _eq ?
? _lt ?
? org/python/core/PyDictionary ([Lorg/python/core/PyObject;)V
create_cache copy_cache$3 (Create an empty copy of the given cache.# _is% ?
?& type( dict* capacity," .
copy_cache0 load_extensions$4 wLoad the extensions from the list and bind it to the environment.
Returns a dict of instantiated environments.
3 __iter__ ()Lorg/python/core/PyObject;56
?7
isinstance9 m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ?;
?<
identifier> __iternext__@6
?A2 C load_extensionsE fail_for_missing_callable$5 _modH ?
?I _fail_with_undefined_errorK 9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject; ?M
?N ExceptionP valueR ? ?S 3%s (%s; did you forget to quote the callable name?)U org/python/core/PyTupleW
X
makeException 9(Lorg/python/core/PyObject;)Lorg/python/core/PyException;Z[
?\G ^ fail_for_missing_callable` _environment_sanity_check$6 *Perform a sanity check on the environment.c __debug__e
issubclassg undefinedi Gundefined must be a subclass of undefined because filters depend on it.k AssertionErrorm S(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyException;Zo
?p block_start_stringr variable_start_stringt _nev ?
?w comment_start_stringy ;block, variable and comment start strings must be different{ newline_sequence}
?
? _in? ?
?? 3newline_sequence set to unknown line ending string.?b ? _environment_sanity_check? object?
Environment$7
__module__? __name__??The core component of Jinja is the `Environment`. It contains
important shared variables like configuration, filters, tests,
globals and others. Instances of this class may be modified if
they are not shared and if no template was loaded so far.
Modifications on environments after the first template was loaded
will lead to surprising effects and undefined behavior.
Here are the possible initialization parameters:
`block_start_string`
The string marking the beginning of a block. Defaults to ``'{%'``.
`block_end_string`
The string marking the end of a block. Defaults to ``'%}'``.
`variable_start_string`
The string marking the beginning of a print statement.
Defaults to ``'{{'``.
`variable_end_string`
The string marking the end of a print statement. Defaults to
``'}}'``.
`comment_start_string`
The string marking the beginning of a comment. Defaults to ``'{#'``.
`comment_end_string`
The string marking the end of a comment. Defaults to ``'#}'``.
`line_statement_prefix`
If given and a string, this will be used as prefix for line based
statements. See also :ref:`line-statements`.
`line_comment_prefix`
If given and a string, this will be used as prefix for line based
comments. See also :ref:`line-statements`.
.. versionadded:: 2.2
`trim_blocks`
If this is set to ``True`` the first newline after a block is
removed (block, not variable tag!). Defaults to `False`.
`lstrip_blocks`
If this is set to ``True`` leading spaces and tabs are stripped
from the start of a line to a block. Defaults to `False`.
`newline_sequence`
The sequence that starts a newline. Must be one of ``'\r'``,
``'\n'`` or ``'\r\n'``. The default is ``'\n'`` which is a
useful default for Linux and OS X systems as well as web
applications.
`keep_trailing_newline`
Preserve the trailing newline when rendering templates.
The default is ``False``, which causes a single newline,
if present, to be stripped from the end of the template.
.. versionadded:: 2.7
`extensions`
List of Jinja extensions to use. This can either be import paths
as strings or extension classes. For more information have a
look at :ref:`the extensions documentation `.
`optimized`
should the optimizer be enabled? Default is ``True``.
`undefined`
:class:`Undefined` or a subclass of it that is used to represent
undefined values in the template.
`finalize`
A callable that can be used to process the result of a variable
expression before it is output. For example one can convert
``None`` implicitly into an empty string here.
`autoescape`
If set to ``True`` the XML/HTML autoescaping feature is enabled by
default. For more details about autoescaping see
:class:`~jinja2.utils.Markup`. As of Jinja 2.4 this can also
be a callable that is passed the template name and has to
return ``True`` or ``False`` depending on autoescape should be
enabled by default.
.. versionchanged:: 2.4
`autoescape` can now be a function
`loader`
The template loader for this environment.
`cache_size`
The size of the cache. Per default this is ``400`` which means
that if more than 400 templates are loaded the loader will clean
out the least recently used template. If the cache size is set to
``0`` templates are recompiled all the time, if the cache size is
``-1`` the cache will not be cleaned.
.. versionchanged:: 2.8
The cache size was increased to 400 from a low 50.
`auto_reload`
Some loaders load templates from locations where the template
sources may change (ie: file system or database). If
``auto_reload`` is set to ``True`` (default) every time a template is
requested the loader checks if the source changed and if yes, it
will reload the template. For higher performance it's possible to
disable that.
`bytecode_cache`
If set to a bytecode cache object, this object will provide a
cache for the internal Jinja bytecode so that templates don't
have to be parsed if they were not changed.
See :ref:`bytecode-cache` for more information.
`enable_async`
If set to true this enables async template execution which allows
you to take advantage of newer Python features. This requires
Python 3.6 or later.
? False? sandboxed? overlayed? linked_to? exception_handler? exception_formatter? code_generator_class?
context_class?
__init__$8 block_end_string? variable_end_string? comment_end_string? line_statement_prefix? line_comment_prefix? trim_blocks?
lstrip_blocks? keep_trailing_newline? optimized? finalize?
autoescape? copy? filters? tests? globals? loader? cache? bytecode_cache? auto_reload? policies?
extensions? enable_async? is_async? ? ? ??? ? __init__? add_extension$9 \Adds an extension after the environment was created.
.. versionadded:: 2.5
? update? org/python/core/PyList?
?? ?
add_extension? extend$10 ?Add the items to the instance of the environment if they do not exist
yet. This is used by :ref:`extensions ` to register
callbacks and configuration values without breaking inheritance.
? unpackSequence 8(Lorg/python/core/PyObject;I)[Lorg/python/core/PyObject;??
?? hasattr? __not__?6
?? setattr? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ??
??? ? extend?
overlay$11gCreate a new overlay environment that shares all the data with the
current environment except for cache and the overridden attributes.
Extensions cannot be removed for an overlayed environment. An overlayed
environment automatically gets all the extensions of the environment it
is linked to plus optional extra extensions.
Creating overlays should happen after the initial environment was set
up completely. Not all attributes are truly linked, some are just
copied over so modifications on the original environment may not shine
through.
? locals self __delitem__ (Lorg/python/core/PyObject;)V
?
cache_size __new__
__class__ __dict__ bind? overlay property The lexer for this environment. doc g(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject; ?
? lexer iter_extensions$12 )Iterates over the extensions by priority." iter$ sorted& values( f$13 priority+* - P(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)V
/
?0 key2! 4 iter_extensions6
getitem$14 :Get an item or attribute of an object but prefer the item.9 __getitem__; ?
?< AttributeError> LookupError@ strB getattrD objF nameH8 J getitemL
getattr$15 ?Get an item or attribute of an object but prefer the attribute.
Unlike :meth:`getitem` the attribute *must* be a bytestring.
ON Q call_filter$16WInvokes a filter on a value the same way the compiler does it.
Note that on Python 3 this might return a coroutine in case the
filter is running from an environment in async mode and the filter
supports async execution. It's your responsibility to await this
if needed.
.. versionadded:: 2.7
T no filter named %rV listX _addZ ?
?[
contextfilter] 2Attempted to invoke context filter without context_ inserta evalcontextfilterc eval_ctxe environmentfiltergS i call_filterk call_test$17 dInvokes a test on a value the same way the compiler does it.
.. versionadded:: 2.7
n no test named %rpm r call_testt parse$18?Parse the sourcecode and return the abstract syntax tree. This
tree of nodes is used by the compiler to convert the template into
executable source- or bytecode. This is useful for debugging or to
extract information from templates.
If you are :ref:`developing Jinja2 extensions `
this gives you a good overview of the node tree generated.
w _parsey exc_info{ handle_exception} source_hintv ? parse? _parse$19 8Internal parsing function used by `parse` and `compile`.? ?(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject; ??
??? ? lex$20?Lex the given sourcecode and return a generator that yields
tokens as tuples in the form ``(lineno, token_type, value)``.
This can be useful for :ref:`extension development `
and debugging templates.
This does not perform preprocessing. If you want the preprocessing
of the extensions to be applied you have to filter source through
the :meth:`preprocess` method.
? tokeniter?? ? lex?
preprocess$21 to_cell (II)V??
? ?Preprocesses the source with all extensions. This is automatically
called for all parsing and compiling methods but *not* for :meth:`lex`
because there you usually only want the actual source tokenized.
? f$22
preprocess? getderef? ?
?? ?
getclosure? ?
? k(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;[Lorg/python/core/PyObject;)V
?
??? ? _tokenize$23 ?Called by the parser to do the preprocessing and filtering
for all the extensions. Returns a :class:`~jinja2.lexer.TokenStream`.
? tokenize?
filter_stream?? ? _tokenize? _generate$24 |Internal hook that can be overridden to hook a different generate
method in.
.. versionadded:: 2.5
?
defer_init?? ? _generate? _compile$25 {Internal hook that can be overridden to hook a different compile
method in.
.. versionadded:: 2.5
? compile? exec?? ? _compile?
compile$26?Compile a node or template source code. The `name` parameter is
the load name of the template after it was joined using
:meth:`join_path` if necessary, not the filename on the file system.
the `filename` parameter is the estimated filename of the template on
the file system. If the template came from a database or memory this
can be omitted.
The return value of this method is a python code object. If the `raw`
parameter is `True` the return value will be a string with python
code equivalent to the bytecode returned otherwise. This method is
mainly used internally.
`defer_init` is use internally to aid the module code generator. This
causes the generated code to be able to import without the global
environment variable to be set.
.. versionadded:: 2.4
`defer_init` parameter added.
?
?? ? compile_expression$27?A handy helper method that returns a callable that accepts keyword
arguments that appear as variables in the expression. If called it
returns the result of the expression.
This is useful if applications want to use the same rules as Jinja
in template "configuration files" or similar situations.
Example usage:
>>> env = Environment()
>>> expr = env.compile_expression('foo == 42')
>>> expr(foo=23)
False
>>> expr(foo=42)
True
Per default the return value is converted to `None` if the
expression returns an undefined value. This can be changed
by setting `undefined_to_none` to `False`.
>>> env.compile_expression('var')() is None
True
>>> env.compile_expression('var', undefined_to_none=False)()
Undefined
.. versionadded:: 2.1
? variable? state? parse_expression? stream? eos? chunk after expression? current? lineno? set_environment? Assign? Name? result? store? from_string? Template? TemplateExpression?? ? compile_expression? deflated? compile_templates$28;Finds all the templates the loader can find, compiles them
and stores them in `target`. If `zip` is `None`, instead of in a
zipfile, the templates will be stored in a directory.
By default a deflate zip algorithm is used. To switch to
the stored algorithm, `zip` can be set to ``'stored'``.
`extensions` and `filter_func` are passed to :meth:`list_templates`.
Each template returned will be compiled to the target folder or
zipfile.
By default template compilation errors are ignored. In case a
log function is provided, errors are logged. If you want template
syntax errors to abort the compilation you can set `ignore_errors`
to `False` and you will get an exception on syntax errors.
If `py_compile` is set to `True` .pyc files will be written to the
target instead of standard .py files. This flag does not do anything
on pypy and Python 3 where pyc files are not picked up by itself and
don't give much benefit.
.. versionadded:: 2.4
? jinja2.loaders? ModuleLoader f$29 warnings warn Warning
,py_compile has no effect on pypy or Python 3 imp marshal get_magic ÿÿÿÿ org/python/core/PyUnicode /(Ljava/lang/String;)Lorg/python/core/PyUnicode;
encode iso-8859-15 version_info _ge! ?
?" ????????$ _iadd&