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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user