Andreas Sandberg has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/39757 )

Change subject: tests: Remove Python 2.7 glue code
......................................................................

tests: Remove Python 2.7 glue code

Remove uses of six and from __future__ imports as they are no longer
needed.

Change-Id: I74b5250722abe1e202f31a9ec1d4cc04039df168
Signed-off-by: Andreas Sandberg <andreas.sandb...@arm.com>
---
M tests/configs/gpu-ruby.py
M tests/gem5/configs/base_config.py
M tests/gem5/configs/checkpoint.py
M tests/gem5/configs/switcheroo.py
M tests/gem5/fixture.py
M tests/gem5/fs/linux/arm/run.py
M tests/gem5/memory/test.py
M tests/main.py
M tests/run.py
9 files changed, 4 insertions(+), 17 deletions(-)



diff --git a/tests/configs/gpu-ruby.py b/tests/configs/gpu-ruby.py
index a463fe3..b561d02 100644
--- a/tests/configs/gpu-ruby.py
+++ b/tests/configs/gpu-ruby.py
@@ -33,8 +33,6 @@
 #  Author: Brad Beckmann
 #

-from __future__ import print_function
-
 import m5
 from m5.objects import *
 from m5.defines import buildEnv
diff --git a/tests/gem5/configs/base_config.py b/tests/gem5/configs/base_config.py
index 5623db8..b18cecf 100644
--- a/tests/gem5/configs/base_config.py
+++ b/tests/gem5/configs/base_config.py
@@ -42,12 +42,10 @@
 from common import Options
 from common.Caches import *
 from ruby import Ruby
-from six import add_metaclass

 _have_kvm_support = 'BaseKvmCPU' in globals()

-@add_metaclass(ABCMeta)
-class BaseSystem(object):
+class BaseSystem(object, metaclass=ABCMeta):
     """Base system builder.

     This class provides some basic functionality for creating an ARM
diff --git a/tests/gem5/configs/checkpoint.py b/tests/gem5/configs/checkpoint.py
index a652094..3545095 100644
--- a/tests/gem5/configs/checkpoint.py
+++ b/tests/gem5/configs/checkpoint.py
@@ -33,8 +33,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 multiprocessing import Process
 import sys
 import os
diff --git a/tests/gem5/configs/switcheroo.py b/tests/gem5/configs/switcheroo.py
index cb47f90..fb1db81 100644
--- a/tests/gem5/configs/switcheroo.py
+++ b/tests/gem5/configs/switcheroo.py
@@ -33,8 +33,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
-
 import m5
 import _m5
 from m5.objects import *
diff --git a/tests/gem5/fixture.py b/tests/gem5/fixture.py
index 467eb43..5ffb248 100644
--- a/tests/gem5/fixture.py
+++ b/tests/gem5/fixture.py
@@ -44,7 +44,8 @@
 import threading
 import gzip

-from six.moves import urllib
+import urllib.error
+import urllib.request

 from testlib.fixture import Fixture
 from testlib.configuration import config, constants
diff --git a/tests/gem5/fs/linux/arm/run.py b/tests/gem5/fs/linux/arm/run.py
index a0d782b..3dccebb 100644
--- a/tests/gem5/fs/linux/arm/run.py
+++ b/tests/gem5/fs/linux/arm/run.py
@@ -36,8 +36,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
-
 import sys
 import os
 import os.path
diff --git a/tests/gem5/memory/test.py b/tests/gem5/memory/test.py
index 7b839f2..db20ab5 100644
--- a/tests/gem5/memory/test.py
+++ b/tests/gem5/memory/test.py
@@ -28,7 +28,6 @@
 Test file for simple memory test
 TODO: Add stats checking
 '''
-import six

 from testlib import *

@@ -50,7 +49,7 @@


 for name, params in simple_mem_params:
-    args = ['--' + key + '=' + val for key,val in six.iteritems(params)]
+    args = ['--' + key + '=' + val for key,val in params.items()]

     gem5_verify_config(
         name='simple_mem_' + name,
diff --git a/tests/main.py b/tests/main.py
index 3287ef1..39717f6 100755
--- a/tests/main.py
+++ b/tests/main.py
@@ -5,7 +5,6 @@

 Discovers and runs all tests from a given root directory.
 '''
-from __future__ import print_function

 import sys
 import os
diff --git a/tests/run.py b/tests/run.py
index a8b612b..c3360ac 100644
--- a/tests/run.py
+++ b/tests/run.py
@@ -36,8 +36,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
-
 import os
 import sys
 import re

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/39757
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I74b5250722abe1e202f31a9ec1d4cc04039df168
Gerrit-Change-Number: 39757
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to