This revision was automatically updated to reflect the committed changes. Closed by commit rHGb3c15f0eb984: commandserver: prefer first-party selectors module from Python 3 to backport (authored by durin42, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2844?vs=7001&id=7025 REVISION DETAIL https://phab.mercurial-scm.org/D2844 AFFECTED FILES mercurial/commandserver.py CHANGE DETAILS diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py --- a/mercurial/commandserver.py +++ b/mercurial/commandserver.py @@ -16,8 +16,13 @@ import struct import traceback +try: + import selectors + selectors.BaseSelector +except ImportError: + from .thirdparty import selectors2 as selectors + from .i18n import _ -from .thirdparty import selectors2 from . import ( encoding, error, @@ -476,8 +481,8 @@ def _mainloop(self): exiting = False h = self._servicehandler - selector = selectors2.DefaultSelector() - selector.register(self._sock, selectors2.EVENT_READ) + selector = selectors.DefaultSelector() + selector.register(self._sock, selectors.EVENT_READ) while True: if not exiting and h.shouldexit(): # clients can no longer connect() to the domain socket, so To: durin42, #hg-reviewers, yuja Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel