diff mercurial/util.py @ 28818:6041fb8f2da8

pycompat: add empty and queue to handle py3 divergence While the pycompat module will actually handle divergence, please access these properties from the util module: util.queue = Queue.Queue / queue.Queue util.empty = Queue.Empty / queue.Empty
author timeless <timeless@mozdev.org>
date Wed, 06 Apr 2016 20:00:49 +0000
parents 906fece80cfa
children 87c6ad2251d8
line wrap: on
line diff
--- a/mercurial/util.py	Mon Apr 04 15:39:13 2016 +0200
+++ b/mercurial/util.py	Wed Apr 06 20:00:49 2016 +0000
@@ -43,8 +43,15 @@
     i18n,
     osutil,
     parsers,
+    pycompat,
 )
 
+for attr in (
+    'empty',
+    'queue',
+):
+    globals()[attr] = getattr(pycompat, attr)
+
 if os.name == 'nt':
     from . import windows as platform
 else: