From 0f48ff3e8d3c7d3311a58442b8cf71d6e3658620 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Tue, 27 Jun 2023 17:29:24 +0100 Subject: [PATCH] Bump hacking to 6.0.x A note about dependency ordering is removed from the requirements file: this is no longer true with the dependency resolver introduced with pip 20.3. Change-Id: I615be3453db37588edf98a46ce484efc5e051f11 Signed-off-by: Stephen Finucane --- keystonemiddleware/audit/_api.py | 3 ++- .../tests/unit/audit/test_audit_oslo_messaging.py | 5 ++--- requirements.txt | 4 ---- test-requirements.txt | 10 ++-------- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/keystonemiddleware/audit/_api.py b/keystonemiddleware/audit/_api.py index c89abaa2..c75d1315 100644 --- a/keystonemiddleware/audit/_api.py +++ b/keystonemiddleware/audit/_api.py @@ -87,7 +87,8 @@ class OpenStackAuditApi(object): if cfg_file: try: map_conf = _ConfigParser() - map_conf.read_file(open(cfg_file)) + with open(cfg_file) as fh: + map_conf.read_file(fh) try: default_target_endpoint_type = map_conf.get( diff --git a/keystonemiddleware/tests/unit/audit/test_audit_oslo_messaging.py b/keystonemiddleware/tests/unit/audit/test_audit_oslo_messaging.py index fd7f9506..f0db210d 100644 --- a/keystonemiddleware/tests/unit/audit/test_audit_oslo_messaging.py +++ b/keystonemiddleware/tests/unit/audit/test_audit_oslo_messaging.py @@ -88,6 +88,5 @@ class AuditNotifierConfigTest(base.BaseAuditMiddlewareTest): audit_middleware = self.create_simple_middleware() # make sure it is using a local notifier instead of oslo_messaging - self.assertTrue( - isinstance(audit_middleware._notifier, - audit._notifier._LogNotifier)) + self.assertIsInstance(audit_middleware._notifier, + audit._notifier._LogNotifier) diff --git a/requirements.txt b/requirements.txt index c1398f94..7472b63f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,10 +2,6 @@ # date but we do not test them so no guarantee of having them all correct. If # you find any incorrect lower bounds, let us know or propose a fix. -# 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. - keystoneauth1>=3.12.0 # Apache-2.0 oslo.cache>=1.26.0 # Apache-2.0 oslo.config>=5.2.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index b539b017..f56db0f0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,11 +1,5 @@ -# 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. - -hacking>=3.0,<4.0.0 # Apache-2.0 -flake8-docstrings==1.6.0 # MIT -pep8==1.7.1 # MIT - +hacking~=6.0.1 # Apache-2.0 +flake8-docstrings~=1.7.0 # MIT coverage!=4.4,>=4.0 # Apache-2.0 cryptography>=3.0 # BSD/Apache-2.0