Accepting request 853306 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/853306
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Sphinx?expand=0&rev=70
This commit is contained in:
Dominique Leuenberger 2020-12-12 19:28:38 +00:00 committed by Git OBS Bridge
commit d36dd6ba75
9 changed files with 130 additions and 67 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:321d6d9b16fa381a5306e5a0b76cd48ffbc588e6340059a729c6fdd66087e0e8
size 5970067

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEihG3ml0NdJpm8KAwECwsF0mNa54FAl82bVIACgkQECwsF0mN
a55rIw//ROMAwRz9tmLbtcw/r9J4uBzzCIof36TTHwDXt8ZGS2hGJ8Fql32VXS5v
1wNMhbthgDSJTfeztSZKQVwmXz6e9q2ignQwUpd/9RvFk/Zf51+v2z6Qtt+Qozn9
DC094CiTrsnKmAW4ZHCb6xuxyYV1bj1KXbnDdECERFt9QNssi2cnKmf72bCX/cae
Kw/hKxeYiVDjax6zdggPKuTxZ8zOikCEnoo43iwXxF+OQWitz20y0hk8bR74NBR7
l2KEJTlAQ/YhsYh7HlRzGU1wT37u5TO0JzzZW7jdbj+j74aeml6w2/67sTSxLNjj
PF3xEDz9YTF1yT9AM1STxV6Aso8y4yfTI1aH23l86gn+f6sx2DA3wxYAWcn/Qvtu
Y7uqZEaIT1glvhZg3ya+5SOwFvznNiZ/nLOE1BgWH3iIzfEOtU3ZbDOU8H/Wne4r
uQGnD3cwvKzZ0cqO3r3XwU98WNU6EFTo3oYWA1k9Pkv9Sb4XhUEKL2RZNbHpGhqQ
9ykJavutrqvyrMoGi5dADZ74YRXGNaQbCX03W6cOg+DLN2buZWevqxclixxz5uXK
SmjSD68jIMH2Qe2d95W8L6hg2vvspenRIhtRped9qkYbzALkgeIHIzpBVfXwKCHx
48jtVh7CgZim57GUfwAGfqDGy2M+V4f49CCf4GNBBK7wAgQ0arc=
=Fh8q
-----END PGP SIGNATURE-----

3
Sphinx-3.3.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e8d592225447104d1172be415bc2972bd1357e3e12fdc76edf2261105db4300
size 5979919

16
Sphinx-3.3.1.tar.gz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEihG3ml0NdJpm8KAwECwsF0mNa54FAl+tRRMACgkQECwsF0mN
a55jUw//e60TRGNBMUYvVlgjCYqPIyyoT2CjUL0YxuB1z4IeYPnkRGuaD1fTjEAt
UAHl0LV7/HrqLeLk/9HsZcxSbRYZ1D0Z7Ifwoi+/1lg8R+E8AJcpdZbsUkMpRiiz
xw2MibHQ+V5CiggqD2slTtJRsdGXnQwyNLD2MSRzPJpNd1cJgyZnrZHvO3hRc//u
80Zl1vyrwP8GhQzJeHN1xT4EbhhdBiw+VeWnbeNoMJQky0JgC/xTMhoYMoyxhP1q
DzeiqOuwnAngk0tlV5NUaqpV3Mw1SR9L/u1WnaKsq1KdXZbc8Rue2rEBbbbcXhqv
P7SsIRxLxobpTayAwiiUE+HPcQLuX+/W9ZaV7J/kE8H7k4+37GRhneX8bZoD+zGi
Gd7rMBCo2uM0IZQyc6FidGurl/IpN5hOJoe47yP0VbRjox+K1lsYxiSrxZMNifyY
0U7wyNnjYpE8sZMgahd4VlHWC4sTNsCFYliG2uKUrO1BEwSVeAslm8fJj5M/0AjR
kwP2kS1owEapFckeJ2P0N+7VBfFY8hdDnCi0lEdZZ8ZVxzoMjgUnb/nbbYl5aCPF
B1Srqbz8SLk2r87RlpC2l/ZHmeryrebIJ1QGLAOFEx4hj2rvrBmd8o8AHBO6pFCw
DQT4KOpSSb5Fp3EIWCHQ3PiKwpWiB9DfxMvOiwWhh/9BrXVufPE=
=yB97
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,44 @@
-------------------------------------------------------------------
Fri Dec 4 17:19:43 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Remove unused mypy from BuildRequires in :test
- Fix the intersphinx inventory bundle for multiple python flavors
gh#openSUSE/python-rpm-macros#66
- Fix failing graphviz dot calls by including packages for png
and pdf formats. The png fail was masked by an incorrect use of
a shell command chain. Fails for pdf format were in the tests.
- Add sphinx-pr8520-fix-AliasNode-copy.patch to fix failing
manpages build -- gh#sphinx-doc/sphinx#8520
-------------------------------------------------------------------
Thu Nov 26 09:18:00 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 3.3.1:
* #8372: autodoc: autoclass directive became slower than Sphinx-3.2
* #7727: autosummary: raise PycodeError when documenting python package
* #8350: autosummary: autosummary_mock_imports causes slow down builds
* #8364: C, properly initialize attributes in empty symbols.
* #8399: i18n: Put system locale path after the paths specified by configuration
* #8100: html: Show a better error message for failures on copying
html_static_files
* #8141: C: added a ``maxdepth`` option to :rst:dir:`c:alias` to insert
nested declarations.
* #8081: LaTeX: Allow to add LaTeX package via ``app.add_latex_package()`` until
just before writing .tex file
* #7996: manpage: Add :confval:`man_make_section_directory` to make a section
directory on build man page
* #8289: epub: Allow to suppress "duplicated ToC entry found" warnings from epub
builder using :confval:`suppress_warnings`.
* #8298: sphinx-quickstart: Add :option:`sphinx-quickstart --no-sep` option
* #8304: sphinx.testing: Register public markers in sphinx.testing.fixtures
* #8051: napoleon: use the obj role for all See Also items
* #8050: napoleon: Apply :confval:`napoleon_preprocess_types` to every field
* C and C++, show line numbers for previous declarations when duplicates are
detected.
* #8183: Remove substitution_reference nodes from doctree only on LaTeX builds
* bugfixes
- remove sphinx-pygments-compat.patch (obsolete)
-------------------------------------------------------------------
Wed Nov 4 11:10:14 UTC 2020 - Benjamin Greiner <code@bnavigator.de>

View File

@ -28,7 +28,7 @@
%endif
%define skip_python2 1
Name: python-Sphinx%{psuffix}
Version: 3.2.1
Version: 3.3.1
Release: 0
Summary: Python documentation generator
License: BSD-2-Clause
@ -36,10 +36,11 @@ Group: Development/Languages/Python
URL: http://sphinx-doc.org
Source: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz
Source1: https://files.pythonhosted.org/packages/source/S/Sphinx/Sphinx-%{version}.tar.gz.asc
Source2: python3.inv
# Provide intersphinx inventory offline
Source2: https://docs.python.org/3/objects.inv#/python3.inv
Source99: python-Sphinx-rpmlintrc
# PATCH-FIX-UPSTREAM: https://patch-diff.githubusercontent.com/raw/sphinx-doc/sphinx/pull/8205.patch
Patch0: sphinx-pygments-compat.patch
# PATCH-FIX-UPSTREAM gh#sphinx-doc/sphinx#8520
Patch0: https://github.com/sphinx-doc/sphinx/pull/8520.patch#/sphinx-pr8520-fix-AliasNode-copy.patch
BuildRequires: %{python_module base}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@ -74,12 +75,16 @@ BuildRequires: %{python_module Cython}
BuildRequires: %{python_module Sphinx = %{version}}
BuildRequires: %{python_module Sphinx-latex = %{version}}
BuildRequires: %{python_module html5lib}
BuildRequires: %{python_module mypy}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module sphinxcontrib-websupport}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module typed-ast}
BuildRequires: ImageMagick
BuildRequires: graphviz
# For PNG format
BuildRequires: graphviz-gd
# For PDF format (!?)
BuildRequires: graphviz-gnome
%endif
%python_subpackages
@ -229,12 +234,15 @@ sed -i 's/\r$//' sphinx/themes/basic/static/jquery.js # Fix wrong end-of-line en
%if %{with test}
mkdir build.doc
# get its intersphinx_inventroy from python3-doc
# instead of via network from https://docs.python.org/3/objects.inv
cp %{SOURCE2} doc/python3.inv
%python_expand sed -i -e "s/\(intersphinx_mapping = ..python.: (.https:..docs.python.org.3.., \)None\()}\)/\1'%{$python_prefix}.inv'\2/g" doc/conf.py
%python_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%python_exec setup.py build_sphinx -b man
%{python_expand # Use one bundled intersphinx inventory for all flavors.
# The python3.6 inventory fails to build even in its own flavor.
# Use a more recent default (currently 3.9) from the source tag instead.
sed -i -e "s/\(intersphinx_mapping = ..python.: (.https:..docs.python.org.3.., \)None\()\)/\1'python3.inv'\2/g" doc/conf.py
$python setup.py build_sphinx
rm build/sphinx/html/.buildinfo
$python setup.py build_sphinx -b man
}
mv build/sphinx/{html,man} build.doc/
%endif
@ -287,6 +295,7 @@ mv build.doc/man/sphinx-quickstart.1 %{buildroot}%{_mandir}/man1/sphinx-quicksta
%check
%if %{with test}
export LC_ALL="C.utf8"
# test_latex_images test downloading a remote image
%pytest tests -k 'not (linkcheck or test_latex_images)'
%endif

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4c6feee075722de6b2dfbb1ac6f880901c7c7c97a10212a490c0b3f833dd61eb
size 106787
oid sha256:84d87706db08de202b66d8fb95cbf27dacd52378050c36e439a270eb5d0c3dc2
size 109517

View File

@ -0,0 +1,49 @@
From 3c5b05de514289c30130ef98fa796591e1acdb29 Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Fri, 4 Dec 2020 20:27:25 +0100
Subject: [PATCH 1/2] Fix AliasNode.copy()
---
sphinx/domains/c.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py
index d18094217a..206d049f75 100644
--- a/sphinx/domains/c.py
+++ b/sphinx/domains/c.py
@@ -3452,7 +3452,8 @@ def __init__(self, sig: str, maxdepth: int, document: Any, env: "BuildEnvironmen
self.parentKey = parentKey
def copy(self: T) -> T:
- return self.__class__(self.sig, env=None, parentKey=self.parentKey) # type: ignore
+ return self.__class__(self.sig, self.maxdepth, self.document,
+ env=None, parentKey=self.parentKey) # type: ignore
class AliasTransform(SphinxTransform):
From a549d8ff2e0371531b8ec8af1d2133812d60b2bb Mon Sep 17 00:00:00 2001
From: Ben Greiner <code@bnavigator.de>
Date: Fri, 4 Dec 2020 20:48:02 +0100
Subject: [PATCH 2/2] Fix mypy type error
---
sphinx/domains/c.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py
index 206d049f75..38b81e3fa6 100644
--- a/sphinx/domains/c.py
+++ b/sphinx/domains/c.py
@@ -3451,9 +3451,9 @@ def __init__(self, sig: str, maxdepth: int, document: Any, env: "BuildEnvironmen
assert parentKey is not None
self.parentKey = parentKey
- def copy(self: T) -> T:
+ def copy(self) -> 'AliasNode':
return self.__class__(self.sig, self.maxdepth, self.document,
- env=None, parentKey=self.parentKey) # type: ignore
+ env=None, parentKey=self.parentKey)
class AliasTransform(SphinxTransform):

View File

@ -1,36 +0,0 @@
From 85b24a2e88ea71edc728aff3b078d34c2f374f06 Mon Sep 17 00:00:00 2001
From: Takeshi KOMIYA <i.tkomiya@gmail.com>
Date: Sun, 13 Sep 2020 09:16:32 +0900
Subject: [PATCH] Fix our test failed with pygments-2.7.0
Since pygments-2.7.0, it has changed the style of output HTML.
That makes our test broken. This fixes it to pass with new pygments.
---
tests/test_build_html.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/test_build_html.py b/tests/test_build_html.py
index e949f11572..1efc6c14a6 100644
--- a/tests/test_build_html.py
+++ b/tests/test_build_html.py
@@ -10,8 +10,10 @@
import os
import re
+from distutils.version import LooseVersion
from itertools import cycle, chain
+import pygments
import pytest
from html5lib import HTMLParser
@@ -1591,4 +1593,8 @@ def test_html_codeblock_linenos_style_inline(app):
app.build()
content = (app.outdir / 'index.html').read_text()
- assert '<span class="lineno">1 </span>' in content
+ pygments_version = tuple(LooseVersion(pygments.__version__).version)
+ if pygments_version > (2, 7):
+ assert '<span class="linenos">1</span>' in content
+ else:
+ assert '<span class="lineno">1 </span>' in content