From 98fdf7a0e5599821c59accacca4b9e55bd4cef25901cb19d4e90c9c4878c7c10 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 8 Dec 2025 04:08:48 +0000 Subject: [PATCH] - Update to 1.19.2: * allow building with Sphinx 9.0. - Drop patch support-docutils-0.22.patch, included upstream. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinx-jsonschema?expand=0&rev=15 --- .gitattributes | 23 +++++++++ .gitignore | 1 + python-sphinx-jsonschema.changes | 82 ++++++++++++++++++++++++++++++++ python-sphinx-jsonschema.spec | 70 +++++++++++++++++++++++++++ sphinx-jsonschema-1.19.1.tar.gz | 3 ++ sphinx-jsonschema-1.19.2.tar.gz | 3 ++ support-docutils-0.22.patch | 41 ++++++++++++++++ 7 files changed, 223 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-sphinx-jsonschema.changes create mode 100644 python-sphinx-jsonschema.spec create mode 100644 sphinx-jsonschema-1.19.1.tar.gz create mode 100644 sphinx-jsonschema-1.19.2.tar.gz create mode 100644 support-docutils-0.22.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-sphinx-jsonschema.changes b/python-sphinx-jsonschema.changes new file mode 100644 index 0000000..4d28989 --- /dev/null +++ b/python-sphinx-jsonschema.changes @@ -0,0 +1,82 @@ +------------------------------------------------------------------- +Mon Dec 8 04:07:47 UTC 2025 - Steve Kowalik + +- Update to 1.19.2: + * allow building with Sphinx 9.0. +- Drop patch support-docutils-0.22.patch, included upstream. + +------------------------------------------------------------------- +Fri Sep 19 02:35:43 UTC 2025 - Steve Kowalik + +- Add patch support-docutils-0.22.patch: + * Support docutils 0.22 changes. + +------------------------------------------------------------------- +Thu Jun 12 12:21:13 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Sun Jan 14 10:36:35 UTC 2024 - Dirk Müller + +- update to 1.19.1: + * load a schema from a Python dict or object (or actually any + Python entity with a ``__str__`` method.). + * with JSON Pointer the ``:pass_unmodified:`` option is included. + * fixed a bug escaping backspaces. + * ``:hide_key:`` directive option. + This option allows you to hide certain keys, specified by a JSON + Path specification, to be excluded from rendering. + * added the ``:encoding:`` directive option. + +------------------------------------------------------------------- +Mon Apr 19 09:24:26 UTC 2021 - Matthias Fehring + +- Update to 1.16.8: + * Improved rendering of string values + +------------------------------------------------------------------- +Tue Mar 16 21:13:34 UTC 2021 - Matthias Fehring + +- Update to 1.16.7: + * Fixed: Renders "null" default value as "None" +- Changes from 1.16.6: + * Bug fixes +- Changes from 1.16.5: + * Fixes auto reference without title +- Changes from 1.16.4: + * Introduces the :lift_title: directive option suggested by ankostis. + * Fixed a bug in rendering the items attribute of the array type +- Changes from 1.16.3: + * Fixed bugs rendering the default and examples keywords. +- Changes from 1.16.2: + * Introduced the configuration entry jsonschema_options setting + default values for the directive options introduced in 1.16. + The options now can accept a parameter to explicitly turn the + option on or off. +- Changes from 1.16.1: + * Bug fixes +- Changes from 1.16: + * WouterTuinstra reimplemented support for dependencies and properly + this time. He also improved error handling and reporting and added + a couple of options improving the handling of references. The most + important additions are the directive options :lift_description:, + :lift_definitions:, :auto_target: and :auto_reference:. In addition + to all that he also implemented support for the if, then and else + keywords. + +------------------------------------------------------------------- +Tue Jun 16 11:45:10 UTC 2020 - Tomáš Chvátal + +- Update to 1.15: + * Fixes for new sphinx releases + +------------------------------------------------------------------- +Tue Jun 16 11:43:37 UTC 2020 - Tomáš Chvátal + +- Format with spec-cleaner + +------------------------------------------------------------------- +Tue Sep 17 01:35:48 PM UTC 2019 - John Vandenberg + +- Initial spec for v1.10 diff --git a/python-sphinx-jsonschema.spec b/python-sphinx-jsonschema.spec new file mode 100644 index 0000000..485f0f4 --- /dev/null +++ b/python-sphinx-jsonschema.spec @@ -0,0 +1,70 @@ +# +# spec file for package python-sphinx-jsonschema +# +# Copyright (c) 2025 SUSE LLC and contributors +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-sphinx-jsonschema +Version: 1.19.2 +Release: 0 +Summary: Sphinx extension to display JSON Schema +License: GPL-3.0-only +URL: https://github.com/lnoor/sphinx-jsonschema +# Tarballs from pypi.org are missing license files +Source: https://github.com/lnoor/sphinx-jsonschema/archive/refs/tags/v.%{version}.tar.gz#/sphinx-jsonschema-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-PyYAML +Requires: python-docutils +Requires: python-jsonpointer +Requires: python-requests +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module docutils} +BuildRequires: %{python_module jsonpointer} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} +# /SECTION +%python_subpackages + +%description +Sphinx extension to display JSON Schema. + +%prep +%autosetup -p1 -n sphinx-jsonschema-v.%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# The tests don't actually properly execute +# see upstream https://github.com/lnoor/sphinx-jsonschema/issues/56 +#%%pytest + +%files %{python_files} +%doc README.rst +%license LICENSE +%{python_sitelib}/sphinx[-_]jsonschema +%{python_sitelib}/sphinx[-_]jsonschema-%{version}.dist-info + +%changelog diff --git a/sphinx-jsonschema-1.19.1.tar.gz b/sphinx-jsonschema-1.19.1.tar.gz new file mode 100644 index 0000000..c956217 --- /dev/null +++ b/sphinx-jsonschema-1.19.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7224606c301a7e5088e2c5c01b2559e9bb6338935ce2cb840b024641b535b77a +size 40684 diff --git a/sphinx-jsonschema-1.19.2.tar.gz b/sphinx-jsonschema-1.19.2.tar.gz new file mode 100644 index 0000000..a51002c --- /dev/null +++ b/sphinx-jsonschema-1.19.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6501304887e7cece3139c2cffec9bcb41085a2d60bf02aba61a8fcaa98dcb3f1 +size 40982 diff --git a/support-docutils-0.22.patch b/support-docutils-0.22.patch new file mode 100644 index 0000000..d7d69bd --- /dev/null +++ b/support-docutils-0.22.patch @@ -0,0 +1,41 @@ +From d4acc575f2d2e5cb0055820758ad109548e1dd36 Mon Sep 17 00:00:00 2001 +From: Steve Kowalik +Date: Fri, 19 Sep 2025 12:33:13 +1000 +Subject: [PATCH] Remove use of SafeString + +docutils 0.22.1 removed the SafeString class, since it isn't required +with Python 3 any more. Replace both uses of it with plain str. +--- + sphinx-jsonschema/__init__.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/sphinx-jsonschema/__init__.py b/sphinx-jsonschema/__init__.py +index b6875ea..ae46daa 100644 +--- a/sphinx-jsonschema/__init__.py ++++ b/sphinx-jsonschema/__init__.py +@@ -27,7 +27,6 @@ + from docutils.parsers.rst import Directive, DirectiveError + from docutils.parsers.rst import directives + from docutils.utils import SystemMessagePropagation +-from docutils.utils.error_reporting import SafeString + from .wide_format import WideFormat, NOESC + + +@@ -243,7 +242,7 @@ def get_json_data(self): + except Exception as error: + error = self.state_machine.reporter.error( + '"%s" directive encountered a the following error while parsing the data.\n %s' +- % (self.name, SafeString("".join(format_exception_only(type(error), error)))), ++ % (self.name, str("".join(format_exception_only(type(error), error)))), + nodes.literal_block(schema, schema), line=self.lineno) + raise SystemMessagePropagation(error) + +@@ -253,7 +252,7 @@ def get_json_data(self): + except KeyError: + error = self.state_machine.reporter.error( + '"%s" directive encountered a KeyError when trying to resolve the pointer' +- ' in schema: %s' % (self.name, SafeString(pointer)), ++ ' in schema: %s' % (self.name, str(pointer)), + nodes.literal_block(schema, schema), line=self.lineno) + raise SystemMessagePropagation(error) +