Skip to content

Commit ccca2cf

Browse files
kratsgmatthewfeickert
authored andcommitted
downgrade validator to maintain behavior for correct draft for v1.0.0 HiFa
1 parent b0674a3 commit ccca2cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/pyhf/schema/validator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import numbers
24
import jsonschema
35
import logging
@@ -92,6 +94,10 @@ def validate(
9294

9395
Validator = jsonschema.Draft202012Validator
9496

97+
# downgrade Validator for v1.0.0
98+
if version == '1.0.0':
99+
Validator = jsonschema.Draft6Validator # type: ignore[assignment]
100+
95101
if allow_tensors:
96102
type_checker = Validator.TYPE_CHECKER.redefine(
97103
"array", _is_array_or_tensor

0 commit comments

Comments
 (0)