# HG changeset patch # User Gregory Szorc # Date 1646196634 28800 # Node ID 176f1a0d15dc58dfc3d273458e7015659e32330f # Parent 6f10a2d6adf9a4369f4e2f943ad03859b6793713 py3: use int instead of pycompat.long pycompat.long is aliased to int. So this should have no change in functionality. Differential Revision: https://phab.mercurial-scm.org/D12338 diff -r 6f10a2d6adf9 -r 176f1a0d15dc hgext/convert/monotone.py --- a/hgext/convert/monotone.py Mon Feb 21 11:13:37 2022 -0700 +++ b/hgext/convert/monotone.py Tue Mar 01 20:50:34 2022 -0800 @@ -150,7 +150,7 @@ raise error.Abort(_(b'bad mtn packet - no end of packet size')) lengthstr += read try: - length = pycompat.long(lengthstr[:-1]) + length = int(lengthstr[:-1]) except TypeError: raise error.Abort( _(b'bad mtn packet - bad packet size %s') % lengthstr diff -r 6f10a2d6adf9 -r 176f1a0d15dc hgext/remotefilelog/shallowutil.py --- a/hgext/remotefilelog/shallowutil.py Mon Feb 21 11:13:37 2022 -0700 +++ b/hgext/remotefilelog/shallowutil.py Tue Mar 01 20:50:34 2022 -0800 @@ -175,8 +175,8 @@ _metaitemtypes = { - constants.METAKEYFLAG: (int, pycompat.long), - constants.METAKEYSIZE: (int, pycompat.long), + constants.METAKEYFLAG: (int, int), + constants.METAKEYSIZE: (int, int), } diff -r 6f10a2d6adf9 -r 176f1a0d15dc mercurial/formatter.py --- a/mercurial/formatter.py Mon Feb 21 11:13:37 2022 -0700 +++ b/mercurial/formatter.py Tue Mar 01 20:50:34 2022 -0800 @@ -141,7 +141,7 @@ Returns False if the object is unsupported or must be pre-processed by formatdate(), formatdict(), or formatlist(). """ - return isinstance(obj, (type(None), bool, int, pycompat.long, float, bytes)) + return isinstance(obj, (type(None), bool, int, int, float, bytes)) class _nullconverter(object): diff -r 6f10a2d6adf9 -r 176f1a0d15dc mercurial/templatefilters.py --- a/mercurial/templatefilters.py Mon Feb 21 11:13:37 2022 -0700 +++ b/mercurial/templatefilters.py Tue Mar 01 20:50:34 2022 -0800 @@ -334,7 +334,7 @@ return b'false' elif obj is True: return b'true' - elif isinstance(obj, (int, pycompat.long, float)): + elif isinstance(obj, (int, int, float)): return pycompat.bytestr(obj) elif isinstance(obj, bytes): return b'"%s"' % encoding.jsonescape(obj, paranoid=paranoid) diff -r 6f10a2d6adf9 -r 176f1a0d15dc mercurial/utils/cborutil.py --- a/mercurial/utils/cborutil.py Mon Feb 21 11:13:37 2022 -0700 +++ b/mercurial/utils/cborutil.py Tue Mar 01 20:50:34 2022 -0800 @@ -9,7 +9,6 @@ import struct import sys -from .. import pycompat # Very short very of RFC 7049... # @@ -207,7 +206,7 @@ STREAM_ENCODERS = { bytes: streamencodebytestring, int: streamencodeint, - pycompat.long: streamencodeint, + int: streamencodeint, list: streamencodearray, tuple: streamencodearray, dict: streamencodemap,