view mercurial/pycompat.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
children 672fc23bf9cc
line wrap: on
line source

# pycompat.py - portability shim for python 3
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

"""Mercurial portability shim for python 3.

This contains aliases to hide python version-specific details from the core.
"""

from __future__ import absolute_import

try:
    import Queue as _queue
except ImportError:
    import queue as _queue
empty = _queue.Empty
queue = _queue.Queue