diff -Nru sphinx-2.4.3/debian/changelog sphinx-2.4.3/debian/changelog --- sphinx-2.4.3/debian/changelog 2020-05-26 12:11:58.000000000 +0000 +++ sphinx-2.4.3/debian/changelog 2020-06-03 08:32:20.000000000 +0000 @@ -1,22 +1,21 @@ -sphinx (2.4.3-2ubuntu2) groovy; urgency=medium +sphinx (2.4.3-4) unstable; urgency=medium - * Export http_proxy=http://127.0.0.1:9/ when running the autopkgtest, - to make it pass in Ubuntu infrastructure. + * Update autodoc_skip_mocked.diff to use safe_getattr instead of plain + getattr (based on upstream PR #7520). See #959558. + * Update the package description. + - Recommend build-depending on the new sphinx virtual package. - -- Dmitry Shachnev Tue, 26 May 2020 15:11:58 +0300 + -- Dmitry Shachnev Wed, 03 Jun 2020 11:32:20 +0300 -sphinx (2.4.3-2ubuntu1) groovy; urgency=low +sphinx (2.4.3-3) unstable; urgency=medium - * Merge from Debian unstable. Remaining changes: - - Restore changes to workaround webkitgtk/js being buggy on ppc/s390x - see https://bugs.webkit.org/show_bug.cgi?id=209337 for details about - the current issue - * Dropped changes, included in Debian: - - Make Sphinx' documentation use HTML 5 instead of XHTML, to fix WebKitGTK - parsing errors with shared-mime-info ≥ 0.11 - - Drop python2 support. + * Break python3-sphinx-celery < 2.0.0 (closes: #958985). + * Export http_proxy=http://127.0.0.1:9/ when running the autopkgtest. + * Make autodoc skip mocked objects (closes: #959558). + * Stop using alternatives, ship /usr/bin/sphinx-* symlinks directly. + * Make python3-sphinx provide sphinx virtual package (see #961206). - -- Steve Langasek Fri, 01 May 2020 15:10:48 -0700 + -- Dmitry Shachnev Thu, 28 May 2020 11:51:15 +0300 sphinx (2.4.3-2) unstable; urgency=medium @@ -102,27 +101,6 @@ -- Sandro Tosi Fri, 27 Mar 2020 12:40:09 -0400 -sphinx (1.8.5-7ubuntu3) focal; urgency=medium - - * Drop python2 support. - - -- Steve Langasek Wed, 22 Apr 2020 19:59:36 -0700 - -sphinx (1.8.5-7ubuntu2) focal; urgency=medium - - * Make Sphinx' documentation use HTML 5 instead of XHTML, to fix WebKitGTK - parsing errors with shared-mime-info ≥ 0.11 (LP: #1871610). - - -- Dmitry Shachnev Wed, 08 Apr 2020 20:02:54 +0300 - -sphinx (1.8.5-7ubuntu1) focal; urgency=medium - - * Restore changes to workaround webkitgtk/js being buggy on ppc/s390x - see https://bugs.webkit.org/show_bug.cgi?id=209337 for details about - the current issue - - -- Sebastien Bacher Fri, 20 Mar 2020 16:01:31 +0100 - sphinx (1.8.5-7) unstable; urgency=medium * Make the autopkgtest depend on python3-all, and use py3versions -s @@ -1730,4 +1708,3 @@ * Removed bundled jinja instance. -- Mikhail Gusarov Sun, 20 Apr 2008 23:01:50 +0200 - diff -Nru sphinx-2.4.3/debian/control sphinx-2.4.3/debian/control --- sphinx-2.4.3/debian/control 2020-04-23 10:11:25.000000000 +0000 +++ sphinx-2.4.3/debian/control 2020-06-03 08:32:20.000000000 +0000 @@ -1,8 +1,7 @@ Source: sphinx Section: python Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Python Modules Team +Maintainer: Debian Python Modules Team Uploaders: Dmitry Shachnev Homepage: https://www.sphinx-doc.org/ Build-Depends: debhelper-compat (= 12) @@ -62,8 +61,12 @@ texlive-latex-extra, texlive-latex-recommended, texlive-plain-generic -Breaks: python3-breathe (<< 4.13), python3-sphinxcontrib.websupport (<< 1.1.2) -Description: documentation generator for Python projects (implemented in Python 3) +Provides: sphinx (= ${binary:Version}) +Breaks: python3-breathe (<< 4.13), + python3-sphinx-celery (<< 2.0.0), + python3-sphinxcontrib.websupport (<< 1.1.2) +Conflicts: python-sphinx +Description: documentation generator for Python projects Sphinx is a tool for producing documentation for Python projects, using reStructuredText as markup language. . @@ -76,7 +79,9 @@ - automatic testing of code snippets, - including docstrings from Python modules. . - This package includes Python 3 modules. + Build-depend on sphinx if your package uses /usr/bin/sphinx-* + executables. Build-depend on python3-sphinx if your package uses + the Python API (for instance by calling python3 -m sphinx). Package: sphinx-common Architecture: all diff -Nru sphinx-2.4.3/debian/patches/autodoc_skip_mocked.diff sphinx-2.4.3/debian/patches/autodoc_skip_mocked.diff --- sphinx-2.4.3/debian/patches/autodoc_skip_mocked.diff 1970-01-01 00:00:00.000000000 +0000 +++ sphinx-2.4.3/debian/patches/autodoc_skip_mocked.diff 2020-06-03 08:32:20.000000000 +0000 @@ -0,0 +1,50 @@ +From: Takeshi KOMIYA +Date: Sun, 19 Apr 2020 00:25:05 +0900 +Subject: autodoc: Skip mocked modules and objects + +Call ``inspect.unwrap()`` for Mocked objects and modules causes +deep recursion calls. As a result, it causes slow builds. This +skips to try documenting mocked objects on filtering members. + +(cherry picked from commit 841f1c7e766d623d5c071605650bedc834480fd2) +--- + sphinx/ext/autodoc/__init__.py | 5 ++++- + sphinx/ext/autodoc/mock.py | 2 ++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py +index 08e4e53..e329b66 100644 +--- a/sphinx/ext/autodoc/__init__.py ++++ b/sphinx/ext/autodoc/__init__.py +@@ -546,7 +546,10 @@ class Documenter: + has_doc = bool(doc) + + keep = False +- if want_all and membername.startswith('__') and \ ++ if safe_getattr(member, '__sphinx_mock__', False): ++ # mocked module or object ++ pass ++ elif want_all and membername.startswith('__') and \ + membername.endswith('__') and len(membername) > 4: + # special __methods__ + if self.options.special_members is ALL and \ +diff --git a/sphinx/ext/autodoc/mock.py b/sphinx/ext/autodoc/mock.py +index 0ee0fdd..26c40e8 100644 +--- a/sphinx/ext/autodoc/mock.py ++++ b/sphinx/ext/autodoc/mock.py +@@ -27,6 +27,7 @@ class _MockObject: + """Used by autodoc_mock_imports.""" + + __display_name__ = '_MockObject' ++ __sphinx_mock__ = True + + def __new__(cls, *args: Any, **kwargs: Any) -> Any: + if len(args) == 3 and isinstance(args[1], tuple): +@@ -80,6 +81,7 @@ def _make_subclass(name: str, module: str, superclass: Any = _MockObject, + class _MockModule(ModuleType): + """Used by autodoc_mock_imports.""" + __file__ = os.devnull ++ __sphinx_mock__ = True + + def __init__(self, name: str, loader: "_MockImporter" = None) -> None: + super().__init__(name) diff -Nru sphinx-2.4.3/debian/patches/series sphinx-2.4.3/debian/patches/series --- sphinx-2.4.3/debian/patches/series 2020-05-01 22:10:48.000000000 +0000 +++ sphinx-2.4.3/debian/patches/series 2020-06-03 08:32:20.000000000 +0000 @@ -12,3 +12,4 @@ html5_docs.diff no_evaluate_debug.diff no_debug.diff +autodoc_skip_mocked.diff diff -Nru sphinx-2.4.3/debian/python3-sphinx.links sphinx-2.4.3/debian/python3-sphinx.links --- sphinx-2.4.3/debian/python3-sphinx.links 1970-01-01 00:00:00.000000000 +0000 +++ sphinx-2.4.3/debian/python3-sphinx.links 2020-06-03 08:32:20.000000000 +0000 @@ -0,0 +1,4 @@ +usr/share/sphinx/scripts/python3/sphinx-apidoc usr/bin/sphinx-apidoc +usr/share/sphinx/scripts/python3/sphinx-autogen usr/bin/sphinx-autogen +usr/share/sphinx/scripts/python3/sphinx-build usr/bin/sphinx-build +usr/share/sphinx/scripts/python3/sphinx-quickstart usr/bin/sphinx-quickstart diff -Nru sphinx-2.4.3/debian/python3-sphinx.postinst sphinx-2.4.3/debian/python3-sphinx.postinst --- sphinx-2.4.3/debian/python3-sphinx.postinst 2020-04-23 10:11:24.000000000 +0000 +++ sphinx-2.4.3/debian/python3-sphinx.postinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = configure ] -then - for exe in /usr/share/sphinx/scripts/python3/* - do - # --force is needed for upgrades from older versions which did not - # use the alternatives mechanism - update-alternatives --force --install /usr/bin/${exe##*/} ${exe##*/} $exe 30 - done -fi - -#DEBHELPER# diff -Nru sphinx-2.4.3/debian/python3-sphinx.preinst sphinx-2.4.3/debian/python3-sphinx.preinst --- sphinx-2.4.3/debian/python3-sphinx.preinst 1970-01-01 00:00:00.000000000 +0000 +++ sphinx-2.4.3/debian/python3-sphinx.preinst 2020-06-03 08:32:20.000000000 +0000 @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt 2.4.3-3~ +then + for exe in /usr/share/sphinx/scripts/python3/* + do + update-alternatives --remove ${exe##*/} $exe + done +fi + +#DEBHELPER# diff -Nru sphinx-2.4.3/debian/python3-sphinx.prerm sphinx-2.4.3/debian/python3-sphinx.prerm --- sphinx-2.4.3/debian/python3-sphinx.prerm 2020-04-23 10:11:25.000000000 +0000 +++ sphinx-2.4.3/debian/python3-sphinx.prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -if [ "$1" = remove ] || [ "$1" = deconfigure ] -then - for exe in /usr/share/sphinx/scripts/python3/* - do - update-alternatives --remove ${exe##*/} $exe - done -fi - -#DEBHELPER# diff -Nru sphinx-2.4.3/debian/tests/control sphinx-2.4.3/debian/tests/control --- sphinx-2.4.3/debian/tests/control 2020-04-23 10:11:25.000000000 +0000 +++ sphinx-2.4.3/debian/tests/control 2020-06-03 08:32:20.000000000 +0000 @@ -22,4 +22,4 @@ Tests: sphinx-doc Depends: gir1.2-webkit2-4.0 (>= 2.10), python3-gi, sphinx-doc, xauth, xvfb -Restrictions: allow-stderr, skippable +Restrictions: allow-stderr diff -Nru sphinx-2.4.3/debian/tests/sphinx-doc sphinx-2.4.3/debian/tests/sphinx-doc --- sphinx-2.4.3/debian/tests/sphinx-doc 2020-04-23 10:11:25.000000000 +0000 +++ sphinx-2.4.3/debian/tests/sphinx-doc 2020-06-03 08:32:20.000000000 +0000 @@ -1,14 +1,5 @@ #!/bin/sh set -e -u - -case `dpkg --print-architecture` in - s390x|ppc64el) - # git/webkit regressed and fails on s390x/ppc64el - # but that's not a bug in sphinx docs/js - exit 77 - ;; -esac - cp -r debian/jstest "$AUTOPKGTEST_TMP/" cd "$AUTOPKGTEST_TMP" for format in rst html