Skip to content

Remove deprecation warning validator.validate

Explanation of changes

I don't want to know how many users were annoyed by this deprecation warning.

Warning: 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.
    for error in self.iter_errors(*args, **kwargs):

Now it's gone! In hindsight, the change is quite straightforward, but the instructions are really not clear, because they look like jsonschema is using their own deprecated code.

Motivation of changes

Avoid deprecation warnings


Merge checklist

See also merge request guidelines

  • Merge request has been reviewed (in-depth by a knowledgeable contributor), and is approved by a project maintainer.
  • New code is covered by unit tests (or N/A).
  • New code is documented and docstrings use numpydoc format (or N/A).
  • New functionality: considered making private instead of extending public API (or N/A).
  • Public API changed: added @deprecated (or N/A).
  • Tested on hardware (or N/A).
  • CHANGELOG.md and AUTHORS.md have been updated (or N/A).
  • Windows tests in CI pipeline pass (manually triggered by maintainers before merging).
    • Maintainers do not hit Auto-merge, we need to actively check as manual tests do not block pipeline

For reference, the issues workflow is described in the contribution guidelines.

Edited by Konstantin Lehmann

Merge request reports