Hello community,

here is the log from the commit of package python-sphinx-testing for 
openSUSE:Factory checked in at 2019-04-01 12:38:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sphinx-testing (Old)
 and      /work/SRC/openSUSE:Factory/.python-sphinx-testing.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sphinx-testing"

Mon Apr  1 12:38:25 2019 rev:4 rq:689906 version:1.0.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-sphinx-testing/python-sphinx-testing.changes  
    2018-12-24 11:44:23.349292706 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-sphinx-testing.new.25356/python-sphinx-testing.changes
   2019-04-01 12:38:28.149917713 +0200
@@ -1,0 +2,7 @@
+Fri Mar 29 16:17:14 UTC 2019 - Ondřej Súkup <[email protected]>
+
+- update to 1.0.0
+- enable testsuite
+ * Support Sphinx-2.0
+
+-------------------------------------------------------------------

Old:
----
  sphinx-testing-0.7.2.tar.gz

New:
----
  sphinx-testing-1.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-sphinx-testing.spec ++++++
--- /var/tmp/diff_new_pack.Ygr8Ph/_old  2019-04-01 12:38:28.841918046 +0200
+++ /var/tmp/diff_new_pack.Ygr8Ph/_new  2019-04-01 12:38:28.845918048 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-sphinx-testing
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,17 +18,19 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-sphinx-testing
-Version:        0.7.2
+Version:        1.0.0
 Release:        0
-Summary:        testing utility classes and functions for Sphinx extensions
+Summary:        Testing utility classes and functions for Sphinx extensions
 License:        BSD-2-Clause
 Group:          Development/Languages/Python
 URL:            https://github.com/sphinx-doc/sphinx-testing
 Source:         
https://files.pythonhosted.org/packages/source/s/sphinx-testing/sphinx-testing-%{version}.tar.gz
 BuildRequires:  %{python_module Sphinx}
-BuildRequires:  %{python_module mock}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module six}
+BuildRequires:  fdupes
+BuildRequires:  python-mock
 BuildRequires:  python-rpm-macros
 Requires:       python-Sphinx
 Requires:       python-six
@@ -46,9 +48,10 @@
 
 %install
 %python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec setup.py test
+%pytest
 
 %files %{python_files}
 %license LICENSE

++++++ sphinx-testing-0.7.2.tar.gz -> sphinx-testing-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/CHANGES.rst 
new/sphinx-testing-1.0.0/CHANGES.rst
--- old/sphinx-testing-0.7.2/CHANGES.rst        2017-05-03 15:49:32.000000000 
+0200
+++ new/sphinx-testing-1.0.0/CHANGES.rst        2019-01-27 04:00:52.000000000 
+0100
@@ -1,6 +1,26 @@
 Changelog
 ==========
 
+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:
+
+  - #9: warningiserror=True is broken with Sphinx 1.8.2
+
+0.8.0 (2018-11-13)
+-------------------
+- Drop py33 support
+- Fix bug:
+
+  - #8: Tests are failing with Sphinx 1.8.2
+
 0.7.2 (2017-05-03)
 -------------------
 - Fix bug:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/PKG-INFO 
new/sphinx-testing-1.0.0/PKG-INFO
--- old/sphinx-testing-0.7.2/PKG-INFO   2017-05-03 15:49:44.000000000 +0200
+++ new/sphinx-testing-1.0.0/PKG-INFO   2019-01-27 05:16:24.000000000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: sphinx-testing
-Version: 0.7.2
+Version: 1.0.0
 Summary: testing utility classes and functions for Sphinx extensions
 Home-page: https://github.com/sphinx-doc/sphinx-testing
 Author: Takeshi Komiya
 Author-email: [email protected]
 License: UNKNOWN
-Description: UNKNOWN
+Description: testing utility classes and functions for Sphinx extensions
 Keywords: sphinx,testing
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
@@ -20,9 +20,9 @@
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.2
-Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
 Classifier: Topic :: Documentation
 Classifier: Topic :: Documentation :: Sphinx
 Classifier: Topic :: Software Development
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/README.rst 
new/sphinx-testing-1.0.0/README.rst
--- old/sphinx-testing-0.7.2/README.rst 2017-05-03 14:51:06.000000000 +0200
+++ new/sphinx-testing-1.0.0/README.rst 2018-11-23 16:30:28.000000000 +0100
@@ -10,11 +10,11 @@
 .. image:: 
https://coveralls.io/repos/sphinx-doc/sphinx-testing/badge.png?branch=master
    :target: https://coveralls.io/r/sphinx-doc/sphinx-testing?branch=master
 
-.. image:: https://pypip.in/d/sphinx-testing/badge.png
+.. image:: https://img.shields.io/pypi/dm/sphinx-testing.svg
    :target: https://pypi.python.org/pypi/sphinx-testing/
    :alt: Number of PyPI downloads
 
-.. image:: https://pypip.in/wheel/sphinx-testing/badge.png
+.. image:: https://img.shields.io/pypi/wheel/sphinx-testing.svg
    :target: https://pypi.python.org/pypi/sphinx-testing/
    :alt: Wheel Status
 
@@ -41,7 +41,7 @@
 
 Requirements
 ============
-* Python 2.6, 2.7, 3.2 or later
+* Python 2.6, 2.7, 3.4 or later
 * Sphinx 0.6 or later
 * six
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/setup.cfg 
new/sphinx-testing-1.0.0/setup.cfg
--- old/sphinx-testing-0.7.2/setup.cfg  2017-05-03 15:49:44.000000000 +0200
+++ new/sphinx-testing-1.0.0/setup.cfg  2019-01-27 05:16:24.000000000 +0100
@@ -21,3 +21,6 @@
 [flake8]
 ignore = _
 
+[mypy]
+ignore_missing_imports = True
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/setup.py 
new/sphinx-testing-1.0.0/setup.py
--- old/sphinx-testing-0.7.2/setup.py   2017-05-03 15:49:32.000000000 +0200
+++ new/sphinx-testing-1.0.0/setup.py   2019-01-27 04:01:35.000000000 +0100
@@ -14,9 +14,9 @@
     "Programming Language :: Python",
     "Programming Language :: Python :: 2.6",
     "Programming Language :: Python :: 2.7",
-    "Programming Language :: Python :: 3.2",
-    "Programming Language :: Python :: 3.3",
     "Programming Language :: Python :: 3.4",
+    "Programming Language :: Python :: 3.5",
+    "Programming Language :: Python :: 3.6",
     "Topic :: Documentation",
     "Topic :: Documentation :: Sphinx",
     "Topic :: Software Development",
@@ -25,6 +25,7 @@
     "Topic :: Text Processing :: Markup",
     "Topic :: Utilities",
 ]
+description = 'testing utility classes and functions for Sphinx extensions'
 
 test_require = []
 if sys.version_info < (2, 7):
@@ -35,8 +36,9 @@
 
 setup(
     name='sphinx-testing',
-    version='0.7.2',
-    description='testing utility classes and functions for Sphinx extensions',
+    version='1.0.0',
+    description=description,
+    long_description=description,
     classifiers=classifiers,
     keywords=['sphinx', 'testing'],
     author='Takeshi Komiya',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/src/sphinx_testing/__init__.py 
new/sphinx-testing-1.0.0/src/sphinx_testing/__init__.py
--- old/sphinx-testing-0.7.2/src/sphinx_testing/__init__.py     2017-05-03 
12:25:08.000000000 +0200
+++ new/sphinx-testing-1.0.0/src/sphinx_testing/__init__.py     2019-01-27 
03:42:31.000000000 +0100
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/src/sphinx_testing/path.py 
new/sphinx-testing-1.0.0/src/sphinx_testing/path.py
--- old/sphinx-testing-0.7.2/src/sphinx_testing/path.py 2017-05-03 
12:25:08.000000000 +0200
+++ new/sphinx-testing-1.0.0/src/sphinx_testing/path.py 2019-01-27 
03:42:35.000000000 +0100
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/src/sphinx_testing/tmpdir.py 
new/sphinx-testing-1.0.0/src/sphinx_testing/tmpdir.py
--- old/sphinx-testing-0.7.2/src/sphinx_testing/tmpdir.py       2017-05-03 
12:25:08.000000000 +0200
+++ new/sphinx-testing-1.0.0/src/sphinx_testing/tmpdir.py       2019-01-27 
03:42:38.000000000 +0100
@@ -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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/src/sphinx_testing/util.py 
new/sphinx-testing-1.0.0/src/sphinx_testing/util.py
--- old/sphinx-testing-0.7.2/src/sphinx_testing/util.py 2017-05-03 
15:46:53.000000000 +0200
+++ new/sphinx-testing-1.0.0/src/sphinx_testing/util.py 2019-01-27 
03:51:04.000000000 +0100
@@ -3,20 +3,32 @@
     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.
 """
 
+import os.path
 import shutil
 from six import StringIO
 from functools import wraps
 from textwrap import dedent
 
+import sphinx.application
 from sphinx import __version__ as sphinx_version
 from sphinx.application import Sphinx
 from sphinx_testing.path import path
 from sphinx_testing.tmpdir import mkdtemp
 
+try:
+    from sphinx.util.docutils import docutils_namespace
+except ImportError:
+    # workaround for Sphinx-1.4 and older versions
+    from contextlib import contextmanager
+
+    @contextmanager
+    def docutils_namespace():
+        yield
+
 
 class TestApp(Sphinx):
     """
@@ -72,15 +84,19 @@
         if warning is None:
             warning = StringIO()
 
-        if sphinx_version < '1.3':
-            Sphinx.__init__(self, srcdir, confdir, outdir, doctreedir,
-                            buildername, confoverrides, status,
-                            warning, freshenv, warningiserror, tags)
-        else:
-            Sphinx.__init__(self, srcdir, confdir, outdir, doctreedir,
-                            buildername, confoverrides, status,
-                            warning, freshenv, warningiserror, tags,
-                            verbosity, parallel)
+        try:
+            sphinx.application.abspath = lambda x: x
+            if sphinx_version < '1.3':
+                Sphinx.__init__(self, srcdir, confdir, outdir, doctreedir,
+                                buildername, confoverrides, status,
+                                warning, freshenv, warningiserror, tags)
+            else:
+                Sphinx.__init__(self, srcdir, confdir, outdir, doctreedir,
+                                buildername, confoverrides, status,
+                                warning, freshenv, warningiserror, tags,
+                                verbosity, parallel)
+        finally:
+            sphinx.application.abspath = os.path.abspath
 
     def __repr__(self):
         classname = self.__class__.__name__
@@ -94,8 +110,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)
 
@@ -119,6 +139,8 @@
             if self._write_docstring is True:
                 if isinstance(app.config.source_suffix, (list, tuple)):
                     source_suffix = app.config.source_suffix[0]
+                elif isinstance(app.config.source_suffix, dict):
+                    source_suffix = list(app.config.source_suffix)[0]
                 else:
                     source_suffix = app.config.source_suffix
                 basename = '%s%s' % (app.config.master_doc, source_suffix)
@@ -134,20 +156,21 @@
             app = None
             exc = None
             sphinxkwargs = dict(self.sphinxkwargs)  # create copy
-            try:
-                status = sphinxkwargs.setdefault('status', StringIO())
-                warning = sphinxkwargs.setdefault('warning', StringIO())
-                app = TestApp(*self.sphinxargs, **sphinxkwargs)
-                self.write_docstring(app, func.__doc__)
-
-                func(*(args + (app, status, warning)), **kwargs)
-            except Exception as _exc:
-                exc = _exc
-                raise
-            finally:
-                if app:
-                    if exc:
-                        app.cleanup(error=exc)
-                    else:
-                        app.cleanup()
+            with docutils_namespace():
+                try:
+                    status = sphinxkwargs.setdefault('status', StringIO())
+                    warning = sphinxkwargs.setdefault('warning', StringIO())
+                    app = TestApp(*self.sphinxargs, **sphinxkwargs)
+                    self.write_docstring(app, func.__doc__)
+
+                    return func(*(args + (app, status, warning)), **kwargs)
+                except Exception as _exc:
+                    exc = _exc
+                    raise
+                finally:
+                    if app:
+                        if exc:
+                            app.cleanup(error=exc)
+                        else:
+                            app.cleanup()
         return decorator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/sphinx-testing-0.7.2/src/sphinx_testing.egg-info/PKG-INFO 
new/sphinx-testing-1.0.0/src/sphinx_testing.egg-info/PKG-INFO
--- old/sphinx-testing-0.7.2/src/sphinx_testing.egg-info/PKG-INFO       
2017-05-03 15:49:43.000000000 +0200
+++ new/sphinx-testing-1.0.0/src/sphinx_testing.egg-info/PKG-INFO       
2019-01-27 05:16:23.000000000 +0100
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: sphinx-testing
-Version: 0.7.2
+Version: 1.0.0
 Summary: testing utility classes and functions for Sphinx extensions
 Home-page: https://github.com/sphinx-doc/sphinx-testing
 Author: Takeshi Komiya
 Author-email: [email protected]
 License: UNKNOWN
-Description: UNKNOWN
+Description: testing utility classes and functions for Sphinx extensions
 Keywords: sphinx,testing
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
@@ -20,9 +20,9 @@
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.2
-Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
 Classifier: Topic :: Documentation
 Classifier: Topic :: Documentation :: Sphinx
 Classifier: Topic :: Software Development
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/tests/test_util.py 
new/sphinx-testing-1.0.0/tests/test_util.py
--- old/sphinx-testing-0.7.2/tests/test_util.py 2017-05-03 15:39:10.000000000 
+0200
+++ new/sphinx-testing-1.0.0/tests/test_util.py 2019-01-27 04:15:15.000000000 
+0100
@@ -96,30 +96,36 @@
         app = TestApp(create_new_srcdir=True)
         self.assertTrue(app.builddir.exists())
 
-        with patch("sphinx.theming.Theme") as Theme:
+        if sphinx.__version__ < '2.0':
             with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
                 app.cleanup()
-                self.assertEqual(1, Theme.themes.clear.call_count)
                 self.assertEqual(1, AutoDirective._registry.clear.call_count)
                 self.assertFalse(app.builddir.exists())
+        else:
+            app.cleanup()
+            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.theming.Theme") as Theme:
+        if sphinx.__version__ < '2.0':
             with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
                 app.cleanup(error=True)
-                self.assertEqual(0, Theme.themes.clear.call_count)
                 self.assertEqual(0, AutoDirective._registry.clear.call_count)
                 self.assertTrue(app.builddir.exists())
+        else:
+            app.cleanup(error=True)
+            self.assertTrue(app.builddir.exists())
 
-        with patch("sphinx.theming.Theme") as Theme:
+        if sphinx.__version__ < '2.0':
             with patch("sphinx.ext.autodoc.AutoDirective") as AutoDirective:
                 app.cleanup(error=None)
-                self.assertEqual(1, Theme.themes.clear.call_count)
                 self.assertEqual(1, AutoDirective._registry.clear.call_count)
                 self.assertFalse(app.builddir.exists())
+        else:
+            app.cleanup(error=None)
+            self.assertFalse(app.builddir.exists())
 
     def test_with_app(self):
         srcdir = path(__file__).dirname() / 'examples'
@@ -163,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()
 
@@ -183,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()
 
@@ -196,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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sphinx-testing-0.7.2/tox.ini 
new/sphinx-testing-1.0.0/tox.ini
--- old/sphinx-testing-0.7.2/tox.ini    2017-05-03 15:39:10.000000000 +0200
+++ new/sphinx-testing-1.0.0/tox.ini    2019-01-27 03:47:39.000000000 +0100
@@ -1,5 +1,5 @@
 [tox]
-envlist=py26,py27,py33,py34,sphinx06,sphinx10,sphinx11,sphinx12,sphinx13,sphinx14,sphinx15
+envlist=py26,py27,py34,sphinx06,sphinx10,sphinx11,sphinx12,sphinx13,sphinx14,sphinx15,sphinx16,sphinx17,sphinx18,sphinx-dev
 
 [testenv]
 deps=
@@ -12,15 +12,6 @@
     nosetests
     flake8 setup.py src/ tests/
 
-[testenv:coverage]
-deps=
-    {[testenv]deps}
-    coverage
-    coveralls
-commands=
-    nosetests --with-coverage --cover-package=sphinx_testing
-    coveralls
-
 [testenv:py26]
 deps=
     {[testenv]deps}
@@ -63,3 +54,23 @@
 deps=
     {[testenv]deps}
     Sphinx <= 1.5.9999
+
+[testenv:sphinx16]
+deps=
+    {[testenv]deps}
+    Sphinx <= 1.6.9999
+
+[testenv:sphinx17]
+deps=
+    {[testenv]deps}
+    Sphinx <= 1.7.9999
+
+[testenv:sphinx18]
+deps=
+    {[testenv]deps}
+    Sphinx <= 1.8.9999
+
+[testenv:sphinx-dev]
+deps=
+    {[testenv]deps}
+    git+https://github.com/sphinx-doc/sphinx


Reply via email to