Mercurial > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
28817:e1d26630443d | 28818:6041fb8f2da8 |
---|---|
41 encoding, | 41 encoding, |
42 error, | 42 error, |
43 i18n, | 43 i18n, |
44 osutil, | 44 osutil, |
45 parsers, | 45 parsers, |
46 pycompat, | |
46 ) | 47 ) |
48 | |
49 for attr in ( | |
50 'empty', | |
51 'queue', | |
52 ): | |
53 globals()[attr] = getattr(pycompat, attr) | |
47 | 54 |
48 if os.name == 'nt': | 55 if os.name == 'nt': |
49 from . import windows as platform | 56 from . import windows as platform |
50 else: | 57 else: |
51 from . import posix as platform | 58 from . import posix as platform |