graft examples
graft ext
graft tests
-global-exclude *.pyc
"Issue tracker": "https://github.com/pallets/jinja/issues",
},
license="BSD-3-Clause",
+ author="Armin Ronacher",
+ author_email="armin.ronacher@active-4.com",
maintainer="Pallets",
maintainer_email="contact@palletsprojects.com",
description="A very fast and expressive template engine.",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
from .utils import Markup
from .utils import select_autoescape
-__version__ = "2.11.0rc1"
+__version__ = "2.11.0.dev0"
assert frame is None, "no root frame allowed"
eval_ctx = EvalContext(self.environment, self.name)
- from .runtime import exported
+ from .runtime import __all__ as exported
self.writeline("from __future__ import %s" % ", ".join(code_features))
self.writeline("from jinja.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 itertools import chain
from types import MethodType
-from markupsafe import escape # noqa: F401
+from markupsafe import escape
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 # noqa: F401
-from .exceptions import TemplateRuntimeError # noqa: F401
+from .exceptions import TemplateNotFound
+from .exceptions import TemplateRuntimeError
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 # noqa: F401
+from .utils import Namespace
from .utils import object_type_repr
# these variables are exported to the template runtime
-exported = [
+__all__ = [
"LoopContext",
"TemplateReference",
"Macro",
@pytest.fixture
-def env(package_loader, tmp_path):
- bytecode_cache = FileSystemBytecodeCache(str(tmp_path))
- return Environment(loader=package_loader, bytecode_cache=bytecode_cache)
+def env(package_loader):
+ bytecode_cache = FileSystemBytecodeCache()
+ return Environment(loader=package_loader, bytecode_cache=bytecode_cache,)
@pytest.mark.byte_code_cache