diff --git a/requirements.txt b/requirements.txt index eae5427826..c71cabea9c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,6 @@ oslo.log>=3.36.0 # Apache-2.0 stestr>=1.0.0 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 oslo.utils>=4.7.0 # Apache-2.0 -six>=1.10.0 # MIT fixtures>=3.0.0 # Apache-2.0/BSD PyYAML>=3.12 # MIT python-subunit>=1.0.0 # Apache-2.0/BSD diff --git a/tempest/lib/services/compute/assisted_volume_snapshots_client.py b/tempest/lib/services/compute/assisted_volume_snapshots_client.py index 8b67491286..7a949df3ab 100644 --- a/tempest/lib/services/compute/assisted_volume_snapshots_client.py +++ b/tempest/lib/services/compute/assisted_volume_snapshots_client.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. +from urllib import parse as urllib + from oslo_serialization import jsonutils as json -from six.moves.urllib import parse as urllib from tempest.lib.common import rest_client from tempest.lib.services.compute import base_compute_client diff --git a/tempest/lib/services/identity/v3/identity_providers_client.py b/tempest/lib/services/identity/v3/identity_providers_client.py index af6a245235..002bc8c5e8 100644 --- a/tempest/lib/services/identity/v3/identity_providers_client.py +++ b/tempest/lib/services/identity/v3/identity_providers_client.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations under # the License. +from urllib import parse as urllib + from oslo_serialization import jsonutils as json -from six.moves.urllib import parse as urllib from tempest.lib.common import rest_client diff --git a/tempest/lib/services/identity/v3/mappings_client.py b/tempest/lib/services/identity/v3/mappings_client.py index 9ec5384050..a924b339e1 100644 --- a/tempest/lib/services/identity/v3/mappings_client.py +++ b/tempest/lib/services/identity/v3/mappings_client.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations under # the License. +from urllib import parse as urllib + from oslo_serialization import jsonutils as json -from six.moves.urllib import parse as urllib from tempest.lib.common import rest_client diff --git a/tempest/lib/services/identity/v3/protocols_client.py b/tempest/lib/services/identity/v3/protocols_client.py index 2e0221bf41..19aa4264d6 100644 --- a/tempest/lib/services/identity/v3/protocols_client.py +++ b/tempest/lib/services/identity/v3/protocols_client.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations under # the License. +from urllib import parse as urllib + from oslo_serialization import jsonutils as json -from six.moves.urllib import parse as urllib from tempest.lib.common import rest_client diff --git a/tempest/lib/services/identity/v3/service_providers_client.py b/tempest/lib/services/identity/v3/service_providers_client.py index b84cf4376e..5d4f01420d 100644 --- a/tempest/lib/services/identity/v3/service_providers_client.py +++ b/tempest/lib/services/identity/v3/service_providers_client.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations under # the License. +from urllib import parse as urllib + from oslo_serialization import jsonutils as json -from six.moves.urllib import parse as urllib from tempest.lib.common import rest_client diff --git a/tempest/tests/lib/common/test_preprov_creds.py b/tempest/tests/lib/common/test_preprov_creds.py index fe7fcd20c5..f2131dcb97 100644 --- a/tempest/tests/lib/common/test_preprov_creds.py +++ b/tempest/tests/lib/common/test_preprov_creds.py @@ -144,8 +144,7 @@ class TestPreProvisionedCredentials(base.TestCase): # Emulate the lock existing on the filesystem self.useFixture(fixtures.MockPatch( 'os.path.isfile', return_value=True)) - with mock.patch('six.moves.builtins.open', mock.mock_open(), - create=True): + with mock.patch('builtins.open', mock.mock_open(), create=True): test_account_class = ( preprov_creds.PreProvisionedCredentialProvider( **self.fixed_params)) @@ -157,8 +156,7 @@ class TestPreProvisionedCredentials(base.TestCase): # Emulate the lock not existing on the filesystem self.useFixture(fixtures.MockPatch( 'os.path.isfile', return_value=False)) - with mock.patch('six.moves.builtins.open', mock.mock_open(), - create=True): + with mock.patch('builtins.open', mock.mock_open(), create=True): test_account_class = ( preprov_creds.PreProvisionedCredentialProvider( **self.fixed_params)) @@ -177,7 +175,7 @@ class TestPreProvisionedCredentials(base.TestCase): 'os.path.isfile', return_value=False)) test_account_class = preprov_creds.PreProvisionedCredentialProvider( **self.fixed_params) - with mock.patch('six.moves.builtins.open', mock.mock_open(), + with mock.patch('builtins.open', mock.mock_open(), create=True) as open_mock: test_account_class._get_free_hash(hash_list) lock_path = os.path.join(self.fixed_params['accounts_lock_dir'], @@ -196,8 +194,7 @@ class TestPreProvisionedCredentials(base.TestCase): 'os.path.isfile', return_value=True)) test_account_class = preprov_creds.PreProvisionedCredentialProvider( **self.fixed_params) - with mock.patch('six.moves.builtins.open', mock.mock_open(), - create=True): + with mock.patch('builtins.open', mock.mock_open(), create=True): self.assertRaises(lib_exc.InvalidCredentials, test_account_class._get_free_hash, hash_list) @@ -217,7 +214,7 @@ class TestPreProvisionedCredentials(base.TestCase): return True self.patchobject(os.path, 'isfile', _fake_is_file) - with mock.patch('six.moves.builtins.open', mock.mock_open(), + with mock.patch('builtins.open', mock.mock_open(), create=True) as open_mock: test_account_class._get_free_hash(hash_list) lock_path = os.path.join(self.fixed_params['accounts_lock_dir'], diff --git a/tools/check_logs.py b/tools/check_logs.py index cc74b17ed9..8ab3af2be1 100755 --- a/tools/check_logs.py +++ b/tools/check_logs.py @@ -23,7 +23,6 @@ import re import sys import urllib.request as urlreq -import six import yaml # DEVSTACK_GATE_GRENADE is either unset if grenade is not running @@ -137,7 +136,7 @@ def main(opts): with open(ALLOW_LIST_FILE) as stream: loaded = yaml.safe_load(stream) if loaded: - for (name, l) in six.iteritems(loaded): + for (name, l) in loaded.values(): for w in l: assert 'module' in w, 'no module in %s' % name assert 'message' in w, 'no message in %s' % name