Sourced from jinja2's releases.
2.11.1
This fixes an issue in async environment when indexing the result of an attribute lookup, like
{{ data.items[1:] }}
.
Sourced from jinja2's changelog.
Version 2.11.1
Released 2020-01-30
- Fix a bug that prevented looking up a key after an attribute (
{{ data.items[1:] }}
) in an async template. 1141Version 2.11.0
Released 2020-01-27
... (truncated)
- 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. 977- Allow
{%+
syntax (with NOP behavior) whenlstrip_blocks
is disabled. 748- Added a
default
parameter for themap
filter. 557- Exclude environment globals from meta.find_undeclared_variables. 931
- Float literals can be written with scientific notation, like 2.56e-3. 912, 922
- Int and float literals can be written with the '_' separator for legibility, like 12_345. 923
- Fix a bug causing deadlocks in
LRUCache.setdefault
. 1000- The
trim
filter takes an optional string of characters to trim. 828- A new
jinja2.ext.debug
extension adds a{% debug %}
tag to quickly dump the current context and available filters and tests. 174, 798, 983- Lexing templates with large amounts of whitespace is much faster. 857, 858
- Parentheses around comparisons are preserved, so
{{ 2 * (3 < 5) }}
outputs "2" instead of "False". 755, 938- Add new
boolean
,false
,true
,integer
andfloat
tests. 824- The environment's
finalize
function is only applied to the output of expressions (constant or not), not static template data. 63- When providing multiple paths to
FileSystemLoader
, a template can have the same name as a directory. 821- Always return Undefined when omitting the
else
clause in a{{ 'foo' if bar }}
expression, regardless of the environment'sundefined
class. Omitting theelse
clause is a valid shortcut and should not raise an error when using StrictUndefined. 710, 1079- Fix behavior of
loop
control variables such aslength
andrevindex0
when looping over a generator. 459, 751, 794, 993- Async support is only loaded the first time an environment enables it, in order to avoid a slow initial import. 765
- In async environments, the
|map
filter will await the filter call if needed. 913- In for loops that access
loop
attributes, the iterator is not advanced ahead of the current iteration unlesslength
,revindex
,nextitem
, orlast
are accessed. This makes it less likely to breakgroupby
results. 555, 1101- In async environments, the
loop
attributeslength
andrevindex
work for async iterators. 1101- In async environments, values from attribute/property access will be awaited if needed. 1101
- ~loader.PackageLoader doesn't depend on setuptools or pkg_resources. 970
PackageLoader
has limited support for 420 namespace packages. 1097- Support os.PathLike objects in ~loader.FileSystemLoader and ~loader.ModuleLoader. 870
- ~nativetypes.NativeTemplate correctly handles quotes between expressions.
"'{{ a }}', '{{ b }}'"
renders as the tuple('1', '2')
rather than the string'1, 2'
. 1020- Creating a ~nativetypes.NativeTemplate directly creates a ~nativetypes.NativeEnvironment instead of a default Environment. 1091
- After calling
LRUCache.copy()
, the copy's queue methods point to the correct queue. 843- Compiling templates always writes UTF-8 instead of defaulting to the system encoding. 889
|wordwrap
filter treats existing newlines as separate paragraphs to be wrapped individually, rather than creating short intermediate lines. 175- Add
break_on_hyphens
parameter to|wordwrap
filter. 550- Cython compiled functions decorated as context functions will be passed the context. 1108
- When chained comparisons of constants are evaluated at compile time, the result follows Python's behavior of returning
False
if any comparison returnsFalse
, rather than only the last one. 1102- Tracebacks for exceptions in templates show the correct line numbers and source for Python >= 3.7. 1104
- Tracebacks for template syntax errors in Python 3 no longer show internal compiler frames. 763
- Add a
DerivedContextReference
node that can be used by extensions to get the current context and local variables such asloop
. 860- Constant folding during compilation is applied to some node types that were previously overlooked. 733
TemplateSyntaxError.source
is not empty when raised from an included template. 457
b85283e
release version 2.11.13d5bfc6
Merge pull request #1143 from pallets/bugfix/attribute-accessd61c1ea
add changelog15d7e61
Added regression test for slicing of attributes05dee9b
Fix attribute access in async code. Fixes #1141bbdafe3
release version 2.11.09ff27f6
add python 3.8 classifier, clean up changelogd312609
isolate bytecode cache tests9849979
import Markup from markupsafe, fix flake8 import warningsc6d864c
increment bytecode cache version