diff --git a/docs/validate.rst b/docs/validate.rst index d59d63473..f9498377b 100644 --- a/docs/validate.rst +++ b/docs/validate.rst @@ -209,6 +209,10 @@ By default, no validation is enforced, but optionally, validation can be enabled `jsonschema.exceptions.ValidationError.cause` attribute of the resulting validation error. + .. deprecated:: v4.14.0 + + Use `FormatChecker.checks` on an instance instead. + .. autoexception:: FormatError :noindex: diff --git a/jsonschema/protocols.py b/jsonschema/protocols.py index a8406164e..1f4384d67 100644 --- a/jsonschema/protocols.py +++ b/jsonschema/protocols.py @@ -74,6 +74,11 @@ class Validator(Protocol): against instances. Ensure you've installed `jsonschema` with its `extra (optional) dependencies ` when invoking ``pip``. + + .. deprecated:: v4.12.0 + + Subclassing validator classes now explicitly warns this is not part of + their public API. """ #: An object representing the validator's meta schema (the schema that @@ -171,6 +176,11 @@ def iter_errors(self, instance: Any) -> Iterable[ValidationError]: ... print(error.message) 4 is not one of [1, 2, 3] [2, 3, 4] is too long + + .. deprecated:: v4.0.0 + + Calling this function with a second schema argument is deprecated. + Use `Validator.evolve` instead. """ def validate(self, instance: Any) -> None: diff --git a/jsonschema/validators.py b/jsonschema/validators.py index cb460474c..ea6f52b8e 100644 --- a/jsonschema/validators.py +++ b/jsonschema/validators.py @@ -803,6 +803,8 @@ def base_uri(self): def in_scope(self, scope): """ Temporarily enter the given scope for the duration of the context. + + .. deprecated:: v4.0.0 """ warnings.warn( "jsonschema.RefResolver.in_scope is deprecated and will be "