diff --git a/hacking/checks/except_checks.py b/hacking/checks/except_checks.py index fc612646..029ae55d 100644 --- a/hacking/checks/except_checks.py +++ b/hacking/checks/except_checks.py @@ -15,8 +15,6 @@ import ast import re -from six import PY2 - from hacking import core RE_ASSERT_RAISES_EXCEPTION = re.compile(r"self\.assertRaises\(Exception[,\)]") @@ -61,13 +59,7 @@ def hacking_except_format_assert(logical_line, noqa): def is_none(node): - '''Check whether an AST node corresponds to None. - - In Python 2 None uses the same ast.Name class that variables etc. use, - but in Python 3 there is a new ast.NameConstant class. - ''' - if PY2: - return isinstance(node, ast.Name) and node.id == 'None' + '''Check whether an AST node corresponds to None.''' return isinstance(node, ast.NameConstant) and node.value is None diff --git a/hacking/config.py b/hacking/config.py index 79e35037..d4f572c4 100644 --- a/hacking/config.py +++ b/hacking/config.py @@ -11,12 +11,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from six import moves +import configparser class Config(object): def __init__(self, default_section=None, tox_file='tox.ini'): - conf = moves.configparser.RawConfigParser() + conf = configparser.RawConfigParser() conf.read(tox_file) self.conf = conf diff --git a/hacking/tests/test_doctest.py b/hacking/tests/test_doctest.py index e3e0a486..70f44acb 100644 --- a/hacking/tests/test_doctest.py +++ b/hacking/tests/test_doctest.py @@ -20,7 +20,6 @@ import sys import tempfile import pkg_resources -import six import testscenarios from testtools import content @@ -75,7 +74,7 @@ def load_tests(loader, tests, pattern): continue check = entry.load() - if check.skip_on_py3 and six.PY3: + if check.skip_on_py3: continue name = entry.attrs[0] diff --git a/lower-constraints.txt b/lower-constraints.txt index 600340bf..df296681 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -22,7 +22,6 @@ pytz==2013.6 PyYAML==3.12 reno==2.5.0 requests==2.14.2 -six==1.10.0 snowballstemmer==1.2.1 stestr==2.0.0 testscenarios==0.4 diff --git a/requirements.txt b/requirements.txt index bd5cd439..366205d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ flake8<4.0.0,>=3.6.0 # MIT -six>=1.10.0 # MIT