From 39caab19956e9500f4ab1b2909bd638f361d090e Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Fri, 5 Jan 2024 14:20:28 -0500 Subject: [PATCH 1/6] Update requirements. --- docs/requirements.txt | 8 ++++---- test-requirements.txt | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 44e7fd6..1d73e78 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,7 +6,7 @@ # alabaster==0.7.13 # via sphinx -attrs==23.1.0 +attrs==23.2.0 # via referencing babel==2.14.0 # via sphinx @@ -26,7 +26,7 @@ imagesize==1.4.1 # via sphinx jinja2==3.1.2 # via sphinx -lxml==4.9.3 +lxml==5.0.0 # via sphinx-json-schema-spec markupsafe==2.1.3 # via jinja2 @@ -45,7 +45,7 @@ file:.#egg=referencing # via -r docs/requirements.in requests==2.31.0 # via sphinx -rpds-py==0.14.2 +rpds-py==0.16.2 # via referencing snowballstemmer==2.2.0 # via sphinx @@ -69,7 +69,7 @@ sphinx-basic-ng==1.0.0b2 # via furo sphinx-copybutton==0.5.2 # via -r docs/requirements.in -sphinx-json-schema-spec==2023.8.1 +sphinx-json-schema-spec==2024.1.1 # via -r docs/requirements.in sphinxcontrib-applehelp==1.0.7 # via sphinx diff --git a/test-requirements.txt b/test-requirements.txt index da18c26..9cc29b6 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,7 @@ # # pip-compile --strip-extras test-requirements.in # -attrs==23.1.0 +attrs==23.2.0 # via # pytest-subtests # referencing @@ -14,7 +14,7 @@ packaging==23.2 # via pytest pluggy==1.3.0 # via pytest -pytest==7.4.3 +pytest==7.4.4 # via # -r test-requirements.in # pytest-subtests @@ -22,5 +22,5 @@ pytest-subtests==0.11.0 # via -r test-requirements.in file:.#egg=referencing # via -r test-requirements.in -rpds-py==0.14.2 +rpds-py==0.16.2 # via referencing From 6071a18faea4f4669cc6627b7c2f6a1ccce35714 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 18:21:18 +0000 Subject: [PATCH 2/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.1.11](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.1.11) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2774c35..7c2f125 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: args: [--fix, lf] - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.9" + rev: "v0.1.11" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From d1cd7ad0ba6f65f43d3b8448c5a5e9d1c963282e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 18:05:32 +0000 Subject: [PATCH 3/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.11 → v0.1.13](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.11...v0.1.13) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c2f125..2eac000 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: args: [--fix, lf] - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.11" + rev: "v0.1.13" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From aa7ff1989c71cd88cdb8f83308f35b8cf03194fa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 18:11:03 +0000 Subject: [PATCH 4/6] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.13 → v0.1.14](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.13...v0.1.14) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2eac000..80c0c3e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: args: [--fix, lf] - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.13" + rev: "v0.1.14" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 93218693620d7df17539e4d727d3ea83be1d445a Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Sun, 28 Jan 2024 11:03:59 -0500 Subject: [PATCH 5/6] Update requirements. --- docs/requirements.txt | 27 +++++++++++---------------- test-requirements.txt | 6 +++--- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1d73e78..8ad07f9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,13 +4,13 @@ # # pip-compile --strip-extras docs/requirements.in # -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx attrs==23.2.0 # via referencing babel==2.14.0 # via sphinx -beautifulsoup4==4.12.2 +beautifulsoup4==4.12.3 # via furo certifi==2023.11.17 # via requests @@ -24,11 +24,11 @@ idna==3.6 # via requests imagesize==1.4.1 # via sphinx -jinja2==3.1.2 +jinja2==3.1.3 # via sphinx -lxml==5.0.0 +lxml==5.1.0 # via sphinx-json-schema-spec -markupsafe==2.1.3 +markupsafe==2.1.4 # via jinja2 packaging==23.2 # via sphinx @@ -45,7 +45,7 @@ file:.#egg=referencing # via -r docs/requirements.in requests==2.31.0 # via sphinx -rpds-py==0.16.2 +rpds-py==0.17.1 # via referencing snowballstemmer==2.2.0 # via sphinx @@ -58,11 +58,6 @@ sphinx==7.2.6 # sphinx-basic-ng # sphinx-copybutton # sphinx-json-schema-spec - # sphinxcontrib-applehelp - # sphinxcontrib-devhelp - # sphinxcontrib-htmlhelp - # sphinxcontrib-qthelp - # sphinxcontrib-serializinghtml # sphinxcontrib-spelling # sphinxext-opengraph sphinx-basic-ng==1.0.0b2 @@ -71,17 +66,17 @@ sphinx-copybutton==0.5.2 # via -r docs/requirements.in sphinx-json-schema-spec==2024.1.1 # via -r docs/requirements.in -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-htmlhelp==2.0.5 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-qthelp==1.0.7 # via sphinx -sphinxcontrib-serializinghtml==1.1.9 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx sphinxcontrib-spelling==8.0.0 # via -r docs/requirements.in diff --git a/test-requirements.txt b/test-requirements.txt index 9cc29b6..15dc604 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -12,9 +12,9 @@ iniconfig==2.0.0 # via pytest packaging==23.2 # via pytest -pluggy==1.3.0 +pluggy==1.4.0 # via pytest -pytest==7.4.4 +pytest==8.0.0 # via # -r test-requirements.in # pytest-subtests @@ -22,5 +22,5 @@ pytest-subtests==0.11.0 # via -r test-requirements.in file:.#egg=referencing # via -r test-requirements.in -rpds-py==0.16.2 +rpds-py==0.17.1 # via referencing From 16305060454f89ec04ff6f346704553cb2763f87 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Sun, 28 Jan 2024 11:04:15 -0500 Subject: [PATCH 6/6] Add referencing.jsonschema.SchemaResource. Mirrors the other JSON Schema specialized type aliases. --- docs/changes.rst | 5 +++++ referencing/jsonschema.py | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index 2bb5ea8..6a43ab8 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -2,6 +2,11 @@ Changelog ========= +v0.33.0 +------- + +* Add a ``referencing.jsonschema.SchemaResource`` type alias to go along with the other JSON Schema specialized types. + v0.32.1 ------- diff --git a/referencing/jsonschema.py b/referencing/jsonschema.py index ece049a..564f4d2 100644 --- a/referencing/jsonschema.py +++ b/referencing/jsonschema.py @@ -20,6 +20,9 @@ #: A JSON Schema of any kind Schema = Union[bool, ObjectSchema] +#: A Resource whose contents are JSON Schemas +SchemaResource = Resource[Schema] + #: A JSON Schema Registry SchemaRegistry = Registry[Schema] @@ -588,7 +591,7 @@ class DynamicAnchor: """ name: str - resource: Resource[Schema] + resource: SchemaResource def resolve(self, resolver: _Resolver[Schema]) -> _Resolved[Schema]: """