DeprecationWarning with jsonschema 4.0.0 (validator.py:315)
- Dominant language
- Python
- Stars
- 313
- Forks
- 176
- PR merge metrics
- No merged PRs in 30d
Description
Since 4.0.0 release of jsonschema (https://github.com/Julian/jsonschema/releases/tag/v4.0.0), the following error started popping out in our CI logs:
```
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/nbformat/v4/nbbase.py:100: in output_from_msg
return new_output(output_type=msg_type,
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/nbformat/v4/nbbase.py:67: in new_output
validate(output, output_type)
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/nbformat/v4/nbbase.py:39: in validate
return validate(node, ref=ref, version=nbformat)
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/nbformat/validator.py:268: in validate
for error in iter_validate(nbdict, ref=ref, version=version,
/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/nbformat/validator.py:315: in iter_validate
for error in errors:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Draft4Validator(schema={'$schema': 'http://json-...ft-04/schema#', 'additionalProperties': False, 'definitions': {'cel...utput_type', 'data', 'metadata'], ...}, ...}, 'description': 'Jupyter Note... JSON schema.', ...}, format_checker=None)
instance = {'output_type': 'display_data', 'metadata': {'needs_background': 'light'}, 'data': {'text/plain': ' warnings.warn(
(
"Passing a schema to Validator.iter_errors "
"is deprecated and will be removed in a future "
"release. Call validator.evolve(schema=new_schema)."
"iter_errors(...) instead."
),
DeprecationWarning,
)
E DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).iter_errors(...) instead.
```
HTH,
Would be great release a fix,
Thanks,
Sylwester
Contributor guide
Assessment
This issue has not been assessed yet.