diff options
author | David Lord <davidism@gmail.com> | 2021-04-10 08:58:16 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2021-04-10 10:14:42 -0700 |
commit | 788d8bc1728490196f75ba4f8b7b1794a1974f0a (patch) | |
tree | 9441ab5c76b2fc97a90b6b7d563c267b830ba5c6 /CHANGES.rst | |
parent | c8db6c6313e90a47da92722f60010a6ada2e8644 (diff) | |
download | jinja2-788d8bc1728490196f75ba4f8b7b1794a1974f0a.tar.gz |
unify/rename filter and function decorators
Use pass_context instead of contextfilter and contextfunction, etc.
Diffstat (limited to 'CHANGES.rst')
-rw-r--r-- | CHANGES.rst | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index c94894a..1c58908 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -44,8 +44,8 @@ Unreleased - Add ``is filter`` and ``is test`` tests to test if a name is a registered filter or test. This allows checking if a filter is available in a template before using it. Test functions can be - decorated with ``@environmentfunction``, ``@evalcontextfunction``, - or ``@contextfunction``. :issue:`842`, :pr:`1248` + decorated with ``@pass_environment``, ``@pass_eval_context``, + or ``@pass_context``. :issue:`842`, :pr:`1248` - Support ``pgettext`` and ``npgettext`` (message contexts) in i18n extension. :issue:`441` - The ``|indent`` filter's ``width`` argument can be a string to @@ -60,6 +60,15 @@ Unreleased breaks. Other characters are left unchanged. :issue:`769, 952, 1313` - ``|groupby`` filter takes an optional ``default`` argument. :issue:`1359` +- The function and filter decorators have been renamed and unified. + The old names are deprecated. :issue:`1381` + + - ``pass_context`` replaces ``contextfunction`` and + ``contextfilter``. + - ``pass_eval_context`` replaces ``evalcontextfunction`` and + ``evalcontextfilter`` + - ``pass_environment`` replaces ``environmentfunction`` and + ``environmentfilter``. Version 2.11.3 |