Skip to content

Commit 1858acb

Browse files
authored
[jsonschema] Mark RefResolver as deprecated (#15546)
1 parent 81a6d24 commit 1858acb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

stubs/jsonschema/jsonschema/validators.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ class Draft202012Validator(_Validator):
9696

9797
_Handler: TypeAlias = Callable[[str], Incomplete]
9898

99+
@deprecated(
100+
"jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the "
101+
"https://github.com/python-jsonschema/referencing library, which "
102+
"provides more compliant referencing behavior as well as more "
103+
"flexible APIs for customization. A future release will remove "
104+
"RefResolver. Please file a feature request (on referencing) if you "
105+
"are missing an API for the kind of customization you need."
106+
)
99107
class RefResolver:
100108
referrer: dict[str, Incomplete]
101109
cache_remote: Incomplete

0 commit comments

Comments
 (0)