Skip to content

Commit 1ac2702

Browse files
committed
Try the new referencing API.
1 parent 078b5fc commit 1ac2702

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ python-dateutil==2.8.2
6767
# via matplotlib
6868
pytz==2022.7.1
6969
# via babel
70-
referencing==0.21.0
70+
referencing==0.23.0
7171
# via jsonschema-specifications
7272
requests==2.28.2
7373
# via sphinx

jsonschema_specifications/_core.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def _schemas():
3030
children = [child] if child.is_file() else child.iterdir()
3131
for path in children:
3232
contents = json.loads(path.read_text())
33-
resource = Resource.from_contents(contents)
34-
yield resource.id(), resource
33+
yield Resource.from_contents(contents)
3534

3635

37-
REGISTRY: Registry = Registry().with_resources(_schemas()).crawl()
36+
REGISTRY: Registry = (_schemas() @ Registry()).crawl()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ classifiers = [
3232
dynamic = ["version"]
3333

3434
dependencies = [
35-
"referencing>=0.21.0",
35+
"referencing>=0.23.0",
3636
"importlib_resources>=1.4.0;python_version<'3.9'",
3737
]
3838

0 commit comments

Comments
 (0)