summaryrefslogtreecommitdiff
path: root/jsonschema/validators.py
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2023-02-23 15:35:44 +0200
committerJulian Berman <Julian@GrayVines.com>2023-02-23 16:12:31 +0200
commit19bdf6191a8e209584b18e7a3d4ec55cad9037e6 (patch)
treeb406a160255aaa084018ccde678a97b08b525edd /jsonschema/validators.py
parent3801d9aea0e044ff8b190bff750594aa18dee67e (diff)
downloadjsonschema-19bdf6191a8e209584b18e7a3d4ec55cad9037e6.tar.gz
Three more exception-related deprecations.
* RefResolutionError is deprecated entirely. Use referencing.Registry-based APIs, and catch referencing.exceptions.Unresolvable if you really want to ignore referencing related issues. * FormatError should now be imported from jsonschema.exceptions only, not from the package root. * ErrorTree should now be imported from jsonschema.exceptions only, not from the package root.
Diffstat (limited to 'jsonschema/validators.py')
-rw-r--r--jsonschema/validators.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/jsonschema/validators.py b/jsonschema/validators.py
index 8ed275b..bd13544 100644
--- a/jsonschema/validators.py
+++ b/jsonschema/validators.py
@@ -884,7 +884,7 @@ class _RefResolver:
try:
self._scopes_stack.pop()
except IndexError:
- raise exceptions.RefResolutionError(
+ raise exceptions._RefResolutionError(
"Failed to pop the scope from an empty stack. "
"`pop_scope()` should only be called once for every "
"`push_scope()`",
@@ -1000,7 +1000,7 @@ class _RefResolver:
try:
document = self.resolve_remote(url)
except Exception as exc:
- raise exceptions.RefResolutionError(exc)
+ raise exceptions._RefResolutionError(exc)
return self.resolve_fragment(document, fragment)
@@ -1054,7 +1054,7 @@ class _RefResolver:
try:
document = document[part]
except (TypeError, LookupError):
- raise exceptions.RefResolutionError(
+ raise exceptions._RefResolutionError(
f"Unresolvable JSON pointer: {fragment!r}",
)