Revert "add warning and alias for jinja2"
Before adoption: this commit came in with the history the project adopted, so no landing records it.
This reverts commit fc9c60ba457efc4cadf6fa2886567e0ee6ca1a99.
authored by David Lord · committed by David Lord · parent 8d85f9c · Browse files · 7 files·+15 added−12 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
7 files+15 added−12 removed
- tests:+3 added−3 removed
- other:+12 added−9 removed
Provenance
- Commit
4ec93a4- Tree
6e49647- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
8d85f9c
7 files changed+15 added−12 removed
modified:src/jinja/__init__.py+1 added-1 removed
38 unmodified lines39 from .utils import is_undefined40 from .utils import Markup41 from .utils import select_autoescape42 43-__version__ = "2.11.0rc1"43+__version__ = "2.11.0.dev0"modified:src/jinja/compiler.py+1 added-1 removed
710 unmodified lines711 def visit_Template(self, node, frame=None):712 assert frame is None, "no root frame allowed"713 eval_ctx = EvalContext(self.environment, self.name)714 715- from .runtime import exported715+ from .runtime import __all__ as exported716 717 self.writeline("from __future__ import %s" % ", ".join(code_features))718 self.writeline("from jinja.runtime import " + ", ".join(exported))719 1123 unmodified linesmodified:src/jinja/defaults.py+3 added
40 unmodified lines41 "json.dumps_function": None,42 "json.dumps_kwargs": {"sort_keys": True},43 "ext.i18n.trimmed": False,44 }45+46+# export all constants47+__all__ = tuple(x for x in locals().keys() if x.isupper())modified:src/jinja/runtime.py+5 added-5 removed
2 unmodified lines3 import sys4 from itertools import chain5 from types import MethodType6 7-from markupsafe import escape # noqa: F4017+from markupsafe import escape8 from markupsafe import Markup9 from markupsafe import soft_unicode10 11 from ._compat import abc4 unmodified lines16 from ._compat import PY217 from ._compat import string_types18 from ._compat import text_type19 from ._compat import with_metaclass20-from .exceptions import TemplateNotFound # noqa: F40121-from .exceptions import TemplateRuntimeError # noqa: F40120+from .exceptions import TemplateNotFound21+from .exceptions import TemplateRuntimeError22 from .exceptions import UndefinedError23 from .nodes import EvalContext24 from .utils import concat25 from .utils import evalcontextfunction26 from .utils import internalcode27 from .utils import missing28-from .utils import Namespace # noqa: F40128+from .utils import Namespace29 from .utils import object_type_repr30 31 # these variables are exported to the template runtime32-exported = [32+__all__ = [33 "LoopContext",34 "TemplateReference",35 "Macro",36 "Markup",975 unmodified linesmodified:tests/test_bytecode_cache.py+3 added-3 removed
7 unmodified lines8 from jinja.exceptions import TemplateNotFound9 10 11 @pytest.fixture12-def env(package_loader, tmp_path):13- bytecode_cache = FileSystemBytecodeCache(str(tmp_path))14- return Environment(loader=package_loader, bytecode_cache=bytecode_cache)12+def env(package_loader):13+ bytecode_cache = FileSystemBytecodeCache()14+ return Environment(loader=package_loader, bytecode_cache=bytecode_cache,)15 16 17 @pytest.mark.byte_code_cache18 class TestByteCodeCache(object):61 unmodified linesmodified:MANIFEST.in-1 removed
3 unmodified lines4 prune docs/_build5 graft examples6 graft ext7 graft tests8-global-exclude *.pycmodified:setup.py+2 added-1 removed
18 unmodified lines19 "Code": "https://github.com/pallets/jinja",20 "Issue tracker": "https://github.com/pallets/jinja/issues",21 },22 license="BSD-3-Clause",23+ author="Armin Ronacher",24+ author_email="armin.ronacher@active-4.com",25 maintainer="Pallets",26 maintainer_email="contact@palletsprojects.com",27 description="A very fast and expressive template engine.",28 long_description=readme,9 unmodified lines38 "Programming Language :: Python :: 3",39 "Programming Language :: Python :: 3.5",40 "Programming Language :: Python :: 3.6",41 "Programming Language :: Python :: 3.7",40- "Programming Language :: Python :: 3.8",42 "Programming Language :: Python :: Implementation :: CPython",43 "Programming Language :: Python :: Implementation :: PyPy",44 "Topic :: Internet :: WWW/HTTP :: Dynamic Content",45 "Topic :: Software Development :: Libraries :: Python Modules",10 unmodified lines