Remove six from db module

This is part of the steps to remove usage of six library, which is no
longer needed since python 2 support was removed.

Change-Id: I529759167f960714ebf93be7b89ee849040361b2
This commit is contained in:
Takashi Kajinami
2024-02-17 11:48:37 +09:00
parent 41fa21d43c
commit 206d19ec52
3 changed files with 3 additions and 6 deletions

View File

@@ -19,7 +19,6 @@ import abc
from oslo_config import cfg
from oslo_db import api as db_api
import six
from magnum.common import profiler
@@ -35,8 +34,7 @@ def get_instance():
@profiler.trace_cls("db")
@six.add_metaclass(abc.ABCMeta)
class Connection(object):
class Connection(object, metaclass=abc.ABCMeta):
"""Base class for storage system connections."""
@abc.abstractmethod

View File

@@ -13,7 +13,6 @@
# under the License.
"""SQLAlchemy storage backend."""
import six
from oslo_db import exception as db_exc
from oslo_db.sqlalchemy import session as db_session
@@ -440,7 +439,7 @@ class Connection(api.Connection):
# NOTE(flwang): We only allow to update ClusterTemplate to be
# public, hidden and rename
if (not self._is_publishing_cluster_template(values) and
list(six.viewkeys(values)) != ["name"]):
list(values.keys()) != ["name"]):
raise exception.ClusterTemplateReferenced(
clustertemplate=cluster_template_id)

View File

@@ -15,10 +15,10 @@
"""
SQLAlchemy models for container service
"""
from urllib import parse as urlparse
from oslo_db.sqlalchemy import models
from oslo_serialization import jsonutils
import six.moves.urllib.parse as urlparse
from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import DateTime