Skip to content

Commit d67decc

Browse files
committed
Add some deprecated directives (for previous deprecations) to the docs.
1 parent ca96760 commit d67decc

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

docs/validate.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ By default, no validation is enforced, but optionally, validation can be enabled
209209
`jsonschema.exceptions.ValidationError.cause` attribute
210210
of the resulting validation error.
211211

212+
.. deprecated:: v4.14.0
213+
214+
Use `FormatChecker.checks` on an instance instead.
215+
212216

213217
.. autoexception:: FormatError
214218
:noindex:

jsonschema/protocols.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ class Validator(Protocol):
7474
against instances. Ensure you've installed `jsonschema` with
7575
its `extra (optional) dependencies <index:extras>` when
7676
invoking ``pip``.
77+
78+
.. deprecated:: v4.12.0
79+
80+
Subclassing validator classes now explicitly warns this is not part of
81+
their public API.
7782
"""
7883

7984
#: An object representing the validator's meta schema (the schema that
@@ -171,6 +176,11 @@ def iter_errors(self, instance: Any) -> Iterable[ValidationError]:
171176
... print(error.message)
172177
4 is not one of [1, 2, 3]
173178
[2, 3, 4] is too long
179+
180+
.. deprecated:: v4.0.0
181+
182+
Calling this function with a second schema argument is deprecated.
183+
Use `Validator.evolve` instead.
174184
"""
175185

176186
def validate(self, instance: Any) -> None:

jsonschema/validators.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,8 @@ def base_uri(self):
803803
def in_scope(self, scope):
804804
"""
805805
Temporarily enter the given scope for the duration of the context.
806+
807+
.. deprecated:: v4.0.0
806808
"""
807809
warnings.warn(
808810
"jsonschema.RefResolver.in_scope is deprecated and will be "

0 commit comments

Comments
 (0)