[PATCH] thirdparty: move selectors2 module to where it should be
Yuya Nishihara
yuya at tcha.org
Tue Dec 5 13:40:11 UTC 2017
# HG changeset patch
# User Yuya Nishihara <yuya at 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
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)
More information about the Mercurial-devel
mailing list