Accepting request 1132394 from devel:languages:python

- 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/request/show/1132394
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-jsonschema-objects?expand=0&rev=8
This commit is contained in:
2023-12-11 20:51:05 +00:00
committed by Git OBS Bridge
5 changed files with 33 additions and 4 deletions

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Dec 11 05:31:28 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- 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 <steven.kowalik@suse.com> Wed Sep 20 02:46:59 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -17,12 +17,14 @@
Name: python-python-jsonschema-objects Name: python-python-jsonschema-objects
Version: 0.5.0 Version: 0.5.1
Release: 0 Release: 0
Summary: An object wrapper for JSON Schema definitions Summary: An object wrapper for JSON Schema definitions
License: MIT License: MIT
URL: https://python-jsonschema-objects.readthedocs.org/ URL: https://python-jsonschema-objects.readthedocs.org/
Source: https://files.pythonhosted.org/packages/source/p/python_jsonschema_objects/python_jsonschema_objects-%{version}.tar.gz 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 base >= 3.8}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fa9519036ae50eecd965085f77154faf67afe18651fb94ab176a46afd3faf1a7
size 68781

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7333d3b3eca6dc9c5cb1901dadeaffda8d78ba15aca5f4b89d3207142e155567
size 69477

View File

@@ -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
),
)