python: Remove Python 2.7 compatibility code

We don't support Python 2.7 anymore. Remove glue code like the six
dependency and "from __future__" imports from gem5's standard library.

Change-Id: I71834c325f86ff0329b222be87794ead96081f05
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39584
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Andreas Sandberg
2021-01-21 17:09:38 +00:00
parent 36ab8ef4e7
commit 4b9c46caa5
28 changed files with 32 additions and 133 deletions

View File

@@ -42,15 +42,8 @@
#
#####################################################################
from __future__ import print_function
from __future__ import absolute_import
import six
if six.PY3:
long = int
import copy
class BaseProxy(object):
def __init__(self, search_self, search_up):
self._search_self = search_self
@@ -74,7 +67,7 @@ class BaseProxy(object):
def _gen_op(operation):
def op(self, operand):
if not (isinstance(operand, (int, long, float)) or \
if not (isinstance(operand, (int, float)) or \
isproxy(operand)):
raise TypeError(
"Proxy operand must be a constant or a proxy to a param")