Revert "Fix DeprecationWarning of jsonschema"

This reverts commit d52fb8cb6d.

Reason for revert:

We need to support till xena as Tempest master do support stable/xena onwards branches. stable/xena has jsonschema 3.2.0 only https://github.com/openstack/requirements/blob/stable/xena/upper-constraints.txt#L548

We need to avoid such bumping unless something is failing.

With jsonschema 3.2.0 we do not have the new things so let's keep them and we can fix it once we have jsonschema version as upper-constraint where they are going to be removed.

https://github.com/python-jsonschema/jsonschema/blob/v3.2.0/jsonschema/validators.py#L475

Change-Id: Iab8dbcd469e2ca234c9a42673b8b02f470ec2404
This commit is contained in:
Ghanshyam 2023-03-03 03:05:40 +00:00
parent d52fb8cb6d
commit 21f40f3df2

View File

@ -18,7 +18,7 @@ from oslo_utils import timeutils
# JSON Schema validator and format checker used for JSON Schema validation
JSONSCHEMA_VALIDATOR = jsonschema.Draft4Validator
FORMAT_CHECKER = jsonschema.Draft4Validator.FORMAT_CHECKER
FORMAT_CHECKER = jsonschema.draft4_format_checker
# NOTE(gmann): Add customized format checker for 'date-time' format because:
@ -39,7 +39,7 @@ def _validate_datetime_format(instance):
return True
@FORMAT_CHECKER.checks('base64')
@jsonschema.FormatChecker.cls_checks('base64')
def _validate_base64_format(instance):
try:
if isinstance(instance, str):