From ee024ffc61bee56b25e816f489d7365fe1445c6d Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Fri, 9 Sep 2022 11:55:56 +0300 Subject: Deprecate jsonschema.draftN_format_checker attributes. Format support / enablement will change with vocabulary support, but in the interim, now that #905 is merged, these objects are better accessed by retrieving them directly from the corresponding validator. In other words: don't do: from jsonschema import draft202012_format_checker just do from jsonschema import Draft202012Validator do_whatever_with(Draft202012Validator.FORMAT_CHECKER) --- docs/validate.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/validate.rst b/docs/validate.rst index f949837..9f88259 100644 --- a/docs/validate.rst +++ b/docs/validate.rst @@ -181,7 +181,7 @@ By default, no validation is enforced, but optionally, validation can be enabled >>> validate( ... instance="-12", ... schema={"format" : "ipv4"}, - ... format_checker=draft202012_format_checker, + ... format_checker=Draft202012Validator.FORMAT_CHECKER, ... ) Traceback (most recent call last): ... -- cgit v1.2.1