Skip to content

Commit 44f4f2f

Browse files
committed
Bump jsonschema minimum to 4.0.0
This allows us to drop some logic from tests. Change-Id: Idc11c1ce6e208774314a5a867789958372f0d591 Signed-off-by: Stephen Finucane <[email protected]>
1 parent 2709e30 commit 44f4f2f

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

nova/tests/unit/compute/test_provider_config.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@
1313
import copy
1414
import ddt
1515
import fixtures
16-
import importlib.metadata
1716
import microversion_parse
1817
import os
1918
from unittest import mock
2019

2120
from oslo_utils.fixture import uuidsentinel
2221
from oslotest import base
23-
from packaging import version
2422

2523
from nova.compute import provider_config
2624
from nova import exception as nova_exc
@@ -119,17 +117,6 @@ class SchemaValidationTestCasesV1(SchemaValidationMixin):
119117
@ddt.unpack
120118
@ddt.file_data('provider_config_data/v1/validation_error_test_data.yaml')
121119
def test_validation_errors(self, config, expected_messages):
122-
# TODO(stephenfin): Drop this once we no longer support jsonschema 3.x
123-
jsonschema_version = importlib.metadata.version('jsonschema')
124-
if version.parse(jsonschema_version) < version.parse('4.0.0'):
125-
if expected_messages == [
126-
"should not be valid under {}",
127-
"validating 'not' in schema['properties']['__source_file']",
128-
]:
129-
expected_messages = [
130-
"{} is not allowed for",
131-
"validating 'not' in schema['properties']['__source_file']", # noqa: E501
132-
]
133120
self.run_test_validation_errors(config, expected_messages)
134121

135122
@ddt.unpack

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ netaddr>=0.7.18 # BSD
2222
netifaces>=0.10.4 # MIT
2323
paramiko>=2.7.1 # LGPLv2.1+
2424
iso8601>=0.1.11 # MIT
25-
jsonschema>=3.2.0 # MIT
25+
jsonschema>=4.0.0 # MIT
2626
python-cinderclient!=4.0.0,>=3.3.0 # Apache-2.0
2727
keystoneauth1>=3.16.0 # Apache-2.0
2828
python-neutronclient>=7.1.0 # Apache-2.0
@@ -66,4 +66,3 @@ python-dateutil>=2.7.0 # BSD
6666
futurist>=1.8.0 # Apache-2.0
6767
openstacksdk>=0.35.0 # Apache-2.0
6868
PyYAML>=5.1 # MIT
69-
packaging>=21.0 # Apache-2.0

0 commit comments

Comments
 (0)