Use importlib.metadata to determine jsonschema version. event-model contains some conditional logic depending on the version.
Description
Pure refactor: no change in behaviour, this just uses a more up-to-date method of determining the version.
Motivation and Context
The current method is deprecated and produces the following warning:
DeprecationWarning: Accessing jsonschema.__version__ is deprecated and will be removed in a future release. Use importlib.metadata directly to query for jsonschema's version.
How Has This Been Tested?
The docs build passes in CI, which validates the case for jsonschema>=3.0.0. I have tested locally with 2.6.0 for the other case.
Use
importlib.metadata
to determinejsonschema
version.event-model
contains some conditional logic depending on the version.Description
Pure refactor: no change in behaviour, this just uses a more up-to-date method of determining the version.
Motivation and Context
The current method is deprecated and produces the following warning:
How Has This Been Tested?
The docs build passes in CI, which validates the case for
jsonschema>=3.0.0
. I have tested locally with2.6.0
for the other case.