All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kr.motd.maven.sphinx.dist.jinja2.environment$py.class Maven / Gradle / Ivy

There is a newer version: 2.10.0
Show newest version
????1~f$0R(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
osorg/python/core/imp	importOneH(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;./
0jinja22nodes4jinja2.defaults6BLOCK_START_STRING8BLOCK_END_STRING:VARIABLE_START_STRING<VARIABLE_END_STRING>COMMENT_START_STRING@COMMENT_END_STRINGBLINE_STATEMENT_PREFIXDLINE_COMMENT_PREFIXFTRIM_BLOCKSHNEWLINE_SEQUENCEJDEFAULT_FILTERSL
DEFAULT_TESTSNDEFAULT_NAMESPACEPDEFAULT_POLICIESRKEEP_TRAILING_NEWLINET
LSTRIP_BLOCKSVjinja2.lexerX	get_lexerZTokenStream\
jinja2.parser^Parser`jinja2.nodesbEvalContextdjinja2.compilerfgenerateh
CodeGeneratorjjinja2.runtimel	Undefinednnew_contextpContextrjinja2.exceptionstTemplateSyntaxErrorvTemplateNotFoundxTemplatesNotFoundzTemplateRuntimeError|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?EmptyObjectsorg/python/core/PyObject;??	??org/python/core/PyFunction?	f_globalsLorg/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?
?setExceptionM(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_lastiI??	?java/lang/Throwable?_isnot6(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$pyLorg/python/core/PyCode;?	j(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;Lorg/python/core/PyObject;)V

?get_spontaneous_environmentcreate_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_cache0load_extensions$4wLoad 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
isinstance9m(Lorg/python/core/ThreadState;Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyObject;?;
?<
identifier>__iternext__@6
?A2	Cload_extensionsEfail_for_missing_callable$5_modH?
?I_fail_with_undefined_errorK9(Lorg/python/core/ThreadState;)Lorg/python/core/PyObject;?M
?N	ExceptionPvalueR?	?S3%s (%s; did you forget to quote the callable name?)Uorg/python/core/PyTupleW
X
makeException9(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	undefinediGundefined must be a subclass of undefined because filters depend on it.kAssertionErrormS(Lorg/python/core/PyObject;Lorg/python/core/PyObject;)Lorg/python/core/PyException;Zo
?pblock_start_stringrvariable_start_stringt_nev?
?wcomment_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__$8block_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.
        ?unpackSequence8(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.
        ?localsself__delitem__(Lorg/python/core/PyObject;)V
?
cache_size__new__
	__class____dict__bind?	overlaypropertyThe lexer for this environment.docg(Lorg/python/core/ThreadState;[Lorg/python/core/PyObject;[Ljava/lang/String;)Lorg/python/core/PyObject;?
?lexeriter_extensions$12)Iterates over the extensions by priority."iter$sorted&values(f$13priority+*	-P(Lorg/python/core/PyObject;[Lorg/python/core/PyObject;Lorg/python/core/PyCode;)V
/
?0key2!	4iter_extensions6
getitem$14:Get an item or attribute of an object but prefer the item.9__getitem__;?
?<AttributeError>LookupError@strBgetattrDobjFnameH8	JgetitemL
getattr$15?Get an item or attribute of an object but prefer the attribute.
        Unlike :meth:`getitem` the attribute *must* be a bytestring.
        ON	Qcall_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
        Tno filter named %rVlistX_addZ?
?[
contextfilter]2Attempted to invoke context filter without context_insertaevalcontextfilterceval_ctxeenvironmentfiltergS	icall_filterkcall_test$17dInvokes a test on a value the same way the compiler does it.

        .. versionadded:: 2.7
        nno test named %rpm	r	call_testtparse$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_parseyexc_info{handle_exception}source_hintv	?parse?	_parse$198Internal 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$21to_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.
        ?