comparison mercurial/pycompat.py @ 32865:6e38b4212661

pycompat: move the queue related definitions below queue import This helps in understanding why empty and queue are there.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 16 Jun 2017 03:01:22 +0530
parents f57f1f37290d
children 524b13fc711f
comparison
equal deleted inserted replaced
32864:f57f1f37290d 32865:6e38b4212661
29 import http.client as httplib 29 import http.client as httplib
30 import pickle 30 import pickle
31 import queue as _queue 31 import queue as _queue
32 import socketserver 32 import socketserver
33 import xmlrpc.client as xmlrpclib 33 import xmlrpc.client as xmlrpclib
34
35 empty = _queue.Empty
36 queue = _queue.Queue
34 37
35 def identity(a): 38 def identity(a):
36 return a 39 return a
37 40
38 if ispy3: 41 if ispy3:
306 getcwd = os.getcwd 309 getcwd = os.getcwd
307 sysexecutable = sys.executable 310 sysexecutable = sys.executable
308 shlexsplit = shlex.split 311 shlexsplit = shlex.split
309 stringio = cStringIO.StringIO 312 stringio = cStringIO.StringIO
310 maplist = map 313 maplist = map
311
312 empty = _queue.Empty
313 queue = _queue.Queue
314 314
315 class _pycompatstub(object): 315 class _pycompatstub(object):
316 def __init__(self): 316 def __init__(self):
317 self._aliases = {} 317 self._aliases = {}
318 318