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