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:
@@ -38,13 +38,6 @@
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
from six import add_metaclass
|
||||
import six
|
||||
if six.PY3:
|
||||
long = int
|
||||
|
||||
import sys
|
||||
from types import FunctionType, MethodType, ModuleType
|
||||
from functools import wraps
|
||||
@@ -1178,8 +1171,7 @@ class SimObjectCliWrapper(object):
|
||||
# The SimObject class is the root of the special hierarchy. Most of
|
||||
# the code in this class deals with the configuration hierarchy itself
|
||||
# (parent/child node relationships).
|
||||
@add_metaclass(MetaSimObject)
|
||||
class SimObject(object):
|
||||
class SimObject(object, metaclass=MetaSimObject):
|
||||
# Specify metaclass. Any class inheriting from SimObject will
|
||||
# get this metaclass.
|
||||
type = 'SimObject'
|
||||
|
||||
Reference in New Issue
Block a user