From: Cory Benfield Date: Sat, 18 May 2013 09:54:29 +0000 (+0100) Subject: No need for tuple comparisons. X-Git-Tag: 2.7~77^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02a4654fb31b7fae4262c1b494b42bba38d1363b;p=thirdparty%2Fjinja.git No need for tuple comparisons. --- diff --git a/jinja2/bccache.py b/jinja2/bccache.py index 7c911880..6638bbb4 100644 --- a/jinja2/bccache.py +++ b/jinja2/bccache.py @@ -28,7 +28,7 @@ from jinja2.utils import open_if_exists # marshal works better on 3.x, one hack less required -if sys.version_info > (3, 0): +if sys.version_info[0] > 3: from io import BytesIO marshal_dump = marshal.dump marshal_load = marshal.load diff --git a/jinja2/testsuite/__init__.py b/jinja2/testsuite/__init__.py index e39e8777..335292de 100644 --- a/jinja2/testsuite/__init__.py +++ b/jinja2/testsuite/__init__.py @@ -89,7 +89,7 @@ def suite(): # doctests will not run on python 3 currently. Too many issues # with that, do not test that on that platform. - if sys.version_info < (3, 0): + if sys.version_info[0] < 3: suite.addTest(doctests.suite()) return suite diff --git a/jinja2/testsuite/lexnparse.py b/jinja2/testsuite/lexnparse.py index e50b4f48..f05f6010 100644 --- a/jinja2/testsuite/lexnparse.py +++ b/jinja2/testsuite/lexnparse.py @@ -22,7 +22,7 @@ env = Environment() # how does a string look like in jinja syntax? -if sys.version_info < (3, 0): +if sys.version_info[0] < 3: def jinja_string_repr(string): return repr(string)[1:] else: diff --git a/jinja2/utils.py b/jinja2/utils.py index b56c749e..d8be8358 100644 --- a/jinja2/utils.py +++ b/jinja2/utils.py @@ -53,7 +53,7 @@ concat = u''.join # This is used in a couple of places. As far as Jinja is concerned # filenames are unicode *or* bytestrings in 2.x and unicode only in # 3.x because compile cannot handle bytes -if sys.version_info < (3, 0): +if sys.version_info[0] < 3: def _encode_filename(filename): if isinstance(filename, unicode): return filename.encode('utf-8')