Patchwork D3266: pycompat: export a handle on concurrent.futures

login
register
mail settings
Submitter phabricator
Date April 11, 2018, 11:43 p.m.
Message ID <differential-rev-PHID-DREV-36qkajrzgqw6mcodu35n-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30759/
State Superseded
Headers show

Comments

phabricator - April 11, 2018, 11:43 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  On Python 3, we use the built-in version in the standard library. Else
  we use our vendored backport.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3266

AFFECTED FILES
  mercurial/pycompat.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py
--- a/mercurial/pycompat.py
+++ b/mercurial/pycompat.py
@@ -26,7 +26,10 @@ 
     import Queue as _queue
     import SocketServer as socketserver
     import xmlrpclib
+
+    from .thirdparty.concurrent import futures
 else:
+    import concurrent.futures as futures
     import http.cookiejar as cookielib
     import http.client as httplib
     import pickle