[PATCH 2 of 3 py3] parsers: alias long to int on Python 3

Augie Fackler raf at durin42.com
Wed Mar 8 10:49:10 EST 2017


On Wed, Mar 08, 2017 at 12:51:24AM +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1488914119 -19800
> #      Wed Mar 08 00:45:19 2017 +0530
> # Node ID 6ff8f348d278599b1dd79aa6b4d7c7c231ca7b58
> # Parent  f8ec9104d219a01357e8f6118286d9b212695bbe
> parsers: alias long to int on Python 3
>
> diff -r f8ec9104d219 -r 6ff8f348d278 mercurial/pure/parsers.py
> --- a/mercurial/pure/parsers.py	Wed Mar 08 00:40:15 2017 +0530
> +++ b/mercurial/pure/parsers.py	Wed Mar 08 00:45:19 2017 +0530
> @@ -14,6 +14,9 @@
>  from . import pycompat
>  stringio = pycompat.stringio
>
> +if pycompat.ispy3:
> +    long = int

Series is queued, but couldn't we just use int everywhere even in 2.6?
I thought int/long unification was already done enough by then...

> +
>  _pack = struct.pack
>  _unpack = struct.unpack
>  _compress = zlib.compress
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list