Remove the dependency on six in testlib.
Change-Id: I247088d119cf8f9d815632eae16a1cbf87930516
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39759
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
import os
import re
-from six import add_metaclass
from pickle import HIGHEST_PROTOCOL as highest_pickle_protocol
from testlib.helper import absdirpath, AttrDict, FrozenAttrDict
# one in the list will be saved.
common_args = AttrDict({arg.name:arg for arg in common_args})
-@add_metaclass(abc.ABCMeta)
-class ArgParser(object):
+class ArgParser(object, metaclass=abc.ABCMeta):
class ExtendAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
items = getattr(namespace, self.dest, [])
'''
-from __future__ import print_function
-
import multiprocessing
import os
import sys
import testlib.state as state
import testlib.terminal as terminal
-from six.moves import queue as Queue
+from queue import Queue
from testlib.configuration import constants
import os
import re
-import six
import sys
import traceback
'''
import testlib.wrappers as wrappers
-from six import add_metaclass
-
class LogLevel():
Fatal = 0
Error = 1
RecordTypeCounterMetaclass.counter += 1
-@add_metaclass(RecordTypeCounterMetaclass)
-class Record(object):
+class Record(object, metaclass=RecordTypeCounterMetaclass):
'''
A generic object that is passed to the :class:`Log` and its handlers.
import fcntl
import termios
import struct
-import six
# Intended usage example:
#
def __init__(self, cap_string):
for i, c in enumerate(color_names):
setattr(self, c, cap_string('setaf', i))
- for name, cap in six.iteritems(capability_map):
+ for name, cap in capability_map.items():
setattr(self, name, cap_string(cap))
termcap = ColorStrings(cap_string)