diff --git a/16.patch b/16.patch new file mode 100644 index 0000000..a4dc19b --- /dev/null +++ b/16.patch @@ -0,0 +1,31 @@ +From 248ff52b3c3d39c20cdaef3052ac7507a407733a Mon Sep 17 00:00:00 2001 +From: Takeshi KOMIYA +Date: Sat, 17 Jul 2021 18:55:20 +0900 +Subject: [PATCH] Fix #9457: RemovedInSphinx50Warning on testing + +--- + tests/test_htmlhelp.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_htmlhelp.py b/tests/test_htmlhelp.py +index a74c66a..8774d4b 100644 +--- a/tests/test_htmlhelp.py ++++ b/tests/test_htmlhelp.py +@@ -21,7 +21,7 @@ + def test_build_htmlhelp(app, status, warning): + app.build() + +- hhp = (app.outdir / 'pythondoc.hhp').text() ++ hhp = (app.outdir / 'pythondoc.hhp').read_text() + assert 'Compiled file=pythondoc.chm' in hhp + assert 'Contents file=pythondoc.hhc' in hhp + assert 'Default Window=pythondoc' in hhp +@@ -84,7 +84,7 @@ def assert_sitemap(node, name, filename): + assert node[1].attrib == {'name': 'Local', 'value': filename} + + # .hhc file +- hhc = (app.outdir / 'pythondoc.hhc').text() ++ hhc = (app.outdir / 'pythondoc.hhc').read_text() + tree = HTMLParser(namespaceHTMLElements=False).parse(hhc) + items = tree.find('.//body/ul') + assert len(items) == 4 diff --git a/python-sphinxcontrib-htmlhelp.spec b/python-sphinxcontrib-htmlhelp.spec index 6119905..481649a 100644 --- a/python-sphinxcontrib-htmlhelp.spec +++ b/python-sphinxcontrib-htmlhelp.spec @@ -5,13 +5,16 @@ Name: python-%{pypi_name} Version: 2.0.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Sphinx extension for HTML help files License: BSD URL: http://sphinx-doc.org/ Source0: %{pypi_source} BuildArch: noarch +# In Sphinx 5 path.read_text() replaces path.text() - compatibility fix +Patch: https://github.com/sphinx-doc/sphinxcontrib-htmlhelp/pull/16.patch + BuildRequires: gettext BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools @@ -35,7 +38,7 @@ sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files. %prep -%autosetup -n %{pypi_name}-%{version} +%autosetup -p1 -n %{pypi_name}-%{version} find -name '*.mo' -delete @@ -80,6 +83,9 @@ popd %changelog +* Thu Jul 07 2022 Karolina Surma - 2.0.0-6 +- Fix compatibility with Sphinx 5 + * Mon Jun 13 2022 Python Maint - 2.0.0-5 - Rebuilt for Python 3.11