Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand jsonschema requirements to <4 #1446

Merged
merged 1 commit into from
Sep 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions newsfragments/1446.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update jsonschema to use version 3 instead of 2.
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>=3.0.0,<4.0.0",
"lru-dict>=1.1.6,<2.0.0",
"protobuf>=3.0.0,<4",
"pypiwin32>=223;platform_system=='Windows'",
Expand Down