diff -r 3741a8f86e88 -r 0f6d6fdd3c2a mercurial/encoding.py --- a/mercurial/encoding.py Fri Sep 30 00:27:35 2016 +0200 +++ b/mercurial/encoding.py Wed Sep 28 20:01:23 2016 +0900 @@ -10,14 +10,14 @@ import array import locale import os -import sys import unicodedata from . import ( error, + pycompat, ) -if sys.version_info[0] >= 3: +if pycompat.ispy3: unichr = chr # These unicode characters are ignored by HFS+ (Apple Technote 1150, @@ -27,7 +27,7 @@ "200c 200d 200e 200f 202a 202b 202c 202d 202e " "206a 206b 206c 206d 206e 206f feff".split()] # verify the next function will work -if sys.version_info[0] >= 3: +if pycompat.ispy3: assert set(i[0] for i in _ignore) == set([ord(b'\xe2'), ord(b'\xef')]) else: assert set(i[0] for i in _ignore) == set(["\xe2", "\xef"])