Remove six

Change-Id: I898c97fda4e1e93c64c6b75fbfea5af80ffd684a
Story: 2008305
Task: 41274
This commit is contained in:
Adrian Czarnecki 2020-11-22 21:14:02 +01:00
parent d557944cef
commit df0fd4958f
9 changed files with 7 additions and 23 deletions

View File

@ -50,7 +50,6 @@ requests==2.14.2
requestsexceptions==1.2.0
rfc3986==0.3.1
simplejson==3.8.1
six==1.10.0
smmap==0.9.0
Sphinx==2.0.0
stestr==1.0.0

View File

@ -10,14 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from monasca_common.kafka import client_factory
import six
from monasca_persister.repositories import persister
from monasca_persister.repositories import singleton
@six.add_metaclass(singleton.Singleton)
class ConfluentKafkaPersister(persister.Persister):
class ConfluentKafkaPersister(persister.Persister, metaclass=singleton.Singleton):
def __init__(self, kafka_conf, repository, client_id=""):
super(ConfluentKafkaPersister, self).__init__(kafka_conf, repository)

View File

@ -10,14 +10,12 @@
# License for the specific language governing permissions and limitations
# under the License.
from monasca_common.kafka import client_factory
import six
from monasca_persister.repositories import persister
from monasca_persister.repositories import singleton
@six.add_metaclass(singleton.Singleton)
class LegacyKafkaPersister(persister.Persister):
class LegacyKafkaPersister(persister.Persister, metaclass=singleton.Singleton):
def __init__(self, kafka_conf, zookeeper_conf, repository):
super(LegacyKafkaPersister, self).__init__(kafka_conf, repository)

View File

@ -13,11 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class AbstractRepository(object):
class AbstractRepository(object, metaclass=abc.ABCMeta):
def __init__(self):
super(AbstractRepository, self).__init__()

View File

@ -16,7 +16,6 @@
import abc
from oslo_config import cfg
import six
from monasca_persister.repositories import abstract_repository
from monasca_persister.repositories.cassandra import connection_util
@ -25,8 +24,7 @@ from monasca_persister.repositories import data_points
conf = cfg.CONF
@six.add_metaclass(abc.ABCMeta)
class AbstractCassandraRepository(abstract_repository.AbstractRepository):
class AbstractCassandraRepository(abstract_repository.AbstractRepository, metaclass=abc.ABCMeta):
def __init__(self):
super(AbstractCassandraRepository, self).__init__()

View File

@ -15,7 +15,6 @@
import abc
import influxdb
from oslo_config import cfg
import six
from monasca_persister.repositories import abstract_repository
from monasca_persister.repositories import data_points
@ -23,8 +22,7 @@ from monasca_persister.repositories import data_points
DATABASE_NOT_FOUND_MSG = "database not found"
@six.add_metaclass(abc.ABCMeta)
class AbstractInfluxdbRepository(abstract_repository.AbstractRepository):
class AbstractInfluxdbRepository(abstract_repository.AbstractRepository, metaclass=abc.ABCMeta):
def __init__(self):
super(AbstractInfluxdbRepository, self).__init__()

View File

@ -13,20 +13,17 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from abc import ABCMeta
import os
from oslo_config import cfg
from oslo_log import log
import six
from monasca_persister.repositories import singleton
LOG = log.getLogger(__name__)
@six.add_metaclass(singleton.Singleton)
class Persister(six.with_metaclass(ABCMeta, object)):
class Persister(object, metaclass=singleton.Singleton):
def __init__(self, kafka_conf, repository):

View File

@ -19,7 +19,6 @@ import influxdb
from influxdb.exceptions import InfluxDBClientError
from oslotest import base
from oslo_config import cfg
import six
from monasca_persister.repositories.influxdb.metrics_repository import MetricInfluxdbRepository
@ -37,7 +36,7 @@ class TestMetricInfluxdbRepository(base.BaseTestCase):
def _test_process_message(self, metrics_repo, data_points, metric, tenant):
_dp, _tenant = metrics_repo.process_message(metric)
self.assertIsInstance(_dp, six.string_types)
self.assertIsInstance(_dp, str)
self.assertEqual(_tenant, tenant)
data_points.append(_tenant, _dp)

View File

@ -4,7 +4,6 @@
oslo.config>=5.2.0 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
six>=1.10.0 # MIT
monasca-common>=2.16.0 # Apache-2.0
cassandra-driver>=3.21.0
simplejson>=3.8.1