diff mercurial/__init__.py @ 33502:5d0c0c8d2929

selector2: vendor selector2 library This library was a backport of the Python 3 "selectors" library. It is useful to provide a better selector interface for Python2, to address some issues of the plain old select.select, mentioned in the next patch. The code [1] was ported using the MIT license, with some minor modifications to make our test happy: 1. "# no-check-code" was added since it's foreign code. 2. "from __future__ import absolute_import" was added. 3. "from collections import namedtuple, Mapping" changed to avoid direct symbol import. [1]: https://github.com/SethMichaelLarson/selectors2/blob/d27dbd2fdc48331fb76ed431f44b6e6956de7f82/selectors2.py # no-check-commit
author Jun Wu <quark@fb.com>
date Fri, 14 Jul 2017 20:19:46 -0700
parents 942051a29fb6
children 9fb9f8440b71
line wrap: on
line diff
--- a/mercurial/__init__.py	Tue Jul 11 00:40:29 2017 -0400
+++ b/mercurial/__init__.py	Fri Jul 14 20:19:46 2017 -0700
@@ -31,6 +31,9 @@
             # 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
             # zstd is already dual-version clean, don't try and mangle it
             if fullname.startswith('mercurial.zstd'):
                 return None