forked from pool/python-python-jsonschema-objects
Accepting request 1099288 from devel:languages:python
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/1099288 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-jsonschema-objects?expand=0&rev=6
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
From c38ada49dcbbf55789dcbcb3cd656640585322ee Mon Sep 17 00:00:00 2001
|
||||
From: Ben Greiner <code@bnavigator.de>
|
||||
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
|
||||
)
|
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 11 13:18:57 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- 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 <code@bnavigator.de>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1d01286ad6f39c6e2b9df4f61a4260e65a7c61cce8394ee03412ecc0d47ef623
|
||||
size 63076
|
3
python_jsonschema_objects-0.4.2.tar.gz
Normal file
3
python_jsonschema_objects-0.4.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7211b6ee73bf8dd351dd5b08c08387ca084659f308b241fbb80a3ed5beb784f0
|
||||
size 63632
|
Reference in New Issue
Block a user