Remove six

Remove six Replace the following items with Python 3 style code.
- six.moves.urllib
- six.binary_type

Change-Id: I234c3b205ee21b59953aa6ce7af5c2a1e4a6cfa6
This commit is contained in:
wangzihao 2020-11-03 13:42:27 +08:00
parent f61b0d1300
commit 0525790271
6 changed files with 5 additions and 7 deletions

View File

@ -15,7 +15,7 @@
import json
from six.moves.urllib import parse as urllib
from urllib import parse as urllib
from tempest import config
from tempest.lib.common import rest_client

View File

@ -15,7 +15,7 @@
import json
from six.moves.urllib import parse as urllib
from urllib import parse as urllib
from tempest import config
from tempest.lib.common import rest_client

View File

@ -15,7 +15,7 @@
import json
from six.moves.urllib import parse as urllib
from urllib import parse as urllib
from tempest import config
from tempest.lib.common import rest_client

View File

@ -15,7 +15,7 @@
import json
from six.moves.urllib import parse as urllib
from urllib import parse as urllib
from tempest import config
from tempest.lib.common import rest_client

View File

@ -15,7 +15,6 @@
import json
import six
from tempest import config
from tempest.lib.common import rest_client
@ -29,7 +28,7 @@ class SecretClient(rest_client.RestClient):
if 'name' not in kwargs:
kwargs['name'] = data_utils.rand_name("tempest-sec")
if 'payload' in kwargs and type(kwargs['payload']) is six.binary_type:
if 'payload' in kwargs and type(kwargs['payload']) is bytes:
kwargs['payload'] = kwargs['payload'].decode('utf-8')
post_body = kwargs

View File

@ -4,7 +4,6 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0
six>=1.10.0 # MIT
tempest>=17.1.0 # Apache-2.0
cryptography>=2.1 # BSD/Apache-2.0