pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/py-jinja2 py-jinja2: updated to 2.11.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/db93f2be5613
branches:  trunk
changeset: 410932:db93f2be5613
user:      adam <adam%pkgsrc.org@localhost>
date:      Sat Feb 01 20:31:28 2020 +0000

description:
py-jinja2: updated to 2.11.1

Version 2.11.1
- Fix a bug that prevented looking up a key after an attribute
  (``{{ data.items[1:] }}``) in an async template.

Version 2.11.0
- Drop support for Python 2.6, 3.3, and 3.4. This will be the last
  version to support Python 2.7 and 3.5.
- Added a new ``ChainableUndefined`` class to support getitem and
  getattr on an undefined object.
- Allow ``{%+`` syntax (with NOP behavior) when ``lstrip_blocks`` is
  disabled.
- Added a ``default`` parameter for the ``map`` filter.
- Exclude environment globals from
  :func:`meta.find_undeclared_variables`.
- Float literals can be written with scientific notation, like
  2.56e-3.
- Int and float literals can be written with the '_' separator for
  legibility, like 12_345.
- Fix a bug causing deadlocks in ``LRUCache.setdefault``.
- The ``trim`` filter takes an optional string of characters to trim.
- A new ``jinja2.ext.debug`` extension adds a ``{% debug %}`` tag to
  quickly dump the current context and available filters and tests.
- Lexing templates with large amounts of whitespace is much faster.
- Parentheses around comparisons are preserved, so
  ``{{ 2 * (3 < 5) }}`` outputs "2" instead of "False".
- Add new ``boolean``, ``false``, ``true``, ``integer`` and ``float``
  tests.
- The environment's ``finalize`` function is only applied to the
  output of expressions (constant or not), not static template data.
- When providing multiple paths to ``FileSystemLoader``, a template
  can have the same name as a directory.
- Always return :class:`Undefined` when omitting the ``else`` clause
  in a ``{{ 'foo' if bar }}`` expression, regardless of the
  environment's ``undefined`` class. Omitting the ``else`` clause is a
  valid shortcut and should not raise an error when using
  :class:`StrictUndefined`.
- Fix behavior of ``loop`` control variables such as ``length`` and
  ``revindex0`` when looping over a generator.
- Async support is only loaded the first time an environment enables
  it, in order to avoid a slow initial import.
- In async environments, the ``|map`` filter will await the filter
  call if needed.
- In for loops that access ``loop`` attributes, the iterator is not
  advanced ahead of the current iteration unless ``length``,
  ``revindex``, ``nextitem``, or ``last`` are accessed. This makes it
  less likely to break ``groupby`` results.
- In async environments, the ``loop`` attributes ``length`` and
  ``revindex`` work for async iterators.
- In async environments, values from attribute/property access will
  be awaited if needed.
- :class:`~loader.PackageLoader` doesn't depend on setuptools or
  pkg_resources.
- ``PackageLoader`` has limited support for :pep:`420` namespace
  packages.
- Support :class:`os.PathLike` objects in
  :class:`~loader.FileSystemLoader` and :class:`~loader.ModuleLoader`.
- :class:`~nativetypes.NativeTemplate` correctly handles quotes
  between expressions. ``"'{{ a }}', '{{ b }}'"`` renders as the tuple
  ``('1', '2')`` rather than the string ``'1, 2'``.
- Creating a :class:`~nativetypes.NativeTemplate` directly creates a
  :class:`~nativetypes.NativeEnvironment` instead of a default
  :class:`Environment`.
- After calling ``LRUCache.copy()``, the copy's queue methods point to
  the correct queue.
- Compiling templates always writes UTF-8 instead of defaulting to the
  system encoding.
- ``|wordwrap`` filter treats existing newlines as separate paragraphs
  to be wrapped individually, rather than creating short intermediate
  lines.
- Add ``break_on_hyphens`` parameter to ``|wordwrap`` filter.
- Cython compiled functions decorated as context functions will be
  passed the context.
- When chained comparisons of constants are evaluated at compile time,
  the result follows Python's behavior of returning ``False`` if any
  comparison returns ``False``, rather than only the last one.
- Tracebacks for exceptions in templates show the correct line numbers
  and source for Python >= 3.7.
- Tracebacks for template syntax errors in Python 3 no longer show
  internal compiler frames.
- Add a ``DerivedContextReference`` node that can be used by
  extensions to get the current context and local variables such as
  ``loop``.
- Constant folding during compilation is applied to some node types
  that were previously overlooked.
- ``TemplateSyntaxError.source`` is not empty when raised from an
  included template.
- Passing an ``Undefined`` value to ``get_template`` (such as through
  ``extends``, ``import``, or ``include``), raises an
  ``UndefinedError`` consistently. ``select_template`` will show the
  undefined message in the list of attempts rather than the empty
  string.
- ``TemplateSyntaxError`` can be pickled.

diffstat:

 textproc/py-jinja2/Makefile |   4 ++--
 textproc/py-jinja2/distinfo |  10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (27 lines):

diff -r c2b7de047514 -r db93f2be5613 textproc/py-jinja2/Makefile
--- a/textproc/py-jinja2/Makefile       Sat Feb 01 20:21:25 2020 +0000
+++ b/textproc/py-jinja2/Makefile       Sat Feb 01 20:31:28 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.26 2019/10/07 05:34:29 adam Exp $
+# $NetBSD: Makefile,v 1.27 2020/02/01 20:31:28 adam Exp $
 
-DISTNAME=      Jinja2-2.10.3
+DISTNAME=      Jinja2-2.11.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:tl}
 CATEGORIES=    textproc python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=J/Jinja2/}
diff -r c2b7de047514 -r db93f2be5613 textproc/py-jinja2/distinfo
--- a/textproc/py-jinja2/distinfo       Sat Feb 01 20:21:25 2020 +0000
+++ b/textproc/py-jinja2/distinfo       Sat Feb 01 20:31:28 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.15 2019/10/07 05:34:30 adam Exp $
+$NetBSD: distinfo,v 1.16 2020/02/01 20:31:28 adam Exp $
 
-SHA1 (Jinja2-2.10.3.tar.gz) = fbb6a03ad01b766d816650147d1fccfc145de9e0
-RMD160 (Jinja2-2.10.3.tar.gz) = 4263b890044aced2d8bdac7e41eb302f5b97987c
-SHA512 (Jinja2-2.10.3.tar.gz) = c51c335450f46a467b0d40de1a51c149bdb4eb961ea888b64ff141e11b592b32e05040bfd9aa4a39892dda8d9d8cbf5a35b386ea16a247484d31b5b52eda1b8f
-Size (Jinja2-2.10.3.tar.gz) = 257888 bytes
+SHA1 (Jinja2-2.11.1.tar.gz) = b91c60ab27866be173aa836dacf52b2292f9f777
+RMD160 (Jinja2-2.11.1.tar.gz) = 71a7a6b85b2bc5d233885027d4584fa94807be82
+SHA512 (Jinja2-2.11.1.tar.gz) = a9b7c1c0151f3b1a0764dc36f489104f30cc84f61d81cf018d7a5e9b5390ad07eb27d3d3d497812ea4130ddbd9142060117947c3283b1a646ce196709183ada6
+Size (Jinja2-2.11.1.tar.gz) = 258043 bytes



Home | Main Index | Thread Index | Old Index