py3: leverage pycompat.long stable
authorYuya Nishihara <yuya@tcha.org>
Sun, 27 Oct 2019 12:51:53 +0900
branchstable
changeset 43333 91c746a77fa3
parent 43332 8fda98a68427
child 43334 4128ffba4431
py3: leverage pycompat.long
mercurial/templatefilters.py
--- a/mercurial/templatefilters.py	Fri Oct 25 14:02:40 2019 +0200
+++ b/mercurial/templatefilters.py	Sun Oct 27 12:51:53 2019 +0900
@@ -31,9 +31,6 @@
 urlerr = util.urlerr
 urlreq = util.urlreq
 
-if pycompat.ispy3:
-    long = int
-
 # filters are callables like:
 #   fn(obj)
 # with:
@@ -329,7 +326,7 @@
         return b'false'
     elif obj is True:
         return b'true'
-    elif isinstance(obj, (int, long, float)):
+    elif isinstance(obj, (int, pycompat.long, float)):
         return pycompat.bytestr(obj)
     elif isinstance(obj, bytes):
         return b'"%s"' % encoding.jsonescape(obj, paranoid=paranoid)