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

pin jsonschema to 3.2.0 #50

Merged
merged 1 commit into from Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements_dev.txt
Expand Up @@ -11,5 +11,5 @@ numpy>=1.19.0

pytest==6.2.4
pyyaml>=5.4.1
jsonschema
jsonschema==3.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would have been better as <4?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you testing (how did you find out it was breaking?)
EDIT: I think I found it... I was in a branch and didn't realize it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be two things: in jsonschema==4.0.1 they added two new validators (latest is default, which ends up being jsonschema.validators.Draft202012Validator). Our schema doesn't seem to be valid in that latest hyperschema.

Also, the Draft201909Validator in the package seems to be broken.
For the moment the most appropriate fix is probably to add
"$schema": "http://json-schema.org/draft-07/schema#" to the top of our schema. This will allow it to work with jsonschema==4.0.1 and we should be versioning the hyperschema anyway.
I will put in a PR shortly - have to go to a meeting right now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the newest draft 2020-12 "items" functionality is largely replaced by "prefixItems", and "additionalItems" is replaced by "items" ("additionalItems" goes away). That is why our schema doesn't load in the latest validator.

typing_extensions