Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-python-jsonschema-objects for 
openSUSE:Factory checked in at 2022-08-27 13:21:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-jsonschema-objects (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-jsonschema-objects.new.2083 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-jsonschema-objects"

Sat Aug 27 13:21:21 2022 rev:5 rq:999544 version:0.4.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-python-jsonschema-objects/python-python-jsonschema-objects.changes
        2022-07-08 14:03:07.130530673 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-jsonschema-objects.new.2083/python-python-jsonschema-objects.changes
      2022-08-27 13:21:22.465718293 +0200
@@ -1,0 +2,6 @@
+Fri Aug 26 17:24:20 UTC 2022 - Ben Greiner <c...@bnavigator.de>
+
+- Add pso-markdown-version.patch
+  * gh#cwacek/python-jsonschema-objects#230
+
+-------------------------------------------------------------------

New:
----
  pso-markdown-version.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-jsonschema-objects.spec ++++++
--- /var/tmp/diff_new_pack.IZBsH1/_old  2022-08-27 13:21:22.909719250 +0200
+++ /var/tmp/diff_new_pack.IZBsH1/_new  2022-08-27 13:21:22.913719258 +0200
@@ -26,6 +26,8 @@
 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
@@ -48,7 +50,7 @@
 An object wrapper for JSON Schema definitions
 
 %prep
-%setup -q -n python_jsonschema_objects-%{version}
+%autosetup -p1 -n python_jsonschema_objects-%{version}
 
 %build
 %python_build

++++++ pso-markdown-version.patch ++++++
>From c38ada49dcbbf55789dcbcb3cd656640585322ee Mon Sep 17 00:00:00 2001
From: Ben Greiner <c...@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
             )

Reply via email to