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:
@@ -37,14 +37,11 @@
|
||||
# (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 re
|
||||
import sys
|
||||
|
||||
from six import string_types
|
||||
from six.moves import zip_longest
|
||||
from itertools import zip_longest
|
||||
|
||||
from . import convert
|
||||
from . import jobfile
|
||||
@@ -123,7 +120,7 @@ def compareVersions(v1, v2):
|
||||
def make_version_list(v):
|
||||
if isinstance(v, (list,tuple)):
|
||||
return v
|
||||
elif isinstance(v, string_types):
|
||||
elif isinstance(v, str):
|
||||
return list(map(lambda x: int(re.match('\d+', x).group()),
|
||||
v.split('.')))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user