summaryrefslogtreecommitdiff
path: root/jsonschema/_utils.py
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2022-12-28 09:43:16 -0500
committerJulian Berman <Julian@GrayVines.com>2023-02-21 09:58:40 +0200
commitbf94d57b2b6d77cc8057be295f077435f4d4020d (patch)
tree4ee05f545dce5856c59347923a252396ad3518e3 /jsonschema/_utils.py
parent0ce3cef1ad37071b7bf37a919fc24498af88c831 (diff)
downloadjsonschema-bf94d57b2b6d77cc8057be295f077435f4d4020d.tar.gz
Move to retrieving schemas from the jsonschema-specifications registry.
Still will be tweaked as the referencing library's public API changes.
Diffstat (limited to 'jsonschema/_utils.py')
-rw-r--r--jsonschema/_utils.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py
index 418348c..c218b18 100644
--- a/jsonschema/_utils.py
+++ b/jsonschema/_utils.py
@@ -1,15 +1,7 @@
from collections.abc import Mapping, MutableMapping, Sequence
from urllib.parse import urlsplit
import itertools
-import json
import re
-import sys
-
-# The files() API was added in Python 3.9.
-if sys.version_info >= (3, 9): # pragma: no cover
- from importlib import resources
-else: # pragma: no cover
- import importlib_resources as resources # type: ignore
class URIDict(MutableMapping):
@@ -52,16 +44,6 @@ class Unset:
return "<unset>"
-def load_schema(name):
- """
- Load a schema from ./schemas/``name``.json and return it.
- """
-
- path = resources.files(__package__).joinpath(f"schemas/{name}.json")
- data = path.read_text(encoding="utf-8")
- return json.loads(data)
-
-
def format_as_index(container, indices):
"""
Construct a single string containing indexing operations for the indices.