Skip to content
Myr

No need for tuple comparisons.

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

authored by Cory Benfield · committed by Cory Benfield · parent 86e5f97 · Browse files · 4 files+4 added−4 removed
This commit

State

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

Diff stats

4 files+4 added−4 removed

  • other:+4 added−4 removed

4 files+4 added−4 removed

modified:jinja2/testsuite/__init__.py+1 added-1 removed
87 unmodified lines
88 suite.addTest(utils.suite())8990 # doctests will not run on python 3 currently. Too many issues91 # with that, do not test that on that platform.92 if sys.version_info < (3, 0):92 if sys.version_info[0] < 3:93 suite.addTest(doctests.suite())9495 return suite
modified:jinja2/testsuite/lexnparse.py+1 added-1 removed
20 unmodified lines
21env = Environment()222324# how does a string look like in jinja syntax?25if sys.version_info < (3, 0):25if sys.version_info[0] < 3:26 def jinja_string_repr(string):27 return repr(string)[1:]28else:29 jinja_string_repr = repr
385 unmodified lines
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 > (3, 0):31if sys.version_info[0] > 3:32 from io import BytesIO33 marshal_dump = marshal.dump34 marshal_load = marshal.load35else:
266 unmodified lines
modified:jinja2/utils.py+1 added-1 removed
51 unmodified lines
52# when passed to encode we let this function encode it properly.53# This is used in a couple of places. As far as Jinja is concerned54# filenames are unicode *or* bytestrings in 2.x and unicode only in55# 3.x because compile cannot handle bytes56if sys.version_info < (3, 0):56if sys.version_info[0] < 3:57 def _encode_filename(filename):58 if isinstance(filename, unicode):59 return filename.encode('utf-8')60 return filename
518 unmodified lines