non-XML syntax that supports inline expressions and an optional
sandboxed environment.
"""
+from markupsafe import escape
+from markupsafe import Markup
+
from .bccache import BytecodeCache
from .bccache import FileSystemBytecodeCache
from .bccache import MemcachedBytecodeCache
from .utils import clear_caches
from .utils import contextfunction
from .utils import environmentfunction
-from .utils import escape
from .utils import evalcontextfunction
from .utils import is_undefined
-from .utils import Markup
from .utils import select_autoescape
-__version__ = "2.11.0.dev0"
+__version__ = "2.11.0rc2"
import inspect
from functools import update_wrapper
+from markupsafe import Markup
+
from .environment import TemplateModule
from .runtime import LoopContext
from .utils import concat
from .utils import internalcode
-from .utils import Markup
from .utils import missing
from itertools import chain
from keyword import iskeyword as is_python_keyword
+from markupsafe import escape
+from markupsafe import Markup
+
from . import nodes
from ._compat import imap
from ._compat import iteritems
from .nodes import EvalContext
from .optimizer import Optimizer
from .utils import concat
-from .utils import escape
-from .utils import Markup
from .visitor import NodeVisitor
operators = {
assert frame is None, "no root frame allowed"
eval_ctx = EvalContext(self.environment, self.name)
- from .runtime import __all__ as exported
+ from .runtime import exported
self.writeline("from __future__ import %s" % ", ".join(code_features))
self.writeline("from jinja2.runtime import " + ", ".join(exported))
"json.dumps_kwargs": {"sort_keys": True},
"ext.i18n.trimmed": False,
}
-
-# export all constants
-__all__ = tuple(x for x in locals().keys() if x.isupper())
from functools import partial
from functools import reduce
+from markupsafe import Markup
+
from . import nodes
from ._compat import encode_filename
from ._compat import implements_iterator
from .utils import import_string
from .utils import internalcode
from .utils import LRUCache
-from .utils import Markup
from .utils import missing
# for direct template usage we have up to ten living environments
`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
+ :class:`~markupsafe.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.
import re
from sys import version_info
+from markupsafe import Markup
+
from . import nodes
from ._compat import iteritems
from ._compat import string_types
from .runtime import concat
from .utils import contextfunction
from .utils import import_string
-from .utils import Markup
# the only real useful gettext functions for a Jinja template. Note
# that ugettext must be assigned to gettext as Jinja doesn't support
import operator
from collections import deque
+from markupsafe import Markup
+
from ._compat import izip
from ._compat import PY2
from ._compat import text_type
from ._compat import with_metaclass
-from .utils import Markup
_binop_to_func = {
"*": operator.mul,
from itertools import chain
from types import MethodType
-from markupsafe import escape
+from markupsafe import escape # noqa: F401
from markupsafe import Markup
from markupsafe import soft_unicode
from ._compat import string_types
from ._compat import text_type
from ._compat import with_metaclass
-from .exceptions import TemplateNotFound
-from .exceptions import TemplateRuntimeError
+from .exceptions import TemplateNotFound # noqa: F401
+from .exceptions import TemplateRuntimeError # noqa: F401
from .exceptions import UndefinedError
from .nodes import EvalContext
from .utils import concat
from .utils import evalcontextfunction
from .utils import internalcode
from .utils import missing
-from .utils import Namespace
+from .utils import Namespace # noqa: F401
from .utils import object_type_repr
# these variables are exported to the template runtime
-__all__ = [
+exported = [
"LoopContext",
"TemplateReference",
"Macro",
from string import Formatter
from markupsafe import EscapeFormatter
+from markupsafe import Markup
from ._compat import abc
from ._compat import PY2
from ._compat import string_types
from .environment import Environment
from .exceptions import SecurityError
-from .utils import Markup
#: maximum number of items a range may produce
MAX_RANGE = 100000