From 6c9bc323268b5ef3a04611ebbf006327ff42e815 Mon Sep 17 00:00:00 2001 From: Michael Boulton Date: Sun, 19 Nov 2023 12:39:58 +0000 Subject: [PATCH 1/2] Revert "Stop warning" This reverts commit 2120b03b898b0f28e5052eee2004daf2f1248c73. This worked locally but failed with a fresh rebuild. I wish Tox picked up dependency changes properly. --- tavern/_core/schema/jsonschema.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tavern/_core/schema/jsonschema.py b/tavern/_core/schema/jsonschema.py index e8797742..896a80ce 100644 --- a/tavern/_core/schema/jsonschema.py +++ b/tavern/_core/schema/jsonschema.py @@ -66,7 +66,7 @@ def is_object_or_sentinel(checker, instance): ) -def oneOf(validator: jsonschema.protocols.Validator, oneOf, instance, schema): +def oneOf(validator, oneOf, instance, schema): """Patched version of 'oneof' that does not complain if something is matched by multiple branches""" subschemas = enumerate(oneOf) all_errors = [] @@ -82,9 +82,7 @@ def oneOf(validator: jsonschema.protocols.Validator, oneOf, instance, schema): context=all_errors, ) - more_valid = [ - s for i, s in subschemas if validator.evolve(schema=s).is_valid(instance) - ] + more_valid = [s for i, s in subschemas if validator.is_valid(instance, s)] if more_valid: more_valid.append(first_valid) reprs = ", ".join(repr(schema) for schema in more_valid) From 5c36caaae64d5da012910125ee1aaa2edd78daa5 Mon Sep 17 00:00:00 2001 From: Michael Boulton Date: Sun, 19 Nov 2023 12:43:56 +0000 Subject: [PATCH 2/2] Fix bump of dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3655b5d0..bfcac429 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "jmespath>=1,<2", "jsonschema>=3.2.0,<5", "paho-mqtt>=1.3.1,<=1.6.1", - "pyjwt>=2.6.0,<3", + "pyjwt>=2.5.0,<3", "pykwalify>=1.8.0,<2", "pytest>=7,<7.3", "python-box>=6,<7",