Patchwork thirdparty: move selectors2 module to where it should be

login
register
mail settings
Submitter Yuya Nishihara
Date Dec. 5, 2017, 1:40 p.m.
Message ID <ea7cb45b9606371ccd43.1512481211@mimosa>
Download mbox | patch
Permalink /patch/25935/
State Accepted
Headers show

Comments

Yuya Nishihara - Dec. 5, 2017, 1:40 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1512049383 -32400
#      Thu Nov 30 22:43:03 2017 +0900
# Node ID ea7cb45b9606371ccd43418eb68ed99132f8c854
# Parent  1b22d325089c9881dff3418ffc72d8c5c4ee24f5
thirdparty: move selectors2 module to where it should be
Augie Fackler - Dec. 5, 2017, 10:59 p.m.
On Tue, Dec 05, 2017 at 10:40:11PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1512049383 -32400
> #      Thu Nov 30 22:43:03 2017 +0900
> # Node ID ea7cb45b9606371ccd43418eb68ed99132f8c854
> # Parent  1b22d325089c9881dff3418ffc72d8c5c4ee24f5
> thirdparty: move selectors2 module to where it should be

queued, thanks

Patch

diff --git a/mercurial/__init__.py b/mercurial/__init__.py
--- a/mercurial/__init__.py
+++ b/mercurial/__init__.py
@@ -31,9 +31,6 @@  if sys.version_info[0] >= 3:
             # Only handle Mercurial-related modules.
             if not fullname.startswith(('mercurial.', 'hgext.', 'hgext3rd.')):
                 return None
-            # selectors2 is already dual-version clean, don't try and mangle it
-            if fullname.startswith('mercurial.selectors2'):
-                return None
             # third-party packages are expected to be dual-version clean
             if fullname.startswith('mercurial.thirdparty'):
                 return None
diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
--- a/mercurial/commandserver.py
+++ b/mercurial/commandserver.py
@@ -17,11 +17,11 @@  import struct
 import traceback
 
 from .i18n import _
+from .thirdparty import selectors2
 from . import (
     encoding,
     error,
     pycompat,
-    selectors2,
     util,
 )
 
diff --git a/mercurial/selectors2.py b/mercurial/thirdparty/selectors2.py
rename from mercurial/selectors2.py
rename to mercurial/thirdparty/selectors2.py
--- a/mercurial/selectors2.py
+++ b/mercurial/thirdparty/selectors2.py
@@ -22,8 +22,6 @@ 
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-# no-check-code
-
 from __future__ import absolute_import
 
 import collections
@@ -34,7 +32,7 @@  import socket
 import sys
 import time
 
-from . import pycompat
+from .. import pycompat
 
 namedtuple = collections.namedtuple
 Mapping = collections.Mapping
diff --git a/tests/test-check-code.t b/tests/test-check-code.t
--- a/tests/test-check-code.t
+++ b/tests/test-check-code.t
@@ -15,7 +15,6 @@  New errors are not allowed. Warnings are
   Skipping i18n/polib.py it has no-che?k-code (glob)
   Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob)
   Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob)
-  Skipping mercurial/selectors2.py it has no-che?k-code (glob)
   Skipping mercurial/statprof.py it has no-che?k-code (glob)
   Skipping tests/badserverext.py it has no-che?k-code (glob)