-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Upgrade CI scripts dependencies #1786
Conversation
Port to the use of the referencing library instead of the deprecated RefResolver Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
JSONPath is now a RFC instead of a draft so the major release was bumped Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible other than a couple of nits
@@ -42,6 +42,12 @@ def import_error(module, package, debian, error): | |||
import_error("jsonschema", "jsonschema", "jsonschema", e) | |||
raise | |||
|
|||
try: | |||
import referencing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we depend on it, we should add this to requirements.txt
, even though it will be pulled in as a transitive dependency in practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
scripts/helpers.py
Outdated
|
||
def load_resource_from_uri(path): | ||
"""Load a JSON or YAML JSON Schema from a file:// URI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Load a JSON or YAML JSON Schema from a file:// URI. | |
"""Load a JSON or YAML JSON Schema, as a `referencing.Resource` object, from a file:// URI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Will allow us to benefit from future fixes in JSON Schema validation.
Preview: https://pr1786--matrix-spec-previews.netlify.app