Use latest jsonschema version v4.18 or higher
According to https://github.com/python-jsonschema/jsonschema/releases/tag/v4.18.0 the RefResolver has been deprecated in favor of referencing library which requires a bit of work to change the codebase. This will impact the way we call custom_validator method https://github.com/buildtesters/buildtest/blob/ba44c82e9f9680a114f709bf5f3e558372fea520/buildtest/schemas/defaults.py#L84-L112
What we need to do
- [ ] Update the requirements.txt and pyproject.toml from
jsonschema < 4.18tojsonschema >= 4.18 - [ ] Update the file https://github.com/buildtesters/buildtest/blob/devel/buildtest/schemas/defaults.py. The variable
schema_tablemay not be needed we need to update all references.
To summarize the following line needs to be changed since resolver needs to be handled via Registry().with_resource()
resolver = RefResolver.from_schema(
schema_table["definitions.schema.json"]["recipe"], store=schema_store
)
For more details also check out https://python-jsonschema.readthedocs.io/en/stable/referencing/
According to https://github.com/python-jsonschema/jsonschema/releases/tag/v4.18.0 the RefResolver has been deprecated in favor of referencing library which requires a bit of work to change the codebase. This will impact the way we call
custom_validatormethodhttps://github.com/buildtesters/buildtest/blob/ba44c82e9f9680a114f709bf5f3e558372fea520/buildtest/schemas/defaults.py#L84-L112
upfated
@Xiangs18 i created a PR https://github.com/buildtesters/buildtest/pull/1793 so feel free to get started from here.
this was addressed in https://github.com/buildtesters/buildtest/pull/1802