Mercurial > hg-stable
changeset 43333:91c746a77fa3 stable
py3: leverage pycompat.long
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 27 Oct 2019 12:51:53 +0900 |
parents | 8fda98a68427 |
children | 4128ffba4431 |
files | mercurial/templatefilters.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)