Skip to content

Commit

Permalink
Update jsonschema requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
Code0x58 committed Sep 5, 2019
1 parent 4a98f1a commit 85d0324
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ethpm/validation/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
ValidationError as jsonValidationError,
validate,
)
from jsonschema.validators import (
Draft4Validator,
validator_for,
)

from ethpm import (
ASSETS_DIR,
Expand Down Expand Up @@ -75,7 +79,7 @@ def validate_manifest_against_schema(manifest: Dict[str, Any]) -> None:
"""
schema_data = _load_schema_data()
try:
validate(manifest, schema_data)
validate(manifest, schema_data, cls=validator_for(schema_data, Draft4Validator))
except jsonValidationError as e:
raise EthPMValidationError(
f"Manifest invalid for schema version {schema_data['version']}. "
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"eth-utils>=1.4.0,<2.0.0",
"hexbytes>=0.1.0,<1.0.0",
"ipfshttpclient>=0.4.12,<1",
"jsonschema>=2.6.0,<3",
"jsonschema>=2.6.0,<4.0",
"lru-dict>=1.1.6,<2.0.0",
"protobuf>=3.0.0,<4",
"pypiwin32>=223;platform_system=='Windows'",
Expand Down

0 comments on commit 85d0324

Please sign in to comment.