Merge "[Part 10] Remove all usage of six library"

This commit is contained in:
Zuul 2022-02-07 03:32:44 +00:00 committed by Gerrit Code Review
commit 14c3ffbe8e
6 changed files with 8 additions and 9 deletions

View File

@ -21,7 +21,7 @@ from gevent import monkey as curious_george
curious_george.patch_all(thread=False, select=False)
import gevent
import marktime
from six.moves import urllib
import urllib
from zaqarclient.transport import errors
from zaqar.bench import config

View File

@ -33,7 +33,7 @@ class Api(object):
:param action: Action for which params need
to be validated.
:type action: `six.text_type`
:type action: `str`
:returns: Action's schema
:rtype: dict
@ -57,7 +57,7 @@ class Api(object):
:param action: Action's for which body need
to be validated.
:type action: `six.text_type`
:type action: `str`
:param body: Params to validate
:type body: dict

View File

@ -28,7 +28,7 @@ class Request(object):
:param headers: Request headers. Default: None
:type headers: dict
:param api: Api entry point. i.e: 'queues.v1'
:type api: `six.text_type`.
:type api: `str`.
:param env: Request environment. Default: None
:type env: dict
"""

View File

@ -24,7 +24,7 @@ class Response(object):
:param request: The request sent to the server.
:type request: `zaqar.transport.request.Request`
:param body: Response's body
:type body: `six.string_types`
:type body: `str`
:param headers: Optional headers returned in the response.
:type headers: dict
"""

View File

@ -32,7 +32,6 @@ them do, an AttributeError exception will be raised.
import contextlib
from oslo_log import log as logging
import six
from zaqar.common import decorators
from zaqar.i18n import _
@ -58,7 +57,7 @@ class Pipeline(object):
for `method`.
:params method: The method name to call on each stage
:type method: `six.text_type`
:type method: `str`
:returns: A callable to consume the pipeline.
"""
@ -88,7 +87,7 @@ class Pipeline(object):
try:
target = getattr(stage, method)
except AttributeError:
sstage = six.text_type(stage)
sstage = str(stage)
msgtmpl = _(u"Stage %(stage)s does not "
"implement %(method)s")
LOG.debug(msgtmpl, {'stage': sstage, 'method': method})

View File

@ -25,7 +25,7 @@ def weighted(objs, key='weight', generator=random.randint):
:param objs: a list of objects containing at least the field `key`
:type objs: [dict]
:param key: the field in each obj that corresponds to weight
:type key: six.text_type
:type key: str
:param generator: a number generator taking two ints
:type generator: function(int, int) -> int
:return: an object