From 0713c85eab2bf66d43170af243f19a0e4e8cc47600bcea7b651994664e505bb1 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 11 Dec 2023 05:37:10 +0000 Subject: [PATCH] - Update to 0.5.1: * Setup for handling anyOf simplifying to oneOf on import. - Add patch use-specification-obj.patch: * Stop passing string schemas, convert it to a Specification object OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-jsonschema-objects?expand=0&rev=15 --- python-python-jsonschema-objects.changes | 8 ++++++++ python-python-jsonschema-objects.spec | 4 +++- python_jsonschema_objects-0.5.0.tar.gz | 3 --- python_jsonschema_objects-0.5.1.tar.gz | 3 +++ use-specification-obj.patch | 19 +++++++++++++++++++ 5 files changed, 33 insertions(+), 4 deletions(-) delete mode 100644 python_jsonschema_objects-0.5.0.tar.gz create mode 100644 python_jsonschema_objects-0.5.1.tar.gz create mode 100644 use-specification-obj.patch diff --git a/python-python-jsonschema-objects.changes b/python-python-jsonschema-objects.changes index f895304..003afc8 100644 --- a/python-python-jsonschema-objects.changes +++ b/python-python-jsonschema-objects.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Dec 11 05:31:28 UTC 2023 - Steve Kowalik + +- Update to 0.5.1: + * Setup for handling anyOf simplifying to oneOf on import. +- Add patch use-specification-obj.patch: + * Stop passing string schemas, convert it to a Specification object + ------------------------------------------------------------------- Wed Sep 20 02:46:59 UTC 2023 - Steve Kowalik diff --git a/python-python-jsonschema-objects.spec b/python-python-jsonschema-objects.spec index ba1758e..fcd378d 100644 --- a/python-python-jsonschema-objects.spec +++ b/python-python-jsonschema-objects.spec @@ -17,12 +17,14 @@ Name: python-python-jsonschema-objects -Version: 0.5.0 +Version: 0.5.1 Release: 0 Summary: An object wrapper for JSON Schema definitions License: MIT URL: https://python-jsonschema-objects.readthedocs.org/ Source: https://files.pythonhosted.org/packages/source/p/python_jsonschema_objects/python_jsonschema_objects-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Use Specification object instead of strings +Patch0: use-specification-obj.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} diff --git a/python_jsonschema_objects-0.5.0.tar.gz b/python_jsonschema_objects-0.5.0.tar.gz deleted file mode 100644 index 5d6189c..0000000 --- a/python_jsonschema_objects-0.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fa9519036ae50eecd965085f77154faf67afe18651fb94ab176a46afd3faf1a7 -size 68781 diff --git a/python_jsonschema_objects-0.5.1.tar.gz b/python_jsonschema_objects-0.5.1.tar.gz new file mode 100644 index 0000000..af7ea83 --- /dev/null +++ b/python_jsonschema_objects-0.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7333d3b3eca6dc9c5cb1901dadeaffda8d78ba15aca5f4b89d3207142e155567 +size 69477 diff --git a/use-specification-obj.patch b/use-specification-obj.patch new file mode 100644 index 0000000..7273e36 --- /dev/null +++ b/use-specification-obj.patch @@ -0,0 +1,19 @@ +Index: python_jsonschema_objects-0.5.1/python_jsonschema_objects/__init__.py +=================================================================== +--- python_jsonschema_objects-0.5.1.orig/python_jsonschema_objects/__init__.py ++++ python_jsonschema_objects-0.5.1/python_jsonschema_objects/__init__.py +@@ -125,10 +125,13 @@ class ObjectBuilder(object): + DeprecationWarning, + ) + for uri, contents in resolved.items(): ++ schema = specification_uri or self.schema["$schema"] ++ if isinstance(schema, str): ++ schema = referencing.jsonschema.specification_with(schema) + self.registry = self.registry.with_resource( + "memory:" + uri, + referencing.Resource.from_contents( +- contents, specification_uri or self.schema["$schema"] ++ contents, schema + ), + ) +