File hyperkitty-fix-mistune-2.0-imports.patch of Package python-HyperKitty

From 2c3c189c9aacef3f54de2ae0f653aa13c6167093 Mon Sep 17 00:00:00 2001
From: David Runge <dave@sleepmap.de>
Date: Sun, 5 Dec 2021 12:39:01 +0100
Subject: [PATCH 1/3] Fix mistune imports for mistune >= 2.0.0

hyperkitty/lib/renderer.py:
With mistune 2.0.0 the `escape_url()` and `escape_html()` are moved to
mistune.util.
---
 hyperkitty/lib/renderer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperkitty/lib/renderer.py b/hyperkitty/lib/renderer.py
index cf54e7c0..96f026db 100644
--- a/hyperkitty/lib/renderer.py
+++ b/hyperkitty/lib/renderer.py
@@ -4,7 +4,7 @@ from django.conf import settings
 
 import mistune
 from mistune.plugins.extra import plugin_url
-from mistune.scanner import escape_html, escape_url
+from mistune.util import escape_html, escape_url
 
 
 class MyRenderer(mistune.HTMLRenderer):
-- 
GitLab


From 0807a57860c57ebfe0542cc9d58fedf1ed5582d5 Mon Sep 17 00:00:00 2001
From: David Runge <dave@sleepmap.de>
Date: Sun, 5 Dec 2021 12:40:10 +0100
Subject: [PATCH 2/3] Require mistune >= 2.0.0

setup.py:
Require mistune >= 2.0.0 to rely on a stable mistune release.
---
 setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 6cc7636e..c16294b0 100755
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@ REQUIRES = [
     "pytz>=2012",
     "django-compressor>=1.3",
     "mailmanclient>=3.3.3",
-    "mistune>=2.0.0rc1",
+    "mistune>=2.0.0",
     "python-dateutil >= 2.0",
     "networkx>=2.0",
     "django-haystack>=2.8.0",
-- 
GitLab
openSUSE Build Service is sponsored by