]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Revert "add warning and alias for jinja2"
authorDavid Lord <davidism@gmail.com>
Mon, 27 Jan 2020 05:12:47 +0000 (21:12 -0800)
committerDavid Lord <davidism@gmail.com>
Mon, 27 Jan 2020 05:12:47 +0000 (21:12 -0800)
This reverts commit fc9c60ba457efc4cadf6fa2886567e0ee6ca1a99.

MANIFEST.in
setup.py
src/jinja/__init__.py
src/jinja/compiler.py
src/jinja/defaults.py
src/jinja/runtime.py
tests/test_bytecode_cache.py

index bf02825672beba06116406a0a99df26d9b2b0817..8cae0c743c6bb86b21ef4ef0395c9650918b8236 100644 (file)
@@ -5,4 +5,3 @@ prune docs/_build
 graft examples
 graft ext
 graft tests
-global-exclude *.pyc
index 4befd02354b8d3e52747a5a5cfa11a98d770bfdd..80e99620233175e4f1c774834235e158ad7ccf7f 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -20,6 +20,8 @@ setup(
         "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.",
@@ -37,7 +39,6 @@ setup(
         "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",
index d758a5b0b803486287c9b17b7ea9927579129170..9c4c9cfc5ecd001478c9895f705a91b7a1d2b0d4 100644 (file)
@@ -40,4 +40,4 @@ from .utils import is_undefined
 from .utils import Markup
 from .utils import select_autoescape
 
-__version__ = "2.11.0rc1"
+__version__ = "2.11.0.dev0"
index f52d788fa133f7067d737279f800e140b5a917fe..88b4988bc52d3b5714a1fc4fea3966b48f23af54 100644 (file)
@@ -712,7 +712,7 @@ class CodeGenerator(NodeVisitor):
         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))
index 8e0e7d771076a8fe0dc71584018338d2caa35fb5..b5d5f4ef63fc3d83b5ce11840dee2b74343d9ca4 100644 (file)
@@ -42,3 +42,6 @@ DEFAULT_POLICIES = {
     "json.dumps_kwargs": {"sort_keys": True},
     "ext.i18n.trimmed": False,
 }
+
+# export all constants
+__all__ = tuple(x for x in locals().keys() if x.isupper())
index d178e41e0de7e290fcafdd32b53ed256ad7eca47..f6d58a61ab0880a5ec80084e7c3e416b91026070 100644 (file)
@@ -4,7 +4,7 @@ import sys
 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
 
@@ -17,19 +17,19 @@ from ._compat import PY2
 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",
index 51c2dcb5253b53b93d07402067e16c3f921b857c..6a6173a0bd7d03890a8154f6933432bd54f4076f 100644 (file)
@@ -9,9 +9,9 @@ from jinja.exceptions import TemplateNotFound
 
 
 @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