Remove usage of six
Remove six-library Replace the following items with Python 3 style code. - six.iterkeys - six.moves - six.metaclass Change-Id: I2409f52daf24be1aab42a6d1f77db1c1bf1dc075
This commit is contained in:
parent
95a6f9568c
commit
f5913409a5
@ -3,7 +3,6 @@
|
|||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||||
six>=1.10.0 # MIT
|
|
||||||
oslo.log>=3.36.0 # Apache-2.0
|
oslo.log>=3.36.0 # Apache-2.0
|
||||||
oslo.utils>=3.33.0 # Apache-2.0
|
oslo.utils>=3.33.0 # Apache-2.0
|
||||||
tempest>=17.1.0 # Apache-2.0
|
tempest>=17.1.0 # Apache-2.0
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
import abc
|
import abc
|
||||||
|
|
||||||
from oslo_serialization import jsonutils as json
|
from oslo_serialization import jsonutils as json
|
||||||
import six
|
|
||||||
from tempest import clients
|
from tempest import clients
|
||||||
from tempest.common import credentials_factory as creds_factory
|
from tempest.common import credentials_factory as creds_factory
|
||||||
from tempest import config
|
from tempest import config
|
||||||
@ -30,8 +29,7 @@ from watcher_tempest_plugin.services.metric.v1.json import client as gc
|
|||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
class BaseManager(clients.Manager, metaclass=abc.ABCMeta):
|
||||||
class BaseManager(clients.Manager):
|
|
||||||
|
|
||||||
def __init__(self, credentials):
|
def __init__(self, credentials):
|
||||||
super(BaseManager, self).__init__(credentials)
|
super(BaseManager, self).__init__(credentials)
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
import abc
|
import abc
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
import six
|
import urllib.parse as urlparse
|
||||||
import six.moves.urllib.parse as urlparse
|
|
||||||
|
|
||||||
from tempest.lib.common import rest_client
|
from tempest.lib.common import rest_client
|
||||||
|
|
||||||
@ -43,8 +42,7 @@ def handle_errors(f):
|
|||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
@six.add_metaclass(abc.ABCMeta)
|
class BaseClient(rest_client.RestClient, metaclass=abc.ABCMeta):
|
||||||
class BaseClient(rest_client.RestClient):
|
|
||||||
"""Base Tempest REST client for API."""
|
"""Base Tempest REST client for API."""
|
||||||
|
|
||||||
URI_PREFIX = ''
|
URI_PREFIX = ''
|
||||||
|
@ -17,7 +17,6 @@ import shlex
|
|||||||
import subprocess
|
import subprocess
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
import six
|
|
||||||
from tempest import clients
|
from tempest import clients
|
||||||
from tempest.common import credentials_factory as creds_factory
|
from tempest.common import credentials_factory as creds_factory
|
||||||
from tempest.lib.cli import output_parser
|
from tempest.lib.cli import output_parser
|
||||||
@ -97,7 +96,7 @@ class TestCase(testtools.TestCase):
|
|||||||
def assert_show_fields(self, items, field_names):
|
def assert_show_fields(self, items, field_names):
|
||||||
"""Verify that all items have keys listed in field_names."""
|
"""Verify that all items have keys listed in field_names."""
|
||||||
for item in items:
|
for item in items:
|
||||||
for key in six.iterkeys(item):
|
for key in item.keys():
|
||||||
self.assertIn(key, field_names)
|
self.assertIn(key, field_names)
|
||||||
|
|
||||||
def assert_show_structure(self, items, field_names):
|
def assert_show_structure(self, items, field_names):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user