__init__.py
This file
Path
src/jinja2/__init__.py
57 lines · 2.4 KiB · Python
Last changed by
fix typoDavid Lordbefore adoption9c11dd6
History of this fileTake it
The walk stopped after 200 commits: lines older than c580dd0 point at it.
update building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0
lines 1–4why, one step back1"""Jinja is a template engine written in pure Python. It provides a2non-XML syntax that supports inline expressions and an optional3sandboxed environment.4"""Merge branch '3.1.x'David Lordbefore adoptionde61312
line 5why, one step back5deprecate `__version__` (#2098)David Lordbefore adoption9e49736
lines 6–9why, one step back6from __future__ import annotations78import typing as t9Merge pull request #1434 from pallets/update-typingDavid Lordbefore adoptiona2e83d0
lines 10–40why, one step back10from .bccache import BytecodeCache as BytecodeCache11from .bccache import FileSystemBytecodeCache as FileSystemBytecodeCache12from .bccache import MemcachedBytecodeCache as MemcachedBytecodeCache13from .environment import Environment as Environment14from .environment import Template as Template15from .exceptions import TemplateAssertionError as TemplateAssertionError16from .exceptions import TemplateError as TemplateError17from .exceptions import TemplateNotFound as TemplateNotFound18from .exceptions import TemplateRuntimeError as TemplateRuntimeError19from .exceptions import TemplatesNotFound as TemplatesNotFound20from .exceptions import TemplateSyntaxError as TemplateSyntaxError21from .exceptions import UndefinedError as UndefinedError22from .loaders import BaseLoader as BaseLoader23from .loaders import ChoiceLoader as ChoiceLoader24from .loaders import DictLoader as DictLoader25from .loaders import FileSystemLoader as FileSystemLoader26from .loaders import FunctionLoader as FunctionLoader27from .loaders import ModuleLoader as ModuleLoader28from .loaders import PackageLoader as PackageLoader29from .loaders import PrefixLoader as PrefixLoader30from .runtime import ChainableUndefined as ChainableUndefined31from .runtime import DebugUndefined as DebugUndefined32from .runtime import make_logging_undefined as make_logging_undefined33from .runtime import StrictUndefined as StrictUndefined34from .runtime import Undefined as Undefined35from .utils import clear_caches as clear_caches36from .utils import is_undefined as is_undefined37from .utils import pass_context as pass_context38from .utils import pass_environment as pass_environment39from .utils import pass_eval_context as pass_eval_context40from .utils import select_autoescape as select_autoescapeupdate building docs instructions in contributing guide (#1235)sixtyfathomsbefore adoptionc580dd0
line 41why, one step back41deprecate `__version__` (#2098)David Lordbefore adoption9e49736
lines 42–49why, one step back4243def __getattr__(name: str) -> t.Any:44 if name == "__version__":45 import importlib.metadata46 import warnings4748 warnings.warn(49 "The `__version__` attribute is deprecated and will be removed in"fix typoDavid Lordbefore adoption9c11dd6
lines 50–51why, one step back50 " Jinja 3.3. Use feature detection or"51 ' `importlib.metadata.version("jinja2")` instead.',deprecate `__version__` (#2098)David Lordbefore adoption9e49736
lines 52–54why, one step back52 DeprecationWarning,53 stacklevel=2,54 )fix typoDavid Lordbefore adoption9c11dd6
line 55why, one step back55 return importlib.metadata.version("jinja2")deprecate `__version__` (#2098)David Lordbefore adoption9e49736
lines 56–57why, one step back5657 raise AttributeError(name)