Control: tags -1 + patch pending

On Fri, Mar 27, 2020 at 03:52:07PM +0100, Lucas Nussbaum wrote:
> Hi,
>
> sphinx-testing fails to build with Sphinx 2.4, currently available in
> experimental.

I have uploaded a new version of sphinx-testing as NMU to DELAYED/2.
The debdiff is attached.

And I will upload new sphinx to unstable as soon as #956625 is fixed.

--
Dmitry Shachnev
diff -Nru sphinx-testing-0.8.1/CHANGES.rst sphinx-testing-1.0.1/CHANGES.rst
--- sphinx-testing-0.8.1/CHANGES.rst	2018-11-23 18:33:05.000000000 +0300
+++ sphinx-testing-1.0.1/CHANGES.rst	2019-04-15 17:51:07.000000000 +0300
@@ -1,6 +1,17 @@
 Changelog
 ==========
 
+1.0.1 (2019-04-15)
+-------------------
+- Support Sphinx-2.0.1
+
+1.0.0 (2019-01-27)
+-------------------
+- Support Sphinx-2.0 (unreleased yet)
+- Fix a bug:
+
+  - #12: @with_app decorator should return the value of the decorated function
+
 0.8.1 (2018-11-24)
 -------------------
 - Fix a bug:
diff -Nru sphinx-testing-0.8.1/debian/changelog sphinx-testing-1.0.1/debian/changelog
--- sphinx-testing-0.8.1/debian/changelog	2020-03-15 06:55:05.000000000 +0300
+++ sphinx-testing-1.0.1/debian/changelog	2020-04-14 15:49:42.000000000 +0300
@@ -1,3 +1,14 @@
+sphinx-testing (1.0.1-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release.
+    - Compatible with Sphinx 2.x (closes: #955101, #955098).
+  * Update upstream Homepage URL.
+  * Stop using deprecated nose for tests, just unittest is enough.
+  * Run the autopkgtest for all supported Python versions.
+
+ -- Dmitry Shachnev <[email protected]>  Tue, 14 Apr 2020 15:49:42 +0300
+
 sphinx-testing (0.8.1-1.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru sphinx-testing-0.8.1/debian/control sphinx-testing-1.0.1/debian/control
--- sphinx-testing-0.8.1/debian/control	2019-10-13 07:07:00.000000000 +0300
+++ sphinx-testing-1.0.1/debian/control	2020-04-14 15:49:42.000000000 +0300
@@ -6,7 +6,6 @@
                dh-python,
                python3-all,
                python3-setuptools,
-               python3-nose,
                python3-flake8,
                python3-mock,
                python3-sphinx,
@@ -14,7 +13,7 @@
                python3-jinja2,
                python3-pygments
 Standards-Version: 4.3.0
-Homepage: http://bitbucket.org/tk0miya/sphinx-testing
+Homepage: https://github.com/sphinx-doc/sphinx-testing
 
 Package: python3-sphinx-testing
 Architecture: all
diff -Nru sphinx-testing-0.8.1/debian/copyright sphinx-testing-1.0.1/debian/copyright
--- sphinx-testing-0.8.1/debian/copyright	2014-10-23 17:49:22.000000000 +0400
+++ sphinx-testing-1.0.1/debian/copyright	2020-04-14 15:49:42.000000000 +0300
@@ -1,6 +1,6 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: sphinx-testing
-Source: http://bitbucket.org/tk0miya/sphinx-testing
+Source: https://github.com/sphinx-doc/sphinx-testing
 
 Files: *
 Copyright: 2014 Takeshi KOMIYA <[email protected]>
diff -Nru sphinx-testing-0.8.1/debian/gitlab-ci.yml sphinx-testing-1.0.1/debian/gitlab-ci.yml
--- sphinx-testing-0.8.1/debian/gitlab-ci.yml	1970-01-01 03:00:00.000000000 +0300
+++ sphinx-testing-1.0.1/debian/gitlab-ci.yml	2020-04-14 15:49:42.000000000 +0300
@@ -0,0 +1,3 @@
+include:
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
diff -Nru sphinx-testing-0.8.1/debian/rules sphinx-testing-1.0.1/debian/rules
--- sphinx-testing-0.8.1/debian/rules	2019-10-13 07:07:09.000000000 +0300
+++ sphinx-testing-1.0.1/debian/rules	2020-04-14 15:49:42.000000000 +0300
@@ -6,7 +6,7 @@
 include /usr/share/dpkg/default.mk
 
 export PYBUILD_NAME=sphinx-testing
-export PYBUILD_TEST_NOSE=1
+export PYBUILD_TEST_ARGS=-s tests
 
 %:
 	dh $@ --with python3 --buildsystem=pybuild
diff -Nru sphinx-testing-0.8.1/debian/tests/control sphinx-testing-1.0.1/debian/tests/control
--- sphinx-testing-0.8.1/debian/tests/control	2020-03-15 06:54:59.000000000 +0300
+++ sphinx-testing-1.0.1/debian/tests/control	2020-04-14 15:49:42.000000000 +0300
@@ -1,4 +1,2 @@
 Tests: python3-sphinx-testing
-Depends: python3-sphinx,
-         python3-six,
-         python3-nose
+Depends: python3-all, python3-sphinx-testing
diff -Nru sphinx-testing-0.8.1/debian/tests/python3-sphinx-testing sphinx-testing-1.0.1/debian/tests/python3-sphinx-testing
--- sphinx-testing-0.8.1/debian/tests/python3-sphinx-testing	2019-01-05 03:04:36.000000000 +0300
+++ sphinx-testing-1.0.1/debian/tests/python3-sphinx-testing	2020-04-14 15:49:42.000000000 +0300
@@ -2,7 +2,7 @@
 set -e -u
 cp -r tests "$AUTOPKGTEST_TMP/"
 cd "$AUTOPKGTEST_TMP"
-py3versions -i \
+py3versions -s \
 | tr ' ' '\n' \
 | xargs -I {} env PYTHONWARNINGS=d PYTHONHASHSEED=random {} \
-  -m nosetests3 -vv 2>&1
+  -m unittest discover -v -s tests 2>&1
diff -Nru sphinx-testing-0.8.1/PKG-INFO sphinx-testing-1.0.1/PKG-INFO
--- sphinx-testing-0.8.1/PKG-INFO	2018-11-23 18:33:48.000000000 +0300
+++ sphinx-testing-1.0.1/PKG-INFO	2019-04-15 17:51:44.000000000 +0300
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: sphinx-testing
-Version: 0.8.1
+Version: 1.0.1
 Summary: testing utility classes and functions for Sphinx extensions
 Home-page: https://github.com/sphinx-doc/sphinx-testing
 Author: Takeshi Komiya
diff -Nru sphinx-testing-0.8.1/setup.cfg sphinx-testing-1.0.1/setup.cfg
--- sphinx-testing-0.8.1/setup.cfg	2018-11-23 18:33:48.000000000 +0300
+++ sphinx-testing-1.0.1/setup.cfg	2019-04-15 17:51:44.000000000 +0300
@@ -21,3 +21,6 @@
 [flake8]
 ignore = _
 
+[mypy]
+ignore_missing_imports = True
+
diff -Nru sphinx-testing-0.8.1/setup.py sphinx-testing-1.0.1/setup.py
--- sphinx-testing-0.8.1/setup.py	2018-11-23 18:33:31.000000000 +0300
+++ sphinx-testing-1.0.1/setup.py	2019-04-15 17:51:18.000000000 +0300
@@ -36,7 +36,7 @@
 
 setup(
     name='sphinx-testing',
-    version='0.8.1',
+    version='1.0.1',
     description=description,
     long_description=description,
     classifiers=classifiers,
diff -Nru sphinx-testing-0.8.1/src/sphinx_testing/__init__.py sphinx-testing-1.0.1/src/sphinx_testing/__init__.py
--- sphinx-testing-0.8.1/src/sphinx_testing/__init__.py	2018-11-23 18:30:28.000000000 +0300
+++ sphinx-testing-1.0.1/src/sphinx_testing/__init__.py	2019-01-27 05:42:31.000000000 +0300
@@ -3,7 +3,7 @@
     Sphinx test suite utilities
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    :copyright: Copyright 2007-2014 by Takeshi KOMIYA
+    :copyright: Copyright 2007-2019 by Takeshi KOMIYA
     :license: BSD, see LICENSE for details.
 """
 
diff -Nru sphinx-testing-0.8.1/src/sphinx_testing/path.py sphinx-testing-1.0.1/src/sphinx_testing/path.py
--- sphinx-testing-0.8.1/src/sphinx_testing/path.py	2018-11-23 18:30:28.000000000 +0300
+++ sphinx-testing-1.0.1/src/sphinx_testing/path.py	2019-01-27 05:42:35.000000000 +0300
@@ -4,7 +4,7 @@
     path
     ~~~~
 
-    :copyright: Copyright 2007-2014 by the Sphinx team, see Sphinx-AUTHORS.
+    :copyright: Copyright 2007-2019 by the Sphinx team, see Sphinx-AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import os
diff -Nru sphinx-testing-0.8.1/src/sphinx_testing/tmpdir.py sphinx-testing-1.0.1/src/sphinx_testing/tmpdir.py
--- sphinx-testing-0.8.1/src/sphinx_testing/tmpdir.py	2018-11-23 18:30:28.000000000 +0300
+++ sphinx-testing-1.0.1/src/sphinx_testing/tmpdir.py	2019-01-27 05:42:38.000000000 +0300
@@ -3,7 +3,7 @@
     tmpdir utilities
     ~~~~~~~~~~~~~~~~
 
-    :copyright: Copyright 2007-2014 by Takeshi KOMIYA
+    :copyright: Copyright 2007-2019 by Takeshi KOMIYA
     :license: BSD, see LICENSE for details.
 """
 
diff -Nru sphinx-testing-0.8.1/src/sphinx_testing/util.py sphinx-testing-1.0.1/src/sphinx_testing/util.py
--- sphinx-testing-0.8.1/src/sphinx_testing/util.py	2018-11-23 18:30:57.000000000 +0300
+++ sphinx-testing-1.0.1/src/sphinx_testing/util.py	2019-04-15 17:49:20.000000000 +0300
@@ -3,7 +3,7 @@
     Sphinx test suite utilities
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    :copyright: Copyright 2007-2014 by the Sphinx team, see Sphinx-AUTHORS.
+    :copyright: Copyright 2007-2019 by the Sphinx team, see Sphinx-AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -84,8 +84,13 @@
         if warning is None:
             warning = StringIO()
 
+        # unwrap ModuleWrapper (deprecated_alias)
+        application = sphinx.application
+        while hasattr(application, '_module'):
+            application = application._module
+
         try:
-            sphinx.application.abspath = lambda x: x
+            application.abspath = lambda x: x
             if sphinx_version < '1.3':
                 Sphinx.__init__(self, srcdir, confdir, outdir, doctreedir,
                                 buildername, confoverrides, status,
@@ -96,7 +101,7 @@
                                 warning, freshenv, warningiserror, tags,
                                 verbosity, parallel)
         finally:
-            sphinx.application.abspath = os.path.abspath
+            application.abspath = os.path.abspath
 
     def __repr__(self):
         classname = self.__class__.__name__
@@ -110,8 +115,12 @@
             from sphinx.theming import Theme
             Theme.themes.clear()
 
-        from sphinx.ext.autodoc import AutoDirective
-        AutoDirective._registry.clear()
+        try:
+            from sphinx.ext.autodoc import AutoDirective
+            AutoDirective._registry.clear()
+        except ImportError:
+            pass  # Sphinx-2.0+ does not have AutoDirective and its cache
+
         for tree in self.cleanup_trees:
             shutil.rmtree(tree, True)
 
@@ -159,7 +168,7 @@
                     app = TestApp(*self.sphinxargs, **sphinxkwargs)
                     self.write_docstring(app, func.__doc__)
 
-                    func(*(args + (app, status, warning)), **kwargs)
+                    return func(*(args + (app, status, warning)), **kwargs)
                 except Exception as _exc:
                     exc = _exc
                     raise
diff -Nru sphinx-testing-0.8.1/src/sphinx_testing.egg-info/PKG-INFO sphinx-testing-1.0.1/src/sphinx_testing.egg-info/PKG-INFO
--- sphinx-testing-0.8.1/src/sphinx_testing.egg-info/PKG-INFO	2018-11-23 18:33:47.000000000 +0300
+++ sphinx-testing-1.0.1/src/sphinx_testing.egg-info/PKG-INFO	2019-04-15 17:51:43.000000000 +0300
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: sphinx-testing
-Version: 0.8.1
+Version: 1.0.1
 Summary: testing utility classes and functions for Sphinx extensions
 Home-page: https://github.com/sphinx-doc/sphinx-testing
 Author: Takeshi Komiya
diff -Nru sphinx-testing-0.8.1/tests/test_util.py sphinx-testing-1.0.1/tests/test_util.py
--- sphinx-testing-0.8.1/tests/test_util.py	2018-11-23 18:30:28.000000000 +0300
+++ sphinx-testing-1.0.1/tests/test_util.py	2019-01-27 06:15:15.000000000 +0300
@@ -96,23 +96,35 @@
         app = TestApp(create_new_srcdir=True)
         self.assertTrue(app.builddir.exists())
 
-        with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
+        if sphinx.__version__ < '2.0':
+            with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
+                app.cleanup()
+                self.assertEqual(1, AutoDirective._registry.clear.call_count)
+                self.assertFalse(app.builddir.exists())
+        else:
             app.cleanup()
-            self.assertEqual(1, AutoDirective._registry.clear.call_count)
             self.assertFalse(app.builddir.exists())
 
     def test_TestApp_cleanup_when_cleanup_on_errors(self):
         app = TestApp(create_new_srcdir=True, cleanup_on_errors=False)
         self.assertTrue(app.builddir.exists())
 
-        with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
+        if sphinx.__version__ < '2.0':
+            with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
+                app.cleanup(error=True)
+                self.assertEqual(0, AutoDirective._registry.clear.call_count)
+                self.assertTrue(app.builddir.exists())
+        else:
             app.cleanup(error=True)
-            self.assertEqual(0, AutoDirective._registry.clear.call_count)
             self.assertTrue(app.builddir.exists())
 
-        with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
+        if sphinx.__version__ < '2.0':
+            with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
+                app.cleanup(error=None)
+                self.assertEqual(1, AutoDirective._registry.clear.call_count)
+                self.assertFalse(app.builddir.exists())
+        else:
             app.cleanup(error=None)
-            self.assertEqual(1, AutoDirective._registry.clear.call_count)
             self.assertFalse(app.builddir.exists())
 
     def test_with_app(self):
@@ -157,8 +169,8 @@
         @with_app(create_new_srcdir=True, write_docstring=True)
         def execute(app, status, warning):
             """ Hello world """
-            content = (app.srcdir / 'contents.rst').read_text()
-            self.assertEqual('Hello world ', content)
+            master_doc = (app.srcdir / (app.config.master_doc + '.rst'))
+            self.assertEqual('Hello world ', master_doc.read_text())
 
         execute()
 
@@ -177,8 +189,8 @@
                   confoverrides={'source_suffix': '.txt'})
         def execute(app, status, warning):
             """ Hello world """
-            content = (app.srcdir / 'contents.txt').read_text()
-            self.assertEqual('Hello world ', content)
+            master_doc = (app.srcdir / (app.config.master_doc + '.txt'))
+            self.assertEqual('Hello world ', master_doc.read_text())
 
         execute()
 
@@ -190,3 +202,12 @@
             self.assertEqual('Hello world ', content)
 
         execute()
+
+    def test_with_app_return_value(self):
+        @with_app(create_new_srcdir=True)
+        def execute(ret, app, status, warning):
+            return ret
+
+        s = 'What goes in, must come out'
+
+        self.assertEqual(execute(s), s)
diff -Nru sphinx-testing-0.8.1/tox.ini sphinx-testing-1.0.1/tox.ini
--- sphinx-testing-0.8.1/tox.ini	2018-11-23 18:30:28.000000000 +0300
+++ sphinx-testing-1.0.1/tox.ini	2019-01-27 05:47:39.000000000 +0300
@@ -1,5 +1,5 @@
 [tox]
-envlist=py26,py27,py34,sphinx06,sphinx10,sphinx11,sphinx12,sphinx13,sphinx14,sphinx15,sphinx16,sphinx17,sphinx18
+envlist=py26,py27,py34,sphinx06,sphinx10,sphinx11,sphinx12,sphinx13,sphinx14,sphinx15,sphinx16,sphinx17,sphinx18,sphinx-dev
 
 [testenv]
 deps=
@@ -69,3 +69,8 @@
 deps=
     {[testenv]deps}
     Sphinx <= 1.8.9999
+
+[testenv:sphinx-dev]
+deps=
+    {[testenv]deps}
+    git+https://github.com/sphinx-doc/sphinx

Attachment: signature.asc
Description: PGP signature

Reply via email to