Skip to content
Myr

Merge pull request #214 from Lukasa/luk-sprint-branch

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

authored by Armin Ronacher · committed by Armin Ronacher · parents 58d458d, d5a0edf · Browse files · 2 files+7 added−5 removed
This commit

State

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

Trailers

  • Sprint: More misc fixes

Diff stats

2 files+7 added−5 removed

  • other:+7 added−5 removed

2 files+7 added−5 removed

modified:jinja2/bccache.py+1 added-1 removed
26 unmodified lines
27from jinja2.utils import open_if_exists282930# marshal works better on 3.x, one hack less required31if sys.version_info[0] > 3:31if sys.version_info[0] >= 3:32 from io import BytesIO33 marshal_dump = marshal.dump34 marshal_load = marshal.load35else:
266 unmodified lines
modified:jinja2/compiler.py+6 added-4 removed
16 unmodified lines
17from jinja2.utils import Markup, concat, escape, is_python_keyword18import six19from six.moves import cStringIO as StringIO, map2021# TODO: Move this to the compat module.22try:23 range_type = xrange24except NameError:25 range_type = range262728operators = {29 'eq': '==',30 'ne': '!=',31 'gt': '>',
47 unmodified lines
79def has_safe_repr(value):80 """Does the node have a safe representation?"""81 if value is None or value is NotImplemented or value is Ellipsis:82 return True77 try:78 range_type = xrange79 except NameError:80 range_type = range83 if isinstance(value, (bool, int, float, complex, range_type, Markup) + six.string_types):84 return True85 if isinstance(value, (tuple, list, set, frozenset)):86 for item in value:
1573 unmodified lines