Patchwork [1,of,8,py3] loader: pywatchman appears to already be py3 compatible

login
register
mail settings
Submitter Augie Fackler
Date May 28, 2017, 8:58 p.m.
Message ID <544f6b7f4a3d2542942c.1496005137@imladris.local>
Download mbox | patch
Permalink /patch/21004/
State Accepted
Headers show

Comments

Augie Fackler - May 28, 2017, 8:58 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1496000747 14400
#      Sun May 28 15:45:47 2017 -0400
# Node ID 544f6b7f4a3d2542942c733fb3f82bfd8a5a9867
# Parent  2ba4d3b74ba8360e97cbae25cb4584283dac4eb9
loader: pywatchman appears to already be py3 compatible

Our loader was doing some confusing things in pywatchman, but it looks
like we shouldn't be using it there anyway.
Pulkit Goyal - May 29, 2017, 11:16 a.m.
This patch breaks test-check-py3-compat.t for which I have send a
follow-up. Apart from that the series looks good to me.

On Mon, May 29, 2017 at 2:28 AM, Augie Fackler <raf@durin42.com> wrote:

> # HG changeset patch
> # User Augie Fackler <raf@durin42.com>
> # Date 1496000747 14400
> #      Sun May 28 15:45:47 2017 -0400
> # Node ID 544f6b7f4a3d2542942c733fb3f82bfd8a5a9867
> # Parent  2ba4d3b74ba8360e97cbae25cb4584283dac4eb9
> loader: pywatchman appears to already be py3 compatible
>
> Our loader was doing some confusing things in pywatchman, but it looks
> like we shouldn't be using it there anyway.
>
> diff --git a/mercurial/__init__.py b/mercurial/__init__.py
> --- a/mercurial/__init__.py
> +++ b/mercurial/__init__.py
> @@ -34,6 +34,9 @@ if sys.version_info[0] >= 3:
>              # zstd is already dual-version clean, don't try and mangle it
>              if fullname.startswith('mercurial.zstd'):
>                  return None
> +            # pywatchman is already dual-version clean, don't try and
> mangle it
> +            if fullname.startswith('hgext.fsmonitor.pywatchman'):
> +                return None
>
>              # Try to find the module using other registered finders.
>              spec = None
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
Yuya Nishihara - May 29, 2017, 12:53 p.m.
On Sun, 28 May 2017 16:58:57 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <raf@durin42.com>
> # Date 1496000747 14400
> #      Sun May 28 15:45:47 2017 -0400
> # Node ID 544f6b7f4a3d2542942c733fb3f82bfd8a5a9867
> # Parent  2ba4d3b74ba8360e97cbae25cb4584283dac4eb9
> loader: pywatchman appears to already be py3 compatible

Queued the series, thanks.

Patch

diff --git a/mercurial/__init__.py b/mercurial/__init__.py
--- a/mercurial/__init__.py
+++ b/mercurial/__init__.py
@@ -34,6 +34,9 @@  if sys.version_info[0] >= 3:
             # zstd is already dual-version clean, don't try and mangle it
             if fullname.startswith('mercurial.zstd'):
                 return None
+            # pywatchman is already dual-version clean, don't try and mangle it
+            if fullname.startswith('hgext.fsmonitor.pywatchman'):
+                return None
 
             # Try to find the module using other registered finders.
             spec = None