From 5fec6e7e3248af4ba8969f8816677290ffc89cf27012ab44f9d153f0d3661b2a Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 12 Jul 2023 08:26:48 +0000 Subject: [PATCH] Accepting request 1098183 from home:mcalabkova:branches:devel:languages:python - Update to 0.4.2 * Handle removed markdown version_info * fix nested oneOf resolution with different schema types - Drop merged pso-markdown-version.patch - Pin jsonschema version to < 4.18, not supported yet OBS-URL: https://build.opensuse.org/request/show/1098183 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-jsonschema-objects?expand=0&rev=11 --- pso-markdown-version.patch | 50 ------------------------ python-python-jsonschema-objects.changes | 9 +++++ python-python-jsonschema-objects.spec | 14 +++---- python_jsonschema_objects-0.4.1.tar.gz | 3 -- python_jsonschema_objects-0.4.2.tar.gz | 3 ++ 5 files changed, 17 insertions(+), 62 deletions(-) delete mode 100644 pso-markdown-version.patch delete mode 100644 python_jsonschema_objects-0.4.1.tar.gz create mode 100644 python_jsonschema_objects-0.4.2.tar.gz diff --git a/pso-markdown-version.patch b/pso-markdown-version.patch deleted file mode 100644 index ed8858b..0000000 --- a/pso-markdown-version.patch +++ /dev/null @@ -1,50 +0,0 @@ -From c38ada49dcbbf55789dcbcb3cd656640585322ee Mon Sep 17 00:00:00 2001 -From: Ben Greiner -Date: Fri, 26 Aug 2022 19:17:37 +0200 -Subject: [PATCH] Handle deprecated markdown version_info - ---- - python_jsonschema_objects/markdown_support.py | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/python_jsonschema_objects/markdown_support.py b/python_jsonschema_objects/markdown_support.py -index bb2ea1b..235fdc0 100644 ---- a/python_jsonschema_objects/markdown_support.py -+++ b/python_jsonschema_objects/markdown_support.py -@@ -4,6 +4,11 @@ - import re - import json - -+try: -+ from markdown import __version_info__ as markdown_version_info -+except ImportError: -+ from markdown import version_info as markdown_version_info -+ - - def extract_code_blocks(filename): - with open(filename) as fin: -@@ -14,14 +19,9 @@ def extract_code_blocks(filename): - preprocessors = M.preprocessors - tree_processors = M.treeprocessors - -- try: -- version_info = markdown.__version_info__ -- except AttributeError: -- version_info = markdown.version_info -- - # Markdown 3.* stores the processors in a class that can be iterated directly. - # Markdown 2.* stores them in a dict, so we have to pull out the values. -- if version_info[0] == 2: -+ if markdown_version_info[0] == 2: - # Note: `markdown.version_info` will be deprecated in favor of - # `markdown.__version_info__` in later versions of Markdown. - preprocessors = preprocessors.values() -@@ -45,7 +45,7 @@ def extendMarkdown(self, md, md_globals=None): - """ Add FencedBlockPreprocessor to the Markdown instance. """ - md.registerExtension(self) - -- if markdown.version_info[0] >= 3: -+ if markdown_version_info[0] >= 3: - md.preprocessors.register( - SpecialFencePreprocessor(md), "fenced_code_block", 10 - ) diff --git a/python-python-jsonschema-objects.changes b/python-python-jsonschema-objects.changes index 3a22e43..faa4693 100644 --- a/python-python-jsonschema-objects.changes +++ b/python-python-jsonschema-objects.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jul 11 13:18:57 UTC 2023 - Markéta Machová + +- Update to 0.4.2 + * Handle removed markdown version_info + * fix nested oneOf resolution with different schema types +- Drop merged pso-markdown-version.patch +- Pin jsonschema version to < 4.18, not supported yet + ------------------------------------------------------------------- Fri Aug 26 17:24:20 UTC 2022 - Ben Greiner diff --git a/python-python-jsonschema-objects.spec b/python-python-jsonschema-objects.spec index 4d0cddf..9376f5f 100644 --- a/python-python-jsonschema-objects.spec +++ b/python-python-jsonschema-objects.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-jsonschema-objects # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,29 +17,25 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -# python2-Markdown missing -%define skip_python2 1 Name: python-python-jsonschema-objects -Version: 0.4.1 +Version: 0.4.2 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-UPSTREAM pso-markdown-version.patch gh#cwacek/python-jsonschema-objects#230 -Patch0: pso-markdown-version.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-Markdown >= 2.4 Requires: python-inflection >= 0.2 -Requires: python-jsonschema >= 2.3 Requires: python-six >= 1.5.2 +Requires: (python-jsonschema >= 2.3 with python-jsonschema < 4.18) BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module Markdown >= 2.4} BuildRequires: %{python_module inflection >= 0.2} -BuildRequires: %{python_module jsonschema >= 2.3} +BuildRequires: %{python_module jsonschema < 4.18} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module six >= 1.5.2} @@ -62,7 +58,7 @@ An object wrapper for JSON Schema definitions } %check -%pytest -k 'not test_validates' +%pytest %files %{python_files} %doc README.md diff --git a/python_jsonschema_objects-0.4.1.tar.gz b/python_jsonschema_objects-0.4.1.tar.gz deleted file mode 100644 index a917a62..0000000 --- a/python_jsonschema_objects-0.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d01286ad6f39c6e2b9df4f61a4260e65a7c61cce8394ee03412ecc0d47ef623 -size 63076 diff --git a/python_jsonschema_objects-0.4.2.tar.gz b/python_jsonschema_objects-0.4.2.tar.gz new file mode 100644 index 0000000..4de3518 --- /dev/null +++ b/python_jsonschema_objects-0.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7211b6ee73bf8dd351dd5b08c08387ca084659f308b241fbb80a3ed5beb784f0 +size 63632