Remove six
Remove six.moves Replace the following items with Python 3 style code. - six.moves.urllib - six.iteritems Change-Id: I65d7a43ac9ae76e0634b72c6bb54cb3a98bd7aab
This commit is contained in:
@@ -21,11 +21,10 @@ Base utilities to build API operation managers and objects on top of.
|
||||
"""
|
||||
import abc
|
||||
import copy
|
||||
import six
|
||||
|
||||
from oslo_utils import reflection
|
||||
from oslo_utils import strutils
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from adjutantclient._i18n import _
|
||||
from adjutantclient import exc as exceptions
|
||||
@@ -207,8 +206,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
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
import six
|
||||
|
||||
from osc_lib.command import command
|
||||
from osc_lib.i18n import _
|
||||
@@ -61,9 +60,8 @@ class QuotaShow(command.Lister):
|
||||
region = quota_data['regions'][0]
|
||||
|
||||
rows = []
|
||||
for service, service_detail in six.iteritems(
|
||||
region['current_usage']):
|
||||
for resource, value in six.iteritems(service_detail):
|
||||
for service, service_detail in region['current_usage'].items():
|
||||
for resource, value in service_detail.items():
|
||||
current_quota = region['current_quota'][service].get(
|
||||
resource)
|
||||
rows.append([service, resource, current_quota, value])
|
||||
@@ -82,9 +80,9 @@ class QuotaSizes(command.Lister):
|
||||
'Size Name', 'Service', 'Resource', 'Value']
|
||||
|
||||
rows = []
|
||||
for size, size_details in six.iteritems(quota_data['quota_sizes']):
|
||||
for service, service_details in six.iteritems(size_details):
|
||||
for resource, value in six.iteritems(service_details):
|
||||
for size, size_details in quota_data['quota_sizes'].items():
|
||||
for service, service_details in size_details.items():
|
||||
for resource, value in service_details.items():
|
||||
rows.append([size, service, resource, value])
|
||||
|
||||
return headers, rows
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from adjutantclient.common import base
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from adjutantclient.common import base
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from adjutantclient.common import base
|
||||
from adjutantclient import exc
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
from adjutantclient.common import base
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
from adjutantclient.common import base
|
||||
|
||||
from six.moves.urllib import parse
|
||||
from urllib import parse
|
||||
|
||||
|
||||
class Token(base.Resource):
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# under the License.
|
||||
|
||||
|
||||
from six.moves.urllib import parse
|
||||
from moves.urllib import parse
|
||||
|
||||
from adjutantclient.common import base
|
||||
|
||||
|
||||
@@ -14,4 +14,3 @@ oslo.utils>=3.20.0 # Apache-2.0
|
||||
keystoneauth1>=2.20.0 # Apache-2.0
|
||||
PyYAML>=3.10.0 # MIT
|
||||
requests!=2.12.2,!=2.13.0,>=2.10.0 # Apache-2.0
|
||||
six>=1.9.0 # MIT
|
||||
|
||||
Reference in New Issue
Block a user