Skip to content
Myr

stuff missing from previous commit, thanks git

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thomas Waldmann · committed by Thomas Waldmann · parent a2cf1d3 · Browse files · 2 files+4 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−6 removed

  • other:+4 added−6 removed

2 files+4 added−6 removed

modified:jinja2/_compat.py+2 added-1 removed
1 unmodified line
2"""3 jinja2._compat4 ~~~~~~~~~~~~~~56 Some py2/py3 compatibility support that is not yet available in "six".6 Some py2/py3 compatibility support that is not yet available in7 "six" 1.3.0.8 There are bugs open for "six" for all this stuff, so we can remove it9 again from here as soon as we require a new enough "six" release.1011 :copyright: Copyright 2013 by the Jinja team, see AUTHORS.
8 unmodified lines
modified:jinja2/compiler.py+2 added-5 removed
16 unmodified lines
17from jinja2.utils import Markup, concat, escape, is_python_keyword18import six19from six.moves import cStringIO as StringIO20from six.moves import map, zip21from six.moves import xrange222324operators = {25 'eq': '==',
49 unmodified lines
75def has_safe_repr(value):76 """Does the node have a safe representation?"""77 if value is None or value is NotImplemented or value is Ellipsis:78 return True78 try:79 range_type = xrange80 except NameError:81 range_type = range82 if isinstance(value, (bool, int, float, complex, range_type, Markup) + six.string_types):79 if isinstance(value, (bool, int, float, complex, xrange, Markup) + six.string_types):80 return True81 if isinstance(value, (tuple, list, set, frozenset)):82 for item in value:83 if not has_safe_repr(item):
1572 unmodified lines