summaryrefslogtreecommitdiff
path: root/heatclient/v1
diff options
context:
space:
mode:
authorTakashi Kajinami <tkajinam@redhat.com>2022-05-09 14:48:19 +0900
committerTakashi Kajinami <tkajinam@redhat.com>2022-05-09 17:01:25 +0000
commit23e647539cb9c6872d9f72de99c21e113fded77c (patch)
treecb1d066f225e328b664a6fa3dd73607fec181f9e /heatclient/v1
parenta12456c17c5f43a35a54e605e89f74205be1e98e (diff)
downloadpython-heatclient-23e647539cb9c6872d9f72de99c21e113fded77c.tar.gz
Remove six
This library no longer supports Python 2, thus usage of six can be removed. Change-Id: I8d0c1cfd6dff375b3b7756a5b36c95a2df3f04c6
Diffstat (limited to 'heatclient/v1')
-rw-r--r--heatclient/v1/events.py2
-rw-r--r--heatclient/v1/resource_types.py7
-rw-r--r--heatclient/v1/resources.py2
-rw-r--r--heatclient/v1/shell.py9
-rw-r--r--heatclient/v1/software_configs.py2
-rw-r--r--heatclient/v1/software_deployments.py2
-rw-r--r--heatclient/v1/stacks.py2
-rw-r--r--heatclient/v1/template_versions.py2
8 files changed, 13 insertions, 15 deletions
diff --git a/heatclient/v1/events.py b/heatclient/v1/events.py
index f86549d..9427691 100644
--- a/heatclient/v1/events.py
+++ b/heatclient/v1/events.py
@@ -15,7 +15,7 @@
import collections
from oslo_utils import encodeutils
-from six.moves.urllib import parse
+from urllib import parse
from heatclient.common import base
from heatclient.common import utils
diff --git a/heatclient/v1/resource_types.py b/heatclient/v1/resource_types.py
index b226541..4073dc1 100644
--- a/heatclient/v1/resource_types.py
+++ b/heatclient/v1/resource_types.py
@@ -12,8 +12,7 @@
# under the License.
from oslo_utils import encodeutils
-import six
-from six.moves.urllib import parse
+from urllib import parse
from heatclient.common import base
from heatclient.common import utils
@@ -21,7 +20,7 @@ from heatclient.common import utils
class ResourceType(base.Resource):
def __repr__(self):
- if isinstance(self._info, six.string_types):
+ if isinstance(self._info, str):
return "<ResourceType %s>" % self._info
else:
return "<ResourceType %s>" % self._info.get('resource_type')
@@ -30,7 +29,7 @@ class ResourceType(base.Resource):
return self.manager.data(self, **kwargs)
def _add_details(self, info):
- if isinstance(info, six.string_types):
+ if isinstance(info, str):
self.resource_type = info
elif isinstance(info, dict):
self.resource_type = info.get('resource_type')
diff --git a/heatclient/v1/resources.py b/heatclient/v1/resources.py
index cfb3203..1054986 100644
--- a/heatclient/v1/resources.py
+++ b/heatclient/v1/resources.py
@@ -14,7 +14,7 @@
# under the License.
from oslo_utils import encodeutils
-from six.moves.urllib import parse
+from urllib import parse
from heatclient.common import base
from heatclient.common import utils
diff --git a/heatclient/v1/shell.py b/heatclient/v1/shell.py
index ce6272b..98deb97 100644
--- a/heatclient/v1/shell.py
+++ b/heatclient/v1/shell.py
@@ -18,8 +18,7 @@ import sys
from oslo_serialization import jsonutils
from oslo_utils import strutils
-import six
-from six.moves.urllib import request
+from urllib import request
import yaml
from heatclient._i18n import _
@@ -306,7 +305,7 @@ def do_stack_delete(hc, args):
try:
if not args.yes and sys.stdin.isatty():
- prompt_response = six.moves.input(
+ prompt_response = input(
_("Are you sure you want to delete this stack(s) [y/N]? ")
).lower()
if not prompt_response.startswith('y'):
@@ -542,7 +541,7 @@ def do_stack_update(hc, args):
try:
rollback = strutils.bool_from_string(args.rollback, strict=True)
except ValueError as ex:
- raise exc.CommandError(six.text_type(ex))
+ raise exc.CommandError(str(ex))
else:
fields['disable_rollback'] = not(rollback)
# TODO(pshchelo): remove the following 'else' clause after deprecation
@@ -1067,7 +1066,7 @@ def do_resource_signal(hc, args):
data_url = utils.normalise_file_path_to_url(data_file)
data = request.urlopen(data_url).read()
if data:
- if isinstance(data, six.binary_type):
+ if isinstance(data, bytes):
data = data.decode('utf-8')
try:
data = jsonutils.loads(data)
diff --git a/heatclient/v1/software_configs.py b/heatclient/v1/software_configs.py
index 8d5c9e1..5e9a452 100644
--- a/heatclient/v1/software_configs.py
+++ b/heatclient/v1/software_configs.py
@@ -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 heatclient.common import base
from heatclient.common import utils
diff --git a/heatclient/v1/software_deployments.py b/heatclient/v1/software_deployments.py
index 966838d..4422dd9 100644
--- a/heatclient/v1/software_deployments.py
+++ b/heatclient/v1/software_deployments.py
@@ -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 heatclient.common import base
from heatclient.common import utils
diff --git a/heatclient/v1/stacks.py b/heatclient/v1/stacks.py
index d1acfa5..a303e63 100644
--- a/heatclient/v1/stacks.py
+++ b/heatclient/v1/stacks.py
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from six.moves.urllib import parse
+from urllib import parse
from heatclient._i18n import _
from heatclient.common import base
diff --git a/heatclient/v1/template_versions.py b/heatclient/v1/template_versions.py
index 2dab4ad..fe1b12f 100644
--- a/heatclient/v1/template_versions.py
+++ b/heatclient/v1/template_versions.py
@@ -12,7 +12,7 @@
# under the License.
from oslo_utils import encodeutils
-from six.moves.urllib import parse
+from urllib import parse
from heatclient.common import base