From cb3a45e1c81ded0488f76a47e888b02e39a73d6f Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Mon, 23 Mar 2026 12:58:57 +0100 Subject: [PATCH] [jsonschema] Mark RefResolver as deprecated --- stubs/jsonschema/jsonschema/validators.pyi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stubs/jsonschema/jsonschema/validators.pyi b/stubs/jsonschema/jsonschema/validators.pyi index 4e93434f1d65..4e4a801dcda6 100644 --- a/stubs/jsonschema/jsonschema/validators.pyi +++ b/stubs/jsonschema/jsonschema/validators.pyi @@ -96,6 +96,14 @@ class Draft202012Validator(_Validator): _Handler: TypeAlias = Callable[[str], Incomplete] +@deprecated( + "jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the " + "https://github.com/python-jsonschema/referencing library, which " + "provides more compliant referencing behavior as well as more " + "flexible APIs for customization. A future release will remove " + "RefResolver. Please file a feature request (on referencing) if you " + "are missing an API for the kind of customization you need." +) class RefResolver: referrer: dict[str, Incomplete] cache_remote: Incomplete