summaryrefslogtreecommitdiff
path: root/jsonschema
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2023-02-16 14:38:33 +0200
committerJulian Berman <Julian@GrayVines.com>2023-02-21 09:58:40 +0200
commitbdda72350321cca37b2eb64276d388fe441ca622 (patch)
treefeccca043eec9b27f6b1b7da4753375b671f77e6 /jsonschema
parenta93e88befbda92ac953f1c4f8de0b07e546b852f (diff)
downloadjsonschema-bdda72350321cca37b2eb64276d388fe441ca622.tar.gz
Flail to get Sphinx to find references again.
Diffstat (limited to 'jsonschema')
-rw-r--r--jsonschema/protocols.py9
-rw-r--r--jsonschema/validators.py2
2 files changed, 5 insertions, 6 deletions
diff --git a/jsonschema/protocols.py b/jsonschema/protocols.py
index 9d34f61..65f5898 100644
--- a/jsonschema/protocols.py
+++ b/jsonschema/protocols.py
@@ -11,8 +11,6 @@ from collections.abc import Callable, Mapping
from typing import TYPE_CHECKING, Any, ClassVar, Iterable
import sys
-from referencing.jsonschema import SchemaRegistry
-
# doing these imports with `try ... except ImportError` doesn't pass mypy
# checking because mypy sees `typing._SpecialForm` and
# `typing_extensions._SpecialForm` as incompatible
@@ -32,6 +30,7 @@ else:
if TYPE_CHECKING:
import jsonschema
import jsonschema.validators
+ import referencing.jsonschema
from jsonschema.exceptions import ValidationError
@@ -73,8 +72,8 @@ class Validator(Protocol):
.. deprecated:: v4.18.0
- `RefResolver` has been deprecated in favor of `referencing`,
- and with it, this argument.
+ `RefResolver <_RefResolver>` has been deprecated in favor of
+ `referencing`, and with it, this argument.
format_checker:
@@ -119,7 +118,7 @@ class Validator(Protocol):
def __init__(
self,
schema: Mapping | bool,
- registry: SchemaRegistry,
+ registry: referencing.jsonschema.SchemaRegistry,
format_checker: jsonschema.FormatChecker | None = None,
) -> None:
...
diff --git a/jsonschema/validators.py b/jsonschema/validators.py
index b802856..8ed275b 100644
--- a/jsonschema/validators.py
+++ b/jsonschema/validators.py
@@ -786,7 +786,7 @@ class _RefResolver:
.. deprecated:: v4.18.0
- `RefResolver` has been deprecated in favor of `referencing`.
+ ``RefResolver`` has been deprecated in favor of `referencing`.
"""
_DEPRECATION_MESSAGE = (