##// END OF EJS Templates
util: use __code__ (available since py2.6)
util: use __code__ (available since py2.6)

File last commit:

r28818:6041fb8f default
r28832:f5ff10f6 default
Show More
pycompat.py
18 lines | 472 B | text/x-python | PythonLexer
timeless
pycompat: add empty and queue to handle py3 divergence...
r28818 # 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