From b31ada206778cd607d47eab3b9262cfde1931d2ca8bb59515453352cc0b4df42 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 29 Jan 2023 18:59:47 +0000 Subject: [PATCH] - add alabaster-0713-compat.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Sphinx?expand=0&rev=231 --- alabaster-0713-compat.patch | 44 +++++++++++++++++++++++++++++++++++++ python-Sphinx.changes | 5 +++++ python-Sphinx.spec | 5 ++++- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 alabaster-0713-compat.patch diff --git a/alabaster-0713-compat.patch b/alabaster-0713-compat.patch new file mode 100644 index 0000000..e7c3c3e --- /dev/null +++ b/alabaster-0713-compat.patch @@ -0,0 +1,44 @@ +From 0fcd3596630b26490c4ea1999634f9f057b2244b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jean-Fran=C3=A7ois=20B?= + <2589111+jfbu@users.noreply.github.com> +Date: Sat, 21 Jan 2023 11:10:26 +0100 +Subject: [PATCH] Update test_config.py::test_needs_sphinx for Alabaster 0.7.13 + compat + +Relates #11145 +--- + tests/test_config.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tests/test_config.py b/tests/test_config.py +index d31fae11329..b0e2112a5e2 100644 +--- a/tests/test_config.py ++++ b/tests/test_config.py +@@ -163,20 +163,20 @@ def _make_app(*args, **kw): + return _make_app + + +-@mock.patch.object(sphinx, '__display_version__', '1.3.4') ++@mock.patch.object(sphinx, '__display_version__', '1.6.4') + def test_needs_sphinx(make_app_with_empty_project): + make_app = make_app_with_empty_project + # micro version +- make_app(confoverrides={'needs_sphinx': '1.3.3'}) # OK: less +- make_app(confoverrides={'needs_sphinx': '1.3.4'}) # OK: equals ++ make_app(confoverrides={'needs_sphinx': '1.6.3'}) # OK: less ++ make_app(confoverrides={'needs_sphinx': '1.6.4'}) # OK: equals + with pytest.raises(VersionRequirementError): +- make_app(confoverrides={'needs_sphinx': '1.3.5'}) # NG: greater ++ make_app(confoverrides={'needs_sphinx': '1.6.5'}) # NG: greater + + # minor version +- make_app(confoverrides={'needs_sphinx': '1.2'}) # OK: less +- make_app(confoverrides={'needs_sphinx': '1.3'}) # OK: equals ++ make_app(confoverrides={'needs_sphinx': '1.5'}) # OK: less ++ make_app(confoverrides={'needs_sphinx': '1.6'}) # OK: equals + with pytest.raises(VersionRequirementError): +- make_app(confoverrides={'needs_sphinx': '1.4'}) # NG: greater ++ make_app(confoverrides={'needs_sphinx': '1.7'}) # NG: greater + + # major version + make_app(confoverrides={'needs_sphinx': '0'}) # OK: less diff --git a/python-Sphinx.changes b/python-Sphinx.changes index 3a6ec71..de7585e 100644 --- a/python-Sphinx.changes +++ b/python-Sphinx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Jan 29 18:59:21 UTC 2023 - Dirk Müller + +- add alabaster-0713-compat.patch + ------------------------------------------------------------------- Tue Jan 10 18:02:04 UTC 2023 - Martin Liška diff --git a/python-Sphinx.spec b/python-Sphinx.spec index 553c176..fa093bf 100644 --- a/python-Sphinx.spec +++ b/python-Sphinx.spec @@ -42,6 +42,8 @@ Source3: requests.inv Source4: readthedocs.inv Source5: update-intersphinx.sh Source99: python-Sphinx.keyring +# PATCH-FIX-UPSTREAM: Update test_config.py::test_needs_sphinx for Alabaster 0.7.13 compat +Patch1: alabaster-0713-compat.patch BuildRequires: %{python_module base} BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} @@ -299,7 +301,8 @@ mv build.doc/man/sphinx-quickstart.1 %{buildroot}%{_mandir}/man1/sphinx-quicksta %if ! %{with test} %post -%{python_install_alternative sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart} +%python_install_alternative sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart +: %postun %python_uninstall_alternative sphinx-apidoc