Merge "Replace deprecated FormatChecker.cls_checks"

This commit is contained in:
Zuul
2026-02-24 04:29:35 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0
cliff!=2.9.0,>=2.8.0 # Apache-2.0
jsonschema>=3.2.0 # MIT
jsonschema>=4.5.0 # MIT
testtools>=2.2.0 # MIT
paramiko>=2.7.0 # LGPLv2.1+
cryptography>=2.1 # BSD/Apache-2.0
+2 -2
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.draft4_format_checker
FORMAT_CHECKER = JSONSCHEMA_VALIDATOR.FORMAT_CHECKER
# NOTE(gmann): Add customized format checker for 'date-time' format because:
@@ -39,7 +39,7 @@ def _validate_datetime_format(instance):
return True
@jsonschema.FormatChecker.cls_checks('base64')
@FORMAT_CHECKER.checks('base64')
def _validate_base64_format(instance):
try:
if isinstance(instance, str):