From 5c900d4ab59e0338159c4171d9f9bc1d8f199717 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 28 Jan 2024 16:14:09 +0900 Subject: [PATCH] Bump hacking hacking 3.0.x is too old. Also remove the note about very old pip's behavior. Change-Id: I6d2d180a9ec80664efae498f86a4d1f734aacfa5 --- requirements.txt | 3 --- test-requirements.txt | 6 +----- zaqar/storage/mongodb/utils.py | 8 ++++---- zaqar/storage/redis/utils.py | 8 ++++---- .../storage/sqlalchemy_migration/test_migrations_base.py | 6 +++--- zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py | 2 +- .../tests/unit/transport/wsgi/v2_0/test_subscriptions.py | 2 +- 7 files changed, 14 insertions(+), 21 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0685cb129..8c23ed63c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,3 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. pbr!=2.1.0,>=2.0.0 # Apache-2.0 alembic>=0.9.6 # MIT diff --git a/test-requirements.txt b/test-requirements.txt index 61dfe3b44..b82d4dcca 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,8 +1,4 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -# Metrics and style -hacking>=3.0.1,<3.1.0 # Apache-2.0 +hacking>=6.1.0,<6.2.0 # Apache-2.0 # Backends redis>=3.0.0 # MIT diff --git a/zaqar/storage/mongodb/utils.py b/zaqar/storage/mongodb/utils.py index b006756e7..b3626953b 100644 --- a/zaqar/storage/mongodb/utils.py +++ b/zaqar/storage/mongodb/utils.py @@ -301,14 +301,14 @@ def retries_on_autoreconnect(func): break except errors.AutoReconnect as ex: - LOG.warning(u'Caught AutoReconnect, retrying the ' - 'call to {0}'.format(func)) + LOG.warning('Caught AutoReconnect, retrying the ' + 'call to %s', func.__name__) last_ex = ex time.sleep(sleep_sec * (2 ** attempt)) else: - LOG.error(u'Caught AutoReconnect, maximum attempts ' - 'to {0} exceeded.'.format(func)) + LOG.error('Caught AutoReconnect, maximum attempts ' + 'to %s exceeded.', func.__name__) raise last_ex diff --git a/zaqar/storage/redis/utils.py b/zaqar/storage/redis/utils.py index 448c73ab5..705b84903 100644 --- a/zaqar/storage/redis/utils.py +++ b/zaqar/storage/redis/utils.py @@ -203,13 +203,13 @@ def retries_on_connection_error(func): # MasterNotFoundError. ex = sys.exc_info()[1] - LOG.warning(u'Caught ConnectionError, retrying the ' - 'call to {0}'.format(func)) + LOG.warning('Caught ConnectionError, retrying the ' + 'call to %s', func.__name__) time.sleep(sleep_sec * (2 ** attempt)) else: - LOG.error(u'Caught ConnectionError, maximum attempts ' - 'to {0} exceeded.'.format(func)) + LOG.error('Caught ConnectionError, maximum attempts ' + 'to %s exceeded.', func.__name__) raise ex return wrapper diff --git a/zaqar/tests/unit/storage/sqlalchemy_migration/test_migrations_base.py b/zaqar/tests/unit/storage/sqlalchemy_migration/test_migrations_base.py index a1b319ef2..1015d3f27 100644 --- a/zaqar/tests/unit/storage/sqlalchemy_migration/test_migrations_base.py +++ b/zaqar/tests/unit/storage/sqlalchemy_migration/test_migrations_base.py @@ -83,8 +83,8 @@ class BaseWalkMigrationTestCase(object): getattr(command, alembic_command)(*args, **kwargs) res = buf.getvalue().strip() - LOG.debug('Alembic command {command} returns: {result}'.format( - command=alembic_command, result=res)) + LOG.debug('Alembic command {command} returns: {result}', + {'command': alembic_command, 'result': res}) return res @@ -160,7 +160,7 @@ class BaseWalkMigrationTestCase(object): check(engine, data) except Exception: LOG.error("Failed to migrate to version {version} on engine " - "{engine}".format(version=version, engine=engine)) + "{engine}", {'version': version, 'engine': engine}) raise diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py index 6546631ad..e745abb3a 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_flavors_new.py @@ -266,7 +266,7 @@ class TestFlavorsMongoDB(base.V2Base): self.simulate_delete(self.flavor_path) query = 'limit={0}&detailed={1}'.format(limit, detailed) if marker: - query += '&marker={2}'.format(marker) + query += '&marker={0}'.format(marker) with flavors(self, count): result = self.simulate_get(self.url_prefix + '/flavors', diff --git a/zaqar/tests/unit/transport/wsgi/v2_0/test_subscriptions.py b/zaqar/tests/unit/transport/wsgi/v2_0/test_subscriptions.py index 77c7d82e7..4451a7d93 100644 --- a/zaqar/tests/unit/transport/wsgi/v2_0/test_subscriptions.py +++ b/zaqar/tests/unit/transport/wsgi/v2_0/test_subscriptions.py @@ -186,7 +186,7 @@ class TestSubscriptionsMongoDB(base.V2Base): query = 'limit={0}'.format(limit) if marker: - query += '&marker={1}'.format(marker) + query += '&marker={0}'.format(marker) resp = self.simulate_get(self.subscription_path, query_string=query,