Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-referencing for openSUSE:Factory checked in at 2023-04-13 14:49:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-referencing (Old) and /work/SRC/openSUSE:Factory/.python-referencing.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-referencing" Thu Apr 13 14:49:36 2023 rev:3 rq:1079115 version:0.27.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-referencing/python-referencing.changes 2023-04-04 21:26:30.783268204 +0200 +++ /work/SRC/openSUSE:Factory/.python-referencing.new.19717/python-referencing.changes 2023-04-13 14:49:37.537662370 +0200 @@ -1,0 +2,11 @@ +Thu Apr 13 10:18:46 UTC 2023 - ka...@b1-systems.de + +- Update to version 0.27.1: + * Add a note to the changelog. + * Enable the type annotation linter. + * Slight improvements to a few more docstrings. + * Update requirements. + * Bump suite from `5f47bda` to `e8927d9` + * [pre-commit.ci] pre-commit autoupdate + +------------------------------------------------------------------- Old: ---- referencing-0.27.0.tar.gz New: ---- referencing-0.27.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-referencing.spec ++++++ --- /var/tmp/diff_new_pack.MqNOMT/_old 2023-04-13 14:49:38.177666007 +0200 +++ /var/tmp/diff_new_pack.MqNOMT/_new 2023-04-13 14:49:38.185666052 +0200 @@ -25,7 +25,7 @@ %bcond_with test %endif Name: python-referencing%{psuffix} -Version: 0.27.0 +Version: 0.27.1 Release: 0 Summary: JSON Referencing + Python License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.MqNOMT/_old 2023-04-13 14:49:38.229666302 +0200 +++ /var/tmp/diff_new_pack.MqNOMT/_new 2023-04-13 14:49:38.233666325 +0200 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="disabled"> <param name="url">https://github.com/python-jsonschema/referencing</param> <param name="scm">git</param> - <param name="revision">v0.27.0</param> + <param name="revision">v0.27.1</param> <param name="versionformat">@PARENT_TAG@</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.MqNOMT/_old 2023-04-13 14:49:38.249666416 +0200 +++ /var/tmp/diff_new_pack.MqNOMT/_new 2023-04-13 14:49:38.253666438 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/python-jsonschema/referencing</param> - <param name="changesrevision">f520b40800233e34f8f5c3ac7100af4501fe54d7</param></service></servicedata> + <param name="changesrevision">3095b764d0d1d81517a39e15c4ec850d92f10152</param></service></servicedata> (No newline at EOF) ++++++ referencing-0.27.0.tar.gz -> referencing-0.27.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/FETCH_HEAD new/referencing-0.27.1/.git/FETCH_HEAD --- old/referencing-0.27.0/.git/FETCH_HEAD 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.git/FETCH_HEAD 2023-04-10 15:23:46.000000000 +0200 @@ -1,3 +1,2 @@ -b3e1f8d8eb0683e3663d1fbdd8b68bf9cd2a366f not-for-merge branch 'dependabot/submodules/suite-e8927d9' of https://github.com/python-jsonschema/referencing -2c8d87e0ffc889b4ca14e86c0cb7cc7b8662bd91 not-for-merge branch 'main' of https://github.com/python-jsonschema/referencing +90e977ca73cb9adc39d1d1b81b13825136292864 not-for-merge branch 'main' of https://github.com/python-jsonschema/referencing 29f587735daddcf3fde3318382227e6d1f561e6a not-for-merge branch 'retrieval' of https://github.com/python-jsonschema/referencing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/HEAD new/referencing-0.27.1/.git/HEAD --- old/referencing-0.27.0/.git/HEAD 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.git/HEAD 2023-04-10 15:23:46.000000000 +0200 @@ -1 +1 @@ -f520b40800233e34f8f5c3ac7100af4501fe54d7 +3095b764d0d1d81517a39e15c4ec850d92f10152 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/ORIG_HEAD new/referencing-0.27.1/.git/ORIG_HEAD --- old/referencing-0.27.0/.git/ORIG_HEAD 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.git/ORIG_HEAD 2023-04-10 15:23:46.000000000 +0200 @@ -1 +1 @@ -647f6fe178960849ed707bcf466b2d7c0cfb601f +a57bf4188f67f3300dbea463985390410b13d2be Binary files old/referencing-0.27.0/.git/index and new/referencing-0.27.1/.git/index differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/logs/HEAD new/referencing-0.27.1/.git/logs/HEAD --- old/referencing-0.27.0/.git/logs/HEAD 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.git/logs/HEAD 2023-04-10 15:23:46.000000000 +0200 @@ -12,3 +12,5 @@ 03f3dfbdd37f8cfc59481a452425681324328de9 e254e08b39550f04be4622e3c90cc9ec1fd3a28c Johannes Kastl <ka...@b1-systems.de> 1679979926 +0200 reset: moving to v0.26.4 e254e08b39550f04be4622e3c90cc9ec1fd3a28c 647f6fe178960849ed707bcf466b2d7c0cfb601f Johannes Kastl <ka...@b1-systems.de> 1680588969 +0200 merge v0.27.0: Merge made by the 'ort' strategy. 647f6fe178960849ed707bcf466b2d7c0cfb601f f520b40800233e34f8f5c3ac7100af4501fe54d7 Johannes Kastl <ka...@b1-systems.de> 1680588969 +0200 reset: moving to v0.27.0 +f520b40800233e34f8f5c3ac7100af4501fe54d7 a57bf4188f67f3300dbea463985390410b13d2be Johannes Kastl <ka...@b1-systems.de> 1681381125 +0200 merge v0.27.1: Merge made by the 'ort' strategy. +a57bf4188f67f3300dbea463985390410b13d2be 3095b764d0d1d81517a39e15c4ec850d92f10152 Johannes Kastl <ka...@b1-systems.de> 1681381125 +0200 reset: moving to v0.27.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/logs/refs/remotes/origin/main new/referencing-0.27.1/.git/logs/refs/remotes/origin/main --- old/referencing-0.27.0/.git/logs/refs/remotes/origin/main 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.git/logs/refs/remotes/origin/main 2023-04-10 15:23:46.000000000 +0200 @@ -2,3 +2,4 @@ a4a9318afd28a9a0977d0e044db3620adb690c48 839667eeb834832a32dabff2c8ed255a4bec6807 Johannes Kastl <ka...@b1-systems.de> 1679893408 +0200 fetch --filter=tree:0 --tags: fast-forward 839667eeb834832a32dabff2c8ed255a4bec6807 c9de6c2947235171e2a270e9cd0dbac569d4dee6 Johannes Kastl <ka...@b1-systems.de> 1679979491 +0200 fetch --filter=tree:0 --tags: fast-forward c9de6c2947235171e2a270e9cd0dbac569d4dee6 2c8d87e0ffc889b4ca14e86c0cb7cc7b8662bd91 Johannes Kastl <ka...@b1-systems.de> 1680588966 +0200 fetch --filter=tree:0 --tags: fast-forward +2c8d87e0ffc889b4ca14e86c0cb7cc7b8662bd91 90e977ca73cb9adc39d1d1b81b13825136292864 Johannes Kastl <ka...@b1-systems.de> 1681381121 +0200 fetch --filter=tree:0 --tags: fast-forward diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/modules/suite/HEAD new/referencing-0.27.1/.git/modules/suite/HEAD --- old/referencing-0.27.0/.git/modules/suite/HEAD 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.git/modules/suite/HEAD 2023-04-10 15:23:46.000000000 +0200 @@ -1 +1 @@ -5f47bda1e7be4a7ff1b16cf5a988d8536e0bb34d +27518455b0a5f4c3f184d6bab789350c30085e7d Binary files old/referencing-0.27.0/.git/modules/suite/index and new/referencing-0.27.1/.git/modules/suite/index differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/modules/suite/logs/HEAD new/referencing-0.27.1/.git/modules/suite/logs/HEAD --- old/referencing-0.27.0/.git/modules/suite/logs/HEAD 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.git/modules/suite/logs/HEAD 2023-04-10 15:23:46.000000000 +0200 @@ -1,3 +1,4 @@ 0000000000000000000000000000000000000000 27518455b0a5f4c3f184d6bab789350c30085e7d Johannes Kastl <ka...@b1-systems.de> 1679747213 +0100 clone: from https://github.com/python-jsonschema/referencing-suite 27518455b0a5f4c3f184d6bab789350c30085e7d 27518455b0a5f4c3f184d6bab789350c30085e7d Johannes Kastl <ka...@b1-systems.de> 1679747213 +0100 checkout: moving from main to 27518455b0a5f4c3f184d6bab789350c30085e7d 27518455b0a5f4c3f184d6bab789350c30085e7d 5f47bda1e7be4a7ff1b16cf5a988d8536e0bb34d Johannes Kastl <ka...@b1-systems.de> 1680588969 +0200 checkout: moving from 27518455b0a5f4c3f184d6bab789350c30085e7d to 5f47bda1e7be4a7ff1b16cf5a988d8536e0bb34d +5f47bda1e7be4a7ff1b16cf5a988d8536e0bb34d 27518455b0a5f4c3f184d6bab789350c30085e7d Johannes Kastl <ka...@b1-systems.de> 1681381126 +0200 checkout: moving from 5f47bda1e7be4a7ff1b16cf5a988d8536e0bb34d to 27518455b0a5f4c3f184d6bab789350c30085e7d Binary files old/referencing-0.27.0/.git/objects/a5/7bf4188f67f3300dbea463985390410b13d2be and new/referencing-0.27.1/.git/objects/a5/7bf4188f67f3300dbea463985390410b13d2be differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-139e168af74183abe443267a1a581c034e685971.idx and new/referencing-0.27.1/.git/objects/pack/pack-139e168af74183abe443267a1a581c034e685971.idx differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-139e168af74183abe443267a1a581c034e685971.pack and new/referencing-0.27.1/.git/objects/pack/pack-139e168af74183abe443267a1a581c034e685971.pack differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-428f44062d42b67cd8bd911d188e915ff223dca4.idx and new/referencing-0.27.1/.git/objects/pack/pack-428f44062d42b67cd8bd911d188e915ff223dca4.idx differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-428f44062d42b67cd8bd911d188e915ff223dca4.pack and new/referencing-0.27.1/.git/objects/pack/pack-428f44062d42b67cd8bd911d188e915ff223dca4.pack differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-64b707aecd5ca60dfeac14352d5f501595c0bd5f.idx and new/referencing-0.27.1/.git/objects/pack/pack-64b707aecd5ca60dfeac14352d5f501595c0bd5f.idx differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-64b707aecd5ca60dfeac14352d5f501595c0bd5f.pack and new/referencing-0.27.1/.git/objects/pack/pack-64b707aecd5ca60dfeac14352d5f501595c0bd5f.pack differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-91de5a4e807f32da0b2509f17ef002b5bfd05154.idx and new/referencing-0.27.1/.git/objects/pack/pack-91de5a4e807f32da0b2509f17ef002b5bfd05154.idx differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-91de5a4e807f32da0b2509f17ef002b5bfd05154.pack and new/referencing-0.27.1/.git/objects/pack/pack-91de5a4e807f32da0b2509f17ef002b5bfd05154.pack differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-aee5664c34d9ab62e9c46f60b9ae55906affc704.idx and new/referencing-0.27.1/.git/objects/pack/pack-aee5664c34d9ab62e9c46f60b9ae55906affc704.idx differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-aee5664c34d9ab62e9c46f60b9ae55906affc704.pack and new/referencing-0.27.1/.git/objects/pack/pack-aee5664c34d9ab62e9c46f60b9ae55906affc704.pack differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-b46b922ead5bf1f2bab49cc98ebdb21e8a74c2b2.idx and new/referencing-0.27.1/.git/objects/pack/pack-b46b922ead5bf1f2bab49cc98ebdb21e8a74c2b2.idx differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-b46b922ead5bf1f2bab49cc98ebdb21e8a74c2b2.pack and new/referencing-0.27.1/.git/objects/pack/pack-b46b922ead5bf1f2bab49cc98ebdb21e8a74c2b2.pack differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-d780e898279c12acb29095c297e4c41c4ee8e103.idx and new/referencing-0.27.1/.git/objects/pack/pack-d780e898279c12acb29095c297e4c41c4ee8e103.idx differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-d780e898279c12acb29095c297e4c41c4ee8e103.pack and new/referencing-0.27.1/.git/objects/pack/pack-d780e898279c12acb29095c297e4c41c4ee8e103.pack differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-f4015ec0cfc61245c672987a7430940fc9c1ff9a.idx and new/referencing-0.27.1/.git/objects/pack/pack-f4015ec0cfc61245c672987a7430940fc9c1ff9a.idx differ Binary files old/referencing-0.27.0/.git/objects/pack/pack-f4015ec0cfc61245c672987a7430940fc9c1ff9a.pack and new/referencing-0.27.1/.git/objects/pack/pack-f4015ec0cfc61245c672987a7430940fc9c1ff9a.pack differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/refs/remotes/origin/main new/referencing-0.27.1/.git/refs/remotes/origin/main --- old/referencing-0.27.0/.git/refs/remotes/origin/main 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.git/refs/remotes/origin/main 2023-04-10 15:23:46.000000000 +0200 @@ -1 +1 @@ -2c8d87e0ffc889b4ca14e86c0cb7cc7b8662bd91 +90e977ca73cb9adc39d1d1b81b13825136292864 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.git/refs/tags/v0.27.1 new/referencing-0.27.1/.git/refs/tags/v0.27.1 --- old/referencing-0.27.0/.git/refs/tags/v0.27.1 1970-01-01 01:00:00.000000000 +0100 +++ new/referencing-0.27.1/.git/refs/tags/v0.27.1 2023-04-10 15:23:46.000000000 +0200 @@ -0,0 +1 @@ +6cebce72931f22e0c9935718727c76e934db630c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/.pre-commit-config.yaml new/referencing-0.27.1/.pre-commit-config.yaml --- old/referencing-0.27.0/.pre-commit-config.yaml 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/.pre-commit-config.yaml 2023-04-10 15:23:46.000000000 +0200 @@ -13,7 +13,7 @@ args: [--fix, lf] - id: trailing-whitespace - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.259" + rev: "v0.0.260" hooks: - id: ruff - repo: https://github.com/PyCQA/isort @@ -21,7 +21,7 @@ hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - name: black id: black diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/docs/api.rst new/referencing-0.27.1/docs/api.rst --- old/referencing-0.27.0/docs/api.rst 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/docs/api.rst 2023-04-10 15:23:46.000000000 +0200 @@ -13,6 +13,14 @@ :undoc-members: +.. autoclass:: referencing._core.Retrieved + :members: + :undoc-members: + + +.. autoclass:: referencing._core.T + + .. autoclass:: referencing._core.Resolver :members: :undoc-members: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/docs/changes.rst new/referencing-0.27.1/docs/changes.rst --- old/referencing-0.27.0/docs/changes.rst 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/docs/changes.rst 2023-04-10 15:23:46.000000000 +0200 @@ -2,6 +2,12 @@ Changelog ========= +v0.27.1 +------- + +* Improve a small number of docstrings. + + v0.27.0 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/docs/requirements.txt new/referencing-0.27.1/docs/requirements.txt --- old/referencing-0.27.0/docs/requirements.txt 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/docs/requirements.txt 2023-04-10 15:23:46.000000000 +0200 @@ -10,7 +10,7 @@ # via referencing babel==2.12.1 # via sphinx -beautifulsoup4==4.12.0 +beautifulsoup4==4.12.2 # via furo certifi==2022.12.7 # via requests @@ -26,9 +26,9 @@ # via # sphinx # sphinx-click -fonttools==4.39.2 +fonttools==4.39.3 # via matplotlib -furo==2022.12.7 +furo==2023.3.27 # via -r docs/requirements.in idna==3.4 # via @@ -56,11 +56,11 @@ # via # matplotlib # sphinx -pillow==9.4.0 +pillow==9.5.0 # via matplotlib pyenchant==3.2.2 # via sphinxcontrib-spelling -pygments==2.14.0 +pygments==2.15.0 # via # furo # pygments-github-lexers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/docs/spelling-wordlist.txt new/referencing-0.27.1/docs/spelling-wordlist.txt --- old/referencing-0.27.0/docs/spelling-wordlist.txt 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/docs/spelling-wordlist.txt 2023-04-10 15:23:46.000000000 +0200 @@ -6,9 +6,11 @@ dereferenced deserialized discoverability +docstrings filesystem instantiable instantiation +iterable metaschemas referenceable resolvers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/pyproject.toml new/referencing-0.27.1/pyproject.toml --- old/referencing-0.27.0/pyproject.toml 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/pyproject.toml 2023-04-10 15:23:46.000000000 +0200 @@ -70,8 +70,15 @@ [tool.ruff] line-length = 79 target-version = "py38" -select = ["B", "D", "E", "F", "Q", "UP", "W"] +select = ["ANN", "B", "D", "E", "F", "Q", "UP", "W"] ignore = [ + # Wat, type annotations for self and cls, why is this a thing? + "ANN101", + "ANN102", + # Private annotations are fine to leave out. + "ANN202", + # I don't know how to more properly annotate "pass along all arguments". + "ANN401", # raise SomeException(...) is fine. "B904", # It's fine to not have docstrings for magic methods. @@ -97,9 +104,9 @@ docstring-quotes = "double" [tool.ruff.per-file-ignores] -"docs/*" = ["D"] -"referencing/tests/*" = ["D"] -"noxfile.py" = ["D"] +"docs/*" = ["ANN", "D"] +"referencing/tests/*" = ["ANN", "D"] +"noxfile.py" = ["ANN", "D"] [tool.ruff.pyupgrade] # We support 3.8 + 3.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/referencing/_core.py new/referencing-0.27.1/referencing/_core.py --- old/referencing-0.27.0/referencing/_core.py 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/referencing/_core.py 2023-04-10 15:23:46.000000000 +0200 @@ -58,7 +58,7 @@ #: nor internal identifiers. OPAQUE: ClassVar[Specification[Any]] - def __repr__(self): + def __repr__(self) -> str: return f"<Specification name={self.name!r}>" def anchors_in(self, contents: D): @@ -238,7 +238,7 @@ def __getitem__(self, uri: URI) -> Resource[D]: """ - Return the `Resource` identified by the given URI. + Return the (already crawled) `Resource` identified by the given URI. """ try: return self._resources[uri] @@ -247,7 +247,7 @@ def __iter__(self) -> Iterator[URI]: """ - Iterate over all fully crawled URIs in the registry. + Iterate over all crawled URIs in the registry. """ return iter(self._resources) @@ -257,14 +257,17 @@ """ return len(self._resources) - def __rmatmul__(self, new: Resource[D] | Iterable[Resource[D]]): + def __rmatmul__( + self, + new: Resource[D] | Iterable[Resource[D]], + ) -> Registry[D]: """ - Add resource(s) to a new registry, using their internal IDs. + Create a new registry with resource(s) added using their internal IDs. - Resources must have a internal IDs (e.g. the ``$id`` keyword in modern - JSON Schema versions), otherwise an error will be raised. + Resources must have a internal IDs (e.g. the :kw:`$id` keyword in + modern JSON Schema versions), otherwise an error will be raised. - Use this via: + Both a single resource as well as an iterable of resources works, i.e.: * ``resource @ registry`` or @@ -278,6 +281,12 @@ registry.with_resources( (resource.id(), resource) for resource in new_resources ) + + Raises: + + `NoInternalID` + + if the resource(s) in fact do not have IDs """ if isinstance(new, Resource): new = (new,) @@ -305,9 +314,13 @@ summary = f"{pluralized}" return f"<Registry ({size} {summary})>" - def get_or_retrieve(self, uri: URI): + def get_or_retrieve(self, uri: URI) -> Retrieved[D, Resource[D]]: """ Get a resource from the registry, crawling or retrieving if necessary. + + May involve crawling to find the given URI if it is not already known, + so the returned object is a `Retrieved` object which contains both the + resource value as well as the registry which ultimately contained it. """ resource = self._resources.get(uri) if resource is not None: @@ -375,7 +388,7 @@ def contents(self, uri: URI) -> D: """ - Retrieve the contents identified by the given URI. + Retrieve the (already crawled) contents identified by the given URI. """ # Empty fragment URIs are equivalent to URIs without the fragment. # TODO: Is this true for non JSON Schema resources? Probably not. @@ -383,7 +396,7 @@ def crawl(self) -> Registry[D]: """ - Immediately crawl all added resources, discovering subresources. + Crawl all added resources, discovering subresources. """ resources = self._resources anchors = self._anchors @@ -488,6 +501,7 @@ ) +#: An anchor or resource. T = TypeVar("T", AnchorType[Any], Resource[Any]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/referencing/exceptions.py new/referencing-0.27.1/referencing/exceptions.py --- old/referencing-0.27.0/referencing/exceptions.py 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/referencing/exceptions.py 2023-04-10 15:23:46.000000000 +0200 @@ -93,7 +93,7 @@ resource: Resource[Any] - def __str__(self): + def __str__(self) -> str: msg = f"{self.ref!r} does not exist within {self.resource.contents!r}" if self.ref == "/": msg += ( @@ -113,7 +113,7 @@ resource: Resource[Any] anchor: str - def __str__(self): + def __str__(self) -> str: return ( f"{self.anchor!r} does not exist within {self.resource.contents!r}" ) @@ -130,7 +130,7 @@ resource: Resource[Any] anchor: str - def __str__(self): + def __str__(self) -> str: return ( f"'#{self.anchor}' is not a valid anchor, neither as a " "plain name anchor nor as a JSON Pointer. You may have intended " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/referencing/jsonschema.py new/referencing-0.27.1/referencing/jsonschema.py --- old/referencing-0.27.0/referencing/jsonschema.py 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/referencing/jsonschema.py 2023-04-10 15:23:46.000000000 +0200 @@ -586,7 +586,7 @@ name: str resource: Resource[Schema] - def resolve(self, resolver: _Resolver[Schema]): + def resolve(self, resolver: _Resolver[Schema]) -> _Resolved[Schema]: """ Resolve this anchor dynamically. """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "id": "http://example.org/internal", - "definitions": { - "foo": { - "id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "id": "#foo", - "foo": "bar" - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "id": "http://example.org/foo", - "definitions": { - "bar": { - "id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "id": "http://example.org/foo", - "definitions": { "bar": { "id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "id": "http://example.org/foo", - "definitions": { "bar": { "id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "id": "#baz", "quux": "eggs" } - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.org/internal", - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "http://example.org/foo", - "definitions": { - "bar": { - "$id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "$id": "http://example.org/foo", - "definitions": { "bar": { "$id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "$id": "http://example.org/foo", - "definitions": { "bar": { "$id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.org/internal", - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "http://example.org/foo", - "definitions": { - "bar": { - "$id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "$id": "http://example.org/foo", - "definitions": { "bar": { "$id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "$id": "http://example.org/foo", - "definitions": { "bar": { "$id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.org/internal", - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "http://example.org/foo", - "$defs": { - "bar": { - "$anchor": "baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/$defs/foo", - "target": { - "$id": "http://example.org/foo", - "$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/$defs/foo", - "target": { - "$id": "http://example.org/foo", - "$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.org/internal", - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-different-id-anchor.json new/referencing-0.27.1/suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-different-id-anchor.json --- old/referencing-0.27.0/suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-different-id-anchor.json 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "http://example.org/foo", - "$defs": { - "bar": { - "$anchor": "baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/$defs/foo", - "target": { - "$id": "http://example.org/foo", - "$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/$defs/foo", - "target": { - "$id": "http://example.org/foo", - "$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - } - ] -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/referencing-0.27.0/test-requirements.txt new/referencing-0.27.1/test-requirements.txt --- old/referencing-0.27.0/test-requirements.txt 2023-04-03 20:24:24.000000000 +0200 +++ new/referencing-0.27.1/test-requirements.txt 2023-04-10 15:23:46.000000000 +0200 @@ -6,7 +6,6 @@ # attrs==22.2.0 # via - # pytest # pytest-subtests # referencing iniconfig==2.0.0 @@ -15,7 +14,7 @@ # via pytest pluggy==1.0.0 # via pytest -pytest==7.2.2 +pytest==7.3.0 # via # -r test-requirements.in # pytest-subtests