[packages/python3-pydata_sphinx_theme] - added deprecated patch (fix DeprecationWarnings in code); release 2

qboosh qboosh at pld-linux.org
Sat Jan 7 19:45:24 CET 2023


commit 4cd8df0ec51203ae78b82a37e2df46ae70d8f750
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jan 7 19:46:23 2023 +0100

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

 pydata_sphinx_theme-deprecated.patch | 46 ++++++++++++++++++++++++++++++++++++
 python3-pydata_sphinx_theme.spec     |  5 +++-
 2 files changed, 50 insertions(+), 1 deletion(-)
---
diff --git a/python3-pydata_sphinx_theme.spec b/python3-pydata_sphinx_theme.spec
index a5b2db8..0d4945f 100644
--- a/python3-pydata_sphinx_theme.spec
+++ b/python3-pydata_sphinx_theme.spec
@@ -7,12 +7,13 @@ Summary(pl.UTF-8):	Motyw Sphinksa oparty na motywie Bootstrap, stworzony przez s
 Name:		python3-pydata_sphinx_theme
 # versions >= 0.8 require sphinx-theme-builder, which is not ready in PLD
 Version:	0.7.2
-Release:	1
+Release:	2
 License:	BSD
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/pydata-sphinx-theme/
 Source0:	https://files.pythonhosted.org/packages/source/p/pydata-sphinx-theme/pydata-sphinx-theme-%{version}.tar.gz
 # Source0-md5:	d13330b18df272bd9f46f42b033f1524
+Patch0:		pydata_sphinx_theme-deprecated.patch
 URL:		https://pypi.org/project/pydata-sphinx-theme/
 BuildRequires:	python3-modules >= 1:3.5
 BuildRequires:	python3-setuptools
@@ -20,6 +21,7 @@ BuildRequires:	python3-setuptools
 BuildRequires:	python3-Sphinx
 BuildRequires:	python3-bs4
 BuildRequires:	python3-docutils >= 0.17.1
+BuildRequires:	python3-packaging
 BuildRequires:	python3-pytest
 BuildRequires:	python3-pytest-regressions
 BuildRequires:	python3-sphinx_testing
@@ -39,6 +41,7 @@ społeczność PyData.
 
 %prep
 %setup -q -n pydata-sphinx-theme-%{version}
+%patch0 -p1
 
 %build
 %py3_build
diff --git a/pydata_sphinx_theme-deprecated.patch b/pydata_sphinx_theme-deprecated.patch
new file mode 100644
index 0000000..52bfb43
--- /dev/null
+++ b/pydata_sphinx_theme-deprecated.patch
@@ -0,0 +1,46 @@
+--- pydata-sphinx-theme-0.7.2/pydata_sphinx_theme/__init__.py.orig	2021-11-10 20:51:21.000000000 +0100
++++ pydata-sphinx-theme-0.7.2/pydata_sphinx_theme/__init__.py	2023-01-07 19:29:13.725241701 +0100
+@@ -367,7 +367,7 @@ def _get_local_toctree_for(
+         kwargs["maxdepth"] = int(kwargs["maxdepth"])
+     kwargs["collapse"] = collapse
+ 
+-    for toctreenode in doctree.traverse(addnodes.toctree):
++    for toctreenode in doctree.findall(addnodes.toctree):
+         toctree = self.resolve(docname, builder, toctreenode, prune=True, **kwargs)
+         if toctree:
+             toctrees.append(toctree)
+--- pydata-sphinx-theme-0.7.2/pydata_sphinx_theme/bootstrap_html_translator.py.orig	2021-11-10 20:51:21.000000000 +0100
++++ pydata-sphinx-theme-0.7.2/pydata_sphinx_theme/bootstrap_html_translator.py	2023-01-07 19:29:42.538418940 +0100
+@@ -1,7 +1,7 @@
+ """A custom Sphinx HTML Translator for Bootstrap layout
+ """
+-from distutils.version import LooseVersion
+ from docutils import nodes
++from packaging.version import Version
+ 
+ import sphinx
+ from sphinx.writers.html5 import HTML5Translator
+@@ -34,10 +34,10 @@ class BootstrapHTML5Translator(HTML5Tran
+         # but add 'table' class
+ 
+         # generate_targets_for_table is deprecated in 4.0
+-        if LooseVersion(sphinx.__version__) < LooseVersion("4.0"):
++        if Version(sphinx.__version__) < Version("4.0"):
+             self.generate_targets_for_table(node)
+ 
+-        if LooseVersion(sphinx.__version__) < LooseVersion("4.3"):
++        if Version(sphinx.__version__) < Version("4.3"):
+             self._table_row_index = 0
+         else:
+             self._table_row_indices.append(0)
+--- pydata-sphinx-theme-0.7.2/setup.py.orig	2021-11-10 20:51:21.000000000 +0100
++++ pydata-sphinx-theme-0.7.2/setup.py	2023-01-07 19:32:33.520825982 +0100
+@@ -48,7 +48,7 @@ setup(
+     include_package_data=True,
+     # See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
+     entry_points={"sphinx.html_themes": ["pydata_sphinx_theme = pydata_sphinx_theme"]},
+-    install_requires=["sphinx", "beautifulsoup4", "docutils!=0.17.0"],
++    install_requires=["sphinx", "beautifulsoup4", "docutils!=0.17.0", "packaging"],
+     extras_require={
+         "test": tests_require,
+         "coverage": ["pytest-cov", "codecov", *tests_require],
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pydata_sphinx_theme.git/commitdiff/4cd8df0ec51203ae78b82a37e2df46ae70d8f750



More information about the pld-cvs-commit mailing list