diff --git a/zaqar/storage/mongodb/catalogue.py b/zaqar/storage/mongodb/catalogue.py index 6fa8b8381..9df8faf65 100644 --- a/zaqar/storage/mongodb/catalogue.py +++ b/zaqar/storage/mongodb/catalogue.py @@ -20,8 +20,8 @@ Serves to construct an association between a project + queue -> pool. :: { - 'p_q': project_queue :: six.text_type, - 's': pool_identifier :: six.text_type + 'p_q': project_queue :: str, + 's': pool_identifier :: str } """ diff --git a/zaqar/storage/mongodb/flavors.py b/zaqar/storage/mongodb/flavors.py index ecf3b1877..bd77b7788 100644 --- a/zaqar/storage/mongodb/flavors.py +++ b/zaqar/storage/mongodb/flavors.py @@ -14,9 +14,9 @@ """ Schema: - 'n': name :: six.text_type - 'p': project :: six.text_type - 's': storage pool_group :: six.text_type + 'n': name :: str + 'p': project :: str + 's': storage pool_group :: str 'c': capabilities :: dict """ diff --git a/zaqar/storage/mongodb/pools.py b/zaqar/storage/mongodb/pools.py index b22275f26..80bd06316 100644 --- a/zaqar/storage/mongodb/pools.py +++ b/zaqar/storage/mongodb/pools.py @@ -16,11 +16,11 @@ controller for mongodb. Schema: - 'n': name :: six.text_type - 'u': uri :: six.text_type + 'n': name :: str + 'u': uri :: str 'w': weight :: int 'o': options :: dict - 'f': flavor :: six.text_type + 'f': flavor :: str """ import functools diff --git a/zaqar/storage/mongodb/subscriptions.py b/zaqar/storage/mongodb/subscriptions.py index 60fb81a21..03937356d 100644 --- a/zaqar/storage/mongodb/subscriptions.py +++ b/zaqar/storage/mongodb/subscriptions.py @@ -42,12 +42,12 @@ class SubscriptionController(base.Subscription): Subscriptions are unique by project + queue/topic + subscriber. Schema: - 's': source :: six.text_type - 'u': subscriber:: six.text_type + 's': source :: str + 'u': subscriber:: str 't': ttl:: int 'e': expires: datetime.datetime 'o': options :: dict - 'p': project :: six.text_type + 'p': project :: str 'c': confirmed :: boolean """ diff --git a/zaqar/storage/mongodb/utils.py b/zaqar/storage/mongodb/utils.py index 0af517e71..914bf8167 100644 --- a/zaqar/storage/mongodb/utils.py +++ b/zaqar/storage/mongodb/utils.py @@ -159,9 +159,9 @@ def scope_queue_name(queue=None, project=None): specified, a scope for "all global queues" is returned, which is to be interpreted as excluding queues scoped by project. :param queue: name of queue to seek - :type queue: six.text_type + :type queue: str :param project: namespace - :type project: six.text_type + :type project: str :returns: '{project}/{queue}' if project and queue are given, '{project}/' if ONLY project is given, '/{queue}' if ONLY queue is given, and '/' if neither are given. @@ -184,9 +184,9 @@ def parse_scoped_project_queue(scoped_name): """Returns the project and queue name for a scoped catalogue entry. :param scoped_name: a project/queue as given by :scope_queue_name: - :type scoped_name: six.text_type + :type scoped_name: str :returns: (project, queue) - :rtype: (six.text_type, six.text_type) + :rtype: (str, six.text_type) """ return scoped_name.split('/') @@ -196,9 +196,9 @@ def scoped_query(queue, project, name=None, kfilter={}, """Returns a dict usable for querying for scoped project/queues. :param queue: name of queue to seek - :type queue: six.text_type + :type queue: str :param project: namespace - :type project: six.text_type + :type project: str :returns: query to issue :rtype: dict """ diff --git a/zaqar/storage/pooling.py b/zaqar/storage/pooling.py index aace70ab3..660be9fc4 100644 --- a/zaqar/storage/pooling.py +++ b/zaqar/storage/pooling.py @@ -466,7 +466,7 @@ class Catalog(object): """Given a pool name, returns a storage driver. :param pool_id: The name of a pool. - :type pool_id: six.text_type + :type pool_id: str :returns: a storage driver :rtype: zaqar.storage.base.DataDriverBase """ @@ -507,12 +507,12 @@ class Catalog(object): queue's assigned backend pool. :param queue: Name of the new queue to assign to a pool - :type queue: six.text_type + :type queue: str :param project: Project to which the queue belongs, or None for the "global" or "generic" project. - :type project: six.text_type + :type project: str :param flavor: Flavor for the queue (OPTIONAL) - :type flavor: six.text_type + :type flavor: str :raises NoPoolFound: if not found @@ -582,10 +582,10 @@ class Catalog(object): backend pool. :param queue: Name of the new queue to assign to a pool - :type queue: six.text_type + :type queue: str :param project: Project to which the queue belongs, or None for the "global" or "generic" project. - :type project: six.text_type + :type project: str """ self._catalogue_ctrl.delete(project, queue) @@ -727,7 +727,7 @@ class Catalog(object): """Get storage driver, preferably cached, from a pool name. :param pool_id: The name of a pool. - :type pool_id: six.text_type + :type pool_id: str :returns: a storage driver :rtype: zaqar.storage.base.DataDriver """ diff --git a/zaqar/storage/redis/catalogue.py b/zaqar/storage/redis/catalogue.py index 73514cfe9..54f85b859 100644 --- a/zaqar/storage/redis/catalogue.py +++ b/zaqar/storage/redis/catalogue.py @@ -20,13 +20,12 @@ Serves to construct an association between a project + queue -> pool. :: { - 'p_q': project_queue :: six.text_type, - 's': pool_identifier :: six.text_type + 'p_q': project_queue :: str, + 's': pool_identifier :: str } """ from oslo_log import log as logging import redis -import six from zaqar.i18n import _ from zaqar.storage import base @@ -241,7 +240,7 @@ class CatalogueController(base.CatalogueBase): def _normalize(entry): return { - 'queue': six.text_type(entry['p_q']), - 'project': six.text_type(entry['p']), - 'pool': six.text_type(entry['p_p']) + 'queue': str(entry['p_q']), + 'project': str(entry['p']), + 'pool': str(entry['p_p']) } diff --git a/zaqar/storage/redis/driver.py b/zaqar/storage/redis/driver.py index e8eba6e49..18153aa3e 100644 --- a/zaqar/storage/redis/driver.py +++ b/zaqar/storage/redis/driver.py @@ -15,7 +15,7 @@ from osprofiler import profiler import redis import redis.sentinel -from six.moves import urllib +import urllib from zaqar.common import decorators from zaqar.common import errors diff --git a/zaqar/storage/redis/pools.py b/zaqar/storage/redis/pools.py index b425bfe99..8490e31e0 100644 --- a/zaqar/storage/redis/pools.py +++ b/zaqar/storage/redis/pools.py @@ -16,8 +16,8 @@ controller for redis. Schema: - 'n': name :: six.text_type - 'u': uri :: six.text_type + 'n': name :: str + 'u': uri :: str 'w': weight :: int 'o': options :: dict """ diff --git a/zaqar/storage/redis/subscriptions.py b/zaqar/storage/redis/subscriptions.py index 7b516e2d6..5752b537b 100644 --- a/zaqar/storage/redis/subscriptions.py +++ b/zaqar/storage/redis/subscriptions.py @@ -39,12 +39,12 @@ class SubscriptionController(base.Subscription): Subscriptions are unique by project + queue + subscriber. Schema: - 's': source :: six.text_type - 'u': subscriber:: six.text_type + 's': source :: str + 'u': subscriber:: str 't': ttl:: int 'e': expires: int 'o': options :: dict - 'p': project :: six.text_type + 'p': project :: str """ def __init__(self, *args, **kwargs): super(SubscriptionController, self).__init__(*args, **kwargs) diff --git a/zaqar/storage/redis/utils.py b/zaqar/storage/redis/utils.py index c9519af1f..448c73ab5 100644 --- a/zaqar/storage/redis/utils.py +++ b/zaqar/storage/redis/utils.py @@ -21,7 +21,6 @@ import time from oslo_log import log as logging from oslo_utils import encodeutils import redis -import six from zaqar.storage import errors @@ -231,7 +230,7 @@ def msg_delayed_filter(message, now): def msg_echo_filter(message, client_uuid): """Return True IFF the specified client posted the message.""" - return message.client_uuid == six.text_type(client_uuid) + return message.client_uuid == str(client_uuid) def msg_expired_filter(message, now): diff --git a/zaqar/storage/swift/driver.py b/zaqar/storage/swift/driver.py index 58a8d38f9..3d63dd75f 100644 --- a/zaqar/storage/swift/driver.py +++ b/zaqar/storage/swift/driver.py @@ -13,7 +13,7 @@ import logging from osprofiler import profiler -from six.moves import urllib +import urllib from keystoneauth1.identity import generic from keystoneauth1 import session as keystone_session