From 06cb1c06090d61a3a31bbfe543e460a99ddb215d Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Tue, 11 Jul 2023 16:58:43 -0400 Subject: [PATCH] Drop support for jsonschema 3 --- CHANGELOG.md | 1 + libcove/lib/common.py | 4 +++- setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfaf5c4..e25f1ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Removed - Dropped support for Python 3.6 & 3.7, as these are now end of life. +- Drop jsonschema 3 support ## [0.31.0] - 2023-07-06 diff --git a/libcove/lib/common.py b/libcove/lib/common.py index 4465342..3eede10 100644 --- a/libcove/lib/common.py +++ b/libcove/lib/common.py @@ -235,7 +235,9 @@ def oneOf_draft4(validator, oneOf, instance, schema): context=all_errors, ) - more_valid = [s for i, s in subschemas if validator.is_valid(instance, s)] + more_valid = [ + s for i, s in subschemas if validator.evolve(schema=s).is_valid(instance) + ] if more_valid: more_valid.append(first_valid) reprs = ", ".join(repr(schema) for schema in more_valid) diff --git a/setup.py b/setup.py index 1606175..0ffbd03 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ long_description="A data review library", install_requires=[ "jsonref", - "jsonschema>=3", + "jsonschema>=4", "requests", "cached-property;python_version<'3.8'", "flattentool>=0.11.0",