File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,11 @@ import warnings
1414try :
1515 import jsonschema .validators
1616except ImportError :
17- jsonschema = None
17+ jsonschema = Unresolvable = None
1818 VALIDATORS = {}
1919else :
20+ from referencing .exceptions import Unresolvable
21+
2022 VALIDATORS = {
2123 "draft3" : jsonschema .validators .Draft3Validator ,
2224 "draft4" : jsonschema .validators .Draft4Validator ,
@@ -587,7 +589,7 @@ class SanityTests(unittest.TestCase):
587589 with self .subTest (case = case , version = version .name ):
588590 try :
589591 Validator (case ["schema" ]).is_valid (12 )
590- except jsonschema . exceptions . RefResolutionError :
592+ except Unresolvable :
591593 pass
592594
593595 @unittest .skipIf (jsonschema is None , "Validation library not present!" )
@@ -615,9 +617,6 @@ class SanityTests(unittest.TestCase):
615617 with self .subTest (path = path ):
616618 try :
617619 validator .validate (cases )
618- except jsonschema .exceptions .RefResolutionError :
619- # python-jsonschema/jsonschema#884
620- pass
621620 except jsonschema .ValidationError as error :
622621 self .fail (str (error ))
623622
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ skipsdist = True
55
66[testenv:sanity]
77# used just for validating the structure of the test case files themselves
8- deps = jsonschema ==4.18.0a4
8+ deps = jsonschema ==4.19.0
99commands = {envpython} bin/jsonschema_suite check
You can’t perform that action at this time.
0 commit comments