Remove six
We don't need this in a Python 3-only world. Change-Id: I6c0b25dc1c3aa60286e884c54f57d1c2e8fc32e2
This commit is contained in:
parent
0fe6205a1a
commit
027bd115ca
|
@ -66,7 +66,6 @@ requests==2.14.2
|
|||
requestsexceptions==1.2.0
|
||||
rfc3986==0.3.1
|
||||
simplejson==3.5.1
|
||||
six==1.10.0
|
||||
snowballstemmer==1.2.1
|
||||
Sphinx==1.8.0
|
||||
sphinxcontrib-websupport==1.0.1
|
||||
|
|
|
@ -13,4 +13,3 @@ python-keystoneclient>=3.8.0 # Apache-2.0
|
|||
python-openstackclient>=3.12.0 # Apache-2.0
|
||||
PyYAML>=3.12 # MIT
|
||||
requests>=2.14.2 # Apache-2.0
|
||||
six>=1.10.0 # MIT
|
||||
|
|
|
@ -41,8 +41,7 @@ import abc
|
|||
import copy
|
||||
|
||||
from oslo_utils import strutils
|
||||
import six
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from searchlightclient.common import exceptions
|
||||
from searchlightclient.i18n import _
|
||||
|
@ -224,8 +223,7 @@ class BaseManager(HookableMixin):
|
|||
return self.client.delete(url)
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class ManagerWithFind(BaseManager):
|
||||
class ManagerWithFind(BaseManager, metaclass=abc.ABCMeta):
|
||||
"""Manager with additional `find()`/`findall()` methods."""
|
||||
|
||||
@abc.abstractmethod
|
||||
|
|
|
@ -36,8 +36,6 @@ Exception definitions.
|
|||
import inspect
|
||||
import sys
|
||||
|
||||
import six
|
||||
|
||||
from searchlightclient.i18n import _
|
||||
|
||||
|
||||
|
@ -463,7 +461,7 @@ def from_response(response, method, url):
|
|||
kwargs["message"] = (error.get("message") or
|
||||
error.get("faultstring"))
|
||||
kwargs["details"] = (error.get("details") or
|
||||
six.text_type(body))
|
||||
str(body))
|
||||
elif content_type.startswith("text/"):
|
||||
kwargs["details"] = getattr(response, 'text', '')
|
||||
|
||||
|
|
|
@ -23,10 +23,9 @@ from oslo_serialization import jsonutils
|
|||
from oslo_utils import encodeutils
|
||||
from oslo_utils import importutils
|
||||
import prettytable
|
||||
import six
|
||||
from six.moves.urllib import error
|
||||
from six.moves.urllib import parse
|
||||
from six.moves.urllib import request
|
||||
from urllib import error
|
||||
from urllib import parse
|
||||
from urllib import request
|
||||
import yaml
|
||||
|
||||
from searchlightclient import exc
|
||||
|
@ -149,10 +148,7 @@ def print_update_list(lst, fields, formatters=None):
|
|||
|
||||
pt.add_row(row)
|
||||
|
||||
if six.PY3:
|
||||
print(encodeutils.safe_encode(pt.get_string()).decode())
|
||||
else:
|
||||
print(encodeutils.safe_encode(pt.get_string()))
|
||||
print(encodeutils.safe_encode(pt.get_string()).decode())
|
||||
|
||||
|
||||
def find_resource(manager, name_or_id):
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from searchlightclient.common import base
|
||||
|
||||
|
|
Loading…
Reference in New Issue