diff --git a/babel.cfg b/babel.cfg deleted file mode 100644 index 15cd6cb..0000000 --- a/babel.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[python: **.py] - diff --git a/requirements.txt b/requirements.txt index fc1071a..42d28fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,6 @@ pbr>=2.0 # Apache-2.0 oslo.config!=4.3.0,!=4.4.0,>=4.0.0 # Apache-2.0 -six>=1.9.0 # MIT oslo.serialization!=2.19.1,>=1.10.0 # Apache-2.0 oslo.utils>=3.20.0 # Apache-2.0 testtools>=1.4.0 # MIT diff --git a/setup.cfg b/setup.cfg index 8768c65..9649059 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,37 +13,17 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 - Programming Language :: Python :: 3.3 - Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 [files] packages = zaqar_tempest_plugin -[build_sphinx] -all-files = 1 -warning-is-error = 1 -source-dir = doc/source -build-dir = doc/build - -[upload_sphinx] -upload-dir = doc/build/html - -[compile_catalog] -directory = zaqar_tempest_plugin/locale -domain = zaqar_tempest_plugin - -[update_catalog] -domain = zaqar_tempest_plugin -output_dir = zaqar_tempest_plugin/locale -input_file = zaqar_tempest_plugin/locale/zaqar_tempest_plugin.pot - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = zaqar_tempest_plugin/locale/zaqar_tempest_plugin.pot - [entry_points] tempest.test_plugins = zaqar_tests = zaqar_tempest_plugin.plugin:ZaqarTempestPlugin diff --git a/setup.py b/setup.py index 056c16c..f76858d 100644 --- a/setup.py +++ b/setup.py @@ -13,17 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setuptools.setup( setup_requires=['pbr'], pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index 6c8c1f4..00b5616 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=0.12.0,<0.13 # Apache-2.0 +hacking>=3.1.0,<3.2.0 # Apache-2.0 coverage>=4.0,!=4.4 # Apache-2.0 python-subunit>=0.0.18 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 441bdb2..52a1282 100644 --- a/tox.ini +++ b/tox.ini @@ -7,12 +7,13 @@ ignore_basepython_conflict = True [testenv] basepython = python3 usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] @@ -25,7 +26,7 @@ commands = {posargs} commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] -commands = python setup.py build_sphinx +commands = sphinx-build -a -W -b html doc/source doc/build/html [testenv:releasenotes] commands = diff --git a/zaqar_tempest_plugin/services/messaging/json/messaging_client.py b/zaqar_tempest_plugin/services/messaging/json/messaging_client.py index 6a58636..3811673 100644 --- a/zaqar_tempest_plugin/services/messaging/json/messaging_client.py +++ b/zaqar_tempest_plugin/services/messaging/json/messaging_client.py @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import urllib + from oslo_utils import uuidutils from oslo_serialization import jsonutils as json -from six.moves.urllib import parse as urllib from tempest.lib.common import rest_client from zaqar_tempest_plugin.api_schema.response.v1 \ @@ -150,7 +151,7 @@ class V1MessagingClient(MessagingClient): def post_claims(self, queue_name, rbody, url_params=False): uri = '{0}/queues/{1}/claims'.format(self.uri_prefix, queue_name) if url_params: - uri += '?%s' % urllib.urlencode(url_params) + uri += '?%s' % urllib.parse.urlencode(url_params) resp, body = self.post(uri, body=json.dumps(rbody), extra_headers=True, @@ -285,7 +286,7 @@ class V11MessagingClient(MessagingClient): def post_claims(self, queue_name, rbody, url_params=False): uri = '{0}/queues/{1}/claims'.format(self.uri_prefix, queue_name) if url_params: - uri += '?%s' % urllib.urlencode(url_params) + uri += '?%s' % urllib.parse.urlencode(url_params) resp, body = self.post(uri, body=json.dumps(rbody), extra_headers=True, @@ -326,7 +327,7 @@ class V2MessagingClient(MessagingClient): def list_queues(self, url_params=False): uri = '{0}/queues'.format(self.uri_prefix) if url_params: - uri += '?%s' % urllib.urlencode(url_params) + uri += '?%s' % urllib.parse.urlencode(url_params) resp, body = self.get(uri, headers=self.headers) if resp['status'] != '204': @@ -436,7 +437,7 @@ class V2MessagingClient(MessagingClient): def post_claims(self, queue_name, rbody, url_params=False): uri = '{0}/queues/{1}/claims'.format(self.uri_prefix, queue_name) if url_params: - uri += '?%s' % urllib.urlencode(url_params) + uri += '?%s' % urllib.parse.urlencode(url_params) resp, body = self.post(uri, body=json.dumps(rbody), extra_headers=True, diff --git a/zaqar_tempest_plugin/tests/v1/test_claims.py b/zaqar_tempest_plugin/tests/v1/test_claims.py index b54f972..9cdce2e 100644 --- a/zaqar_tempest_plugin/tests/v1/test_claims.py +++ b/zaqar_tempest_plugin/tests/v1/test_claims.py @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from six.moves.urllib import parse as urlparse +import urllib + from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators @@ -105,7 +106,7 @@ class TestClaims(base.BaseV1MessagingTest): # Delete Claimed message # This will implicitly verify that the claim is deleted. - message_uri = urlparse.urlparse(claim_uri).path + message_uri = urllib.parse.urlparse(claim_uri).path self.client.delete_messages(message_uri) @classmethod diff --git a/zaqar_tempest_plugin/tests/v1_1/test_claims.py b/zaqar_tempest_plugin/tests/v1_1/test_claims.py index 40cc769..e9694bd 100644 --- a/zaqar_tempest_plugin/tests/v1_1/test_claims.py +++ b/zaqar_tempest_plugin/tests/v1_1/test_claims.py @@ -13,7 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -from six.moves.urllib import parse as urlparse +import urllib + from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators @@ -105,7 +106,7 @@ class TestClaims(base.BaseV11MessagingTest): # Delete Claimed message # This will implicitly verify that the claim is deleted. - message_uri = urlparse.urlparse(claim_uri).path + message_uri = urllib.parse.urlparse(claim_uri).path self.client.delete_messages(message_uri) @classmethod diff --git a/zaqar_tempest_plugin/tests/v2/test_claims.py b/zaqar_tempest_plugin/tests/v2/test_claims.py index a4fdbf4..0238466 100644 --- a/zaqar_tempest_plugin/tests/v2/test_claims.py +++ b/zaqar_tempest_plugin/tests/v2/test_claims.py @@ -14,8 +14,8 @@ # limitations under the License. import time +import urllib -from six.moves.urllib import parse as urlparse from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators @@ -107,7 +107,7 @@ class TestClaims(base.BaseV2MessagingTest): # Delete Claimed message # This will implicitly verify that the claim is deleted. - message_uri = urlparse.urlparse(claim_uri).path + message_uri = urllib.parse.urlparse(claim_uri).path self.client.delete_messages(message_uri) @decorators.idempotent_id('c1975970-66e7-11e7-a771-fa163e40e1ff') diff --git a/zaqar_tempest_plugin/tests/v2/test_messages_negative.py b/zaqar_tempest_plugin/tests/v2/test_messages_negative.py index 22e0a5d..6085f18 100644 --- a/zaqar_tempest_plugin/tests/v2/test_messages_negative.py +++ b/zaqar_tempest_plugin/tests/v2/test_messages_negative.py @@ -16,7 +16,6 @@ import random from oslo_utils import uuidutils -from six import moves from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators @@ -33,7 +32,7 @@ class TestMessagesNegative(base.BaseV2MessagingTest): def resource_setup(cls): super(TestMessagesNegative, cls).resource_setup() cls.queues = list() - for _ in moves.xrange(1): + for _ in range(1): queue_name = data_utils.rand_name('Queues-Test') cls.queues.append(queue_name) # Create Queue diff --git a/zaqar_tempest_plugin/tests/v2/test_queues.py b/zaqar_tempest_plugin/tests/v2/test_queues.py index d8db091..5764918 100644 --- a/zaqar_tempest_plugin/tests/v2/test_queues.py +++ b/zaqar_tempest_plugin/tests/v2/test_queues.py @@ -14,7 +14,6 @@ # limitations under the License. -from six import moves from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators @@ -49,7 +48,7 @@ class TestManageQueue(base.BaseV2MessagingTest): def resource_setup(cls): super(TestManageQueue, cls).resource_setup() cls.queues = list() - for _ in moves.xrange(5): + for _ in range(5): queue_name = data_utils.rand_name('Queues-Test') cls.queues.append(queue_name) # Create Queue diff --git a/zaqar_tempest_plugin/tests/v2/test_queues_negative.py b/zaqar_tempest_plugin/tests/v2/test_queues_negative.py index 5cea753..5bf8ba9 100644 --- a/zaqar_tempest_plugin/tests/v2/test_queues_negative.py +++ b/zaqar_tempest_plugin/tests/v2/test_queues_negative.py @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from six import moves from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc @@ -27,7 +26,7 @@ class QueueNegativeTestJSON(base.BaseV2MessagingTest): def resource_setup(cls): super(QueueNegativeTestJSON, cls).resource_setup() cls.queues = list() - for _ in moves.xrange(1): + for _ in range(1): queue_name = data_utils.rand_name('Queues-Test') cls.queues.append(queue_name) cls.client.create_queue(queue_name)