diff --git a/glance/common/wsgi.py b/glance/common/wsgi.py index 8a6267f790..9379369240 100644 --- a/glance/common/wsgi.py +++ b/glance/common/wsgi.py @@ -429,8 +429,7 @@ def get_asynchronous_eventlet_pool(size=1000): return pool -@six.add_metaclass(abc.ABCMeta) -class BaseServer(object): +class BaseServer(metaclass=abc.ABCMeta): """Server class to manage multiple WSGI sockets and applications. This class requires initialize_glance_store set to True if diff --git a/glance/notifier.py b/glance/notifier.py index 5bc8955020..b55d59980a 100644 --- a/glance/notifier.py +++ b/glance/notifier.py @@ -330,8 +330,7 @@ class NotificationBase(object): _send_notification(self.notifier.info, notification_id, payload) -@six.add_metaclass(abc.ABCMeta) -class NotificationProxy(NotificationBase): +class NotificationProxy(NotificationBase, metaclass=abc.ABCMeta): def __init__(self, repo, context, notifier): self.repo = repo self.context = context @@ -345,8 +344,7 @@ class NotificationProxy(NotificationBase): pass -@six.add_metaclass(abc.ABCMeta) -class NotificationRepoProxy(NotificationBase): +class NotificationRepoProxy(NotificationBase, metaclass=abc.ABCMeta): def __init__(self, repo, context, notifier): self.repo = repo self.context = context @@ -366,8 +364,7 @@ class NotificationRepoProxy(NotificationBase): pass -@six.add_metaclass(abc.ABCMeta) -class NotificationFactoryProxy(object): +class NotificationFactoryProxy(metaclass=abc.ABCMeta): def __init__(self, factory, context, notifier): kwargs = {'context': context, 'notifier': notifier} diff --git a/glance/tests/functional/__init__.py b/glance/tests/functional/__init__.py index c65455862e..542b922d2f 100644 --- a/glance/tests/functional/__init__.py +++ b/glance/tests/functional/__init__.py @@ -29,7 +29,6 @@ import os import platform import shutil import signal -import six import socket import subprocess import sys @@ -78,8 +77,7 @@ except RuntimeError: pass -@six.add_metaclass(abc.ABCMeta) -class BaseServer(object): +class BaseServer(metaclass=abc.ABCMeta): """ Class used to easily manage starting and stopping a server during functional test runs.