diff --git a/ci/edmtool.py b/ci/edmtool.py index 866d58762..78f4f64aa 100644 --- a/ci/edmtool.py +++ b/ci/edmtool.py @@ -135,11 +135,7 @@ 'null': {'ETS_TOOLKIT': 'null.image'}, } -if sys.version_info < (3, 0): - import string - pillow_trans = string.maketrans('<=>', '___') -else: - pillow_trans = ''.maketrans({'<': '_', '=': '_', '>': '_'}) +pillow_trans = ''.maketrans({'<': '_', '=': '_', '>': '_'}) if sys.platform == 'darwin': dependencies.add('Cython') diff --git a/enable/tests/primitives/test_image.py b/enable/tests/primitives/test_image.py index 4617ce7ba..36acc60e8 100644 --- a/enable/tests/primitives/test_image.py +++ b/enable/tests/primitives/test_image.py @@ -2,14 +2,10 @@ import os import sys +import unittest import six -if sys.version_info[:2] == (2, 6): - import unittest2 as unittest -else: - import unittest - import numpy as np from numpy.testing import assert_array_equal from pkg_resources import resource_filename diff --git a/kiva/fonttools/font.py b/kiva/fonttools/font.py index 4a82b98f2..bf98be780 100644 --- a/kiva/fonttools/font.py +++ b/kiva/fonttools/font.py @@ -86,11 +86,6 @@ def __init__(self, face_name="", size=12, family=SWISS, weight=NORMAL, (type(underline) != int) or (not isinstance(face_name, six.string_types)) or \ (type(encoding) != type(DEFAULT)): raise RuntimeError("Bad value in Font() constructor.") - ### HACK: C++ stuff expects a string (not unicode) for the face_name, so fix - ### if needed. - ### Only for python < 3 - if six.PY2 and isinstance(face_name, six.text_type): - face_name = face_name.encode("latin1") self.size = size self.family = family self.weight = weight