summaryrefslogtreecommitdiff
path: root/psutil/_compat.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2015-02-06 18:10:28 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2015-02-06 18:10:28 +0100
commitfa60625b145b4e3c8b5e7d50b6807c47d33f156e (patch)
treee329b4ed4fee65948e541c202408b3bc7bda15ba /psutil/_compat.py
parenta5c6553baac1f68d0635e6a60edaa573e1857902 (diff)
downloadpsutil-fa60625b145b4e3c8b5e7d50b6807c47d33f156e.tar.gz
remove names which are no longer in use from _compat.py
Diffstat (limited to 'psutil/_compat.py')
-rw-r--r--psutil/_compat.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/psutil/_compat.py b/psutil/_compat.py
index 84fd9ca8..7afd4c6a 100644
--- a/psutil/_compat.py
+++ b/psutil/_compat.py
@@ -6,7 +6,7 @@
"""Module which provides compatibility with older Python versions."""
-__all__ = ["PY3", "int", "long", "xrange", "exec_", "callable", "lru_cache"]
+__all__ = ["PY3", "long", "xrange", "unicode", "callable", "lru_cache"]
import collections
import functools
@@ -19,29 +19,13 @@ except ImportError:
PY3 = sys.version_info[0] == 3
if PY3:
- int = int
long = int
xrange = range
unicode = str
- basestring = str
- exec_ = getattr(__builtin__, "exec")
else:
- int = int
long = long
xrange = xrange
unicode = unicode
- basestring = basestring
-
- def exec_(code, globs=None, locs=None):
- if globs is None:
- frame = sys._getframe(1)
- globs = frame.f_globals
- if locs is None:
- locs = frame.f_locals
- del frame
- elif locs is None:
- locs = globs
- exec("""exec code in globs, locs""")
# removed in 3.0, reintroduced in 3.2