[packages/python3-sphinx_panels] - added deprecated patch (fix DeprecationWarnings in docutils usage); release 2

qboosh qboosh at pld-linux.org
Sat Jan 7 19:50:42 CET 2023


commit 53531ac792c2e05c9916b464eec3c67391bb7b08
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jan 7 19:51:40 2023 +0100

    - added deprecated patch (fix DeprecationWarnings in docutils usage); release 2

 python3-sphinx_panels.spec     |  4 +++-
 sphinx_panels-deprecated.patch | 45 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)
---
diff --git a/python3-sphinx_panels.spec b/python3-sphinx_panels.spec
index c6fb6d3..6d9ecdd 100644
--- a/python3-sphinx_panels.spec
+++ b/python3-sphinx_panels.spec
@@ -2,12 +2,13 @@ Summary:	Sphinx extension for creating panels in a grid layout
 Summary(pl.UTF-8):	Rozszerzenie Sphinksa do tworzenia paneli w układzie siatkowym
 Name:		python3-sphinx_panels
 Version:	0.6.0
-Release:	1
+Release:	2
 License:	MIT
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/sphinx-panels/
 Source0:	https://files.pythonhosted.org/packages/source/s/sphinx-panels/sphinx-panels-%{version}.tar.gz
 # Source0-md5:	f2e926a14ad27d66d59fc329339d496e
+Patch0:		sphinx_panels-deprecated.patch
 URL:		https://pypi.org/project/sphinx-panels/
 BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	python3-setuptools
@@ -27,6 +28,7 @@ zoptymalizowanych pod kątem HTML+CSS.
 
 %prep
 %setup -q -n sphinx-panels-%{version}
+%patch0 -p1
 
 %build
 %py3_build
diff --git a/sphinx_panels-deprecated.patch b/sphinx_panels-deprecated.patch
new file mode 100644
index 0000000..81640da
--- /dev/null
+++ b/sphinx_panels-deprecated.patch
@@ -0,0 +1,45 @@
+--- sphinx-panels-0.6.0/sphinx_panels/panels.py.orig	2021-06-03 23:37:02.000000000 +0200
++++ sphinx-panels-0.6.0/sphinx_panels/panels.py	2023-01-07 19:48:43.752236454 +0100
+@@ -139,9 +139,9 @@ def parse_single_panel(
+ 
+ def add_child_classes(node):
+     """Add classes to specific child nodes."""
+-    for para in node.traverse(nodes.paragraph):
++    for para in node.findall(nodes.paragraph):
+         para["classes"] = ([] if "classes" in para else para["classes"]) + ["card-text"]
+-    for title in node.traverse(nodes.title):
++    for title in node.findall(nodes.title):
+         title["classes"] = ([] if "classes" in title else title["classes"]) + [
+             "card-title"
+         ]
+--- sphinx-panels-0.6.0/sphinx_panels/tabs.py.orig	2021-06-03 23:37:02.000000000 +0200
++++ sphinx-panels-0.6.0/sphinx_panels/tabs.py	2023-01-07 19:49:17.025389531 +0100
+@@ -127,7 +127,7 @@ class TabbedHtmlTransform(SphinxPostTran
+     def run(self):
+         matcher = NodeMatcher(nodes.container, type="tabbed")
+         tab_set = None
+-        for node in self.document.traverse(matcher):  # type: nodes.container
++        for node in self.document.findall(matcher):  # type: nodes.container
+             if tab_set is None:
+                 tab_set = TabSet(node)
+             elif node["new_group"]:
+--- sphinx-panels-0.6.0/sphinx_panels/dropdown.py.orig	2021-06-03 23:37:02.000000000 +0200
++++ sphinx-panels-0.6.0/sphinx_panels/dropdown.py	2023-01-07 19:49:34.285296026 +0100
+@@ -115,7 +115,7 @@ class DropdownHtmlTransform(SphinxPostTr
+ 
+     def run(self):
+         matcher = NodeMatcher(nodes.container, type="dropdown")
+-        for node in self.document.traverse(matcher):
++        for node in self.document.findall(matcher):
+ 
+             open_marker = nodes.container(
+                 "",
+@@ -171,7 +171,7 @@ class DropdownHtmlTransform(SphinxPostTr
+                 is_div=True,
+                 classes=["summary-content", "card-body"] + node["body_classes"]
+             )
+-            for para in body_node.traverse(nodes.paragraph):
++            for para in body_node.findall(nodes.paragraph):
+                 para["classes"] = ([] if "classes" in para else para["classes"]) + [
+                     "card-text"
+                 ]
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-sphinx_panels.git/commitdiff/53531ac792c2e05c9916b464eec3c67391bb7b08



More information about the pld-cvs-commit mailing list