Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit python-sphinxcontrib-websupport for openSUSE:Factory
Hello community,

here is the log from the commit of package python-sphinxcontrib-websupport for
openSUSE:Factory checked in at 2019-04-26 22:41:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sphinxcontrib-websupport (Old)
and /work/SRC/openSUSE:Factory/.python-sphinxcontrib-websupport.new.5536
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sphinxcontrib-websupport"

Fri Apr 26 22:41:20 2019 rev:7 rq:697037 version:1.1.0

Changes:
--------
---
/work/SRC/openSUSE:Factory/python-sphinxcontrib-websupport/python-sphinxcontrib-websupport.changes
2018-12-14 20:48:49.193391170 +0100
+++
/work/SRC/openSUSE:Factory/.python-sphinxcontrib-websupport.new.5536/python-sphinxcontrib-websupport.changes
2019-04-26 22:41:20.845738583 +0200
@@ -1,0 +2,7 @@
+Tue Apr 23 09:13:06 UTC 2019 - Marketa Calabkova <mcalabkova@xxxxxxxx>
+
+- update to version 1.1.0
+ * Add compatibility with Sphinx 1.6. Thanks to Dmitry Shachnev.
+ * More minor changes. See CHANGES.
+
+-------------------------------------------------------------------

Old:
----
sphinxcontrib-websupport-1.0.1.tar.gz

New:
----
sphinxcontrib-websupport-1.1.0.tar.gz

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

Other differences:
------------------
++++++ python-sphinxcontrib-websupport.spec ++++++
--- /var/tmp/diff_new_pack.rX68dw/_old 2019-04-26 22:41:22.173737906 +0200
+++ /var/tmp/diff_new_pack.rX68dw/_new 2019-04-26 22:41:22.201737891 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-sphinxcontrib-websupport
#
-# 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,7 +18,7 @@

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-sphinxcontrib-websupport
-Version: 1.0.1
+Version: 1.1.0
Release: 0
Summary: Sphinx API for Web Apps
License: BSD-2-Clause
@@ -29,6 +29,7 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Jinja2
+Requires: python-docutils
Requires: python-six
BuildArch: noarch
%if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24

++++++ sphinxcontrib-websupport-1.0.1.tar.gz ->
sphinxcontrib-websupport-1.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-websupport-1.0.1/CHANGES
new/sphinxcontrib-websupport-1.1.0/CHANGES
--- old/sphinxcontrib-websupport-1.0.1/CHANGES 2017-05-07 07:47:20.000000000
+0200
+++ new/sphinxcontrib-websupport-1.1.0/CHANGES 2018-06-03 16:08:39.000000000
+0200
@@ -1,3 +1,11 @@
+Release 1.1.0 (2018-06-03)
+==========================
+
+* #6 Add compatibility with Sphinx 1.6. Thanks to Dmitry Shachnev.
+* #13 Support testing with Sphinx-1.7.
+* #9 Include license file in the generated wheel package. Thanks to
+ Jon Dufresne.
+
Release 1.0.1 (2017-05-07)
==========================

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-websupport-1.0.1/LICENSE
new/sphinxcontrib-websupport-1.1.0/LICENSE
--- old/sphinxcontrib-websupport-1.0.1/LICENSE 2017-04-23 12:41:16.000000000
+0200
+++ new/sphinxcontrib-websupport-1.1.0/LICENSE 2018-06-03 09:53:50.000000000
+0200
@@ -1,7 +1,7 @@
License for sphinxcontrib-websupport
====================================

-Copyright (c) 2007-2017 by the Sphinx team
+Copyright (c) 2007-2018 by the Sphinx team
(see https://github.com/sphinx-doc/sphinx/blob/master/AUTHORS).
All rights reserved.

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-websupport-1.0.1/PKG-INFO
new/sphinxcontrib-websupport-1.1.0/PKG-INFO
--- old/sphinxcontrib-websupport-1.0.1/PKG-INFO 2017-05-07 08:17:21.000000000
+0200
+++ new/sphinxcontrib-websupport-1.1.0/PKG-INFO 2018-06-03 16:09:25.000000000
+0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: sphinxcontrib-websupport
-Version: 1.0.1
+Version: 1.1.0
Summary: Sphinx API for Web Apps
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
@@ -8,7 +8,7 @@
License: BSD
Download-URL: https://pypi.python.org/pypi/sphinxcontrib-websupport
Description:
- sphinxcontrib-webuspport provides a Python API to easily integrate
Sphinx
+ sphinxcontrib-websupport provides a Python API to easily integrate
Sphinx
documentation into your Web application.

Platform: any
@@ -21,10 +21,16 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: Sphinx
Classifier: Framework :: Sphinx :: Extension
Classifier: Topic :: Documentation
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-websupport-1.0.1/setup.cfg
new/sphinxcontrib-websupport-1.1.0/setup.cfg
--- old/sphinxcontrib-websupport-1.0.1/setup.cfg 2017-05-07
08:17:21.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/setup.cfg 2018-06-03
16:09:25.000000000 +0200
@@ -4,18 +4,20 @@

[aliases]
release = egg_info -Db ''
-upload = upload --sign --identity=36580288

[extract_messages]
mapping_file = babel.cfg
output_file = sphinx/locale/sphinx.pot
keywords = _ l_ lazy_gettext

-[wheel]
+[bdist_wheel]
universal = 1

+[metadata]
+license_file = LICENSE
+
[flake8]
max-line-length = 95
ignore = E116,E241,E251
-exclude = .git,.tox,tests/*
+exclude = .git,.tox,.venv,tests/*

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-websupport-1.0.1/setup.py
new/sphinxcontrib-websupport-1.1.0/setup.py
--- old/sphinxcontrib-websupport-1.0.1/setup.py 2017-05-07 07:46:31.000000000
+0200
+++ new/sphinxcontrib-websupport-1.1.0/setup.py 2018-06-03 09:45:04.000000000
+0200
@@ -3,7 +3,7 @@
from setuptools import setup, find_packages

long_desc = '''
-sphinxcontrib-webuspport provides a Python API to easily integrate Sphinx
+sphinxcontrib-websupport provides a Python API to easily integrate Sphinx
documentation into your Web application.
'''

@@ -49,7 +49,11 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
'Framework :: Sphinx',
'Framework :: Sphinx :: Extension',
'Topic :: Documentation',
@@ -58,6 +62,7 @@
'Topic :: Utilities',
],
platforms='any',
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
packages=find_packages(exclude=['tests']),
include_package_data=True,
extras_require=extras_require,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-websupport-1.0.1/sphinxcontrib/websupport/__init__.py
new/sphinxcontrib-websupport-1.1.0/sphinxcontrib/websupport/__init__.py
--- old/sphinxcontrib-websupport-1.0.1/sphinxcontrib/websupport/__init__.py
2017-04-23 12:41:16.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/sphinxcontrib/websupport/__init__.py
2018-06-03 09:53:50.000000000 +0200
@@ -6,7 +6,7 @@
A Python API to easily integrate Sphinx documentation into Web
applications.

- :copyright: Copyright 2007-2017 by the Sphinx team, see README.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see README.
:license: BSD, see LICENSE for details.
"""

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-websupport-1.0.1/sphinxcontrib/websupport/builder.py
new/sphinxcontrib-websupport-1.1.0/sphinxcontrib/websupport/builder.py
--- old/sphinxcontrib-websupport-1.0.1/sphinxcontrib/websupport/builder.py
2017-04-23 12:41:16.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/sphinxcontrib/websupport/builder.py
2018-06-03 09:16:57.000000000 +0200
@@ -18,7 +18,9 @@
from sphinx.jinja2glue import BuiltinTemplateLoader
from sphinx.util.osutil import os_path, relative_uri, ensuredir, copyfile
from sphinx.builders.html import PickleHTMLBuilder
-from sphinx.writers.websupport import WebSupportTranslator
+
+from .writer import WebSupportTranslator
+

if False:
# For type annotation
@@ -34,6 +36,7 @@
name = 'websupport'
versioning_method = 'commentable'
versioning_compare = True # for commentable node's uuid stability.
+ default_translator_class = WebSupportTranslator

def init(self):
# type: () -> None
@@ -54,11 +57,6 @@
self.search = search
self.storage = storage

- def init_translator_class(self):
- # type: () -> None
- if self.translator_class is None:
- self.translator_class = WebSupportTranslator
-
def prepare_writing(self, docnames):
# type: (Iterable[unicode]) -> None
PickleHTMLBuilder.prepare_writing(self, docnames)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-websupport-1.0.1/sphinxcontrib/websupport/core.py
new/sphinxcontrib-websupport-1.1.0/sphinxcontrib/websupport/core.py
--- old/sphinxcontrib-websupport-1.0.1/sphinxcontrib/websupport/core.py
2017-04-23 12:41:16.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/sphinxcontrib/websupport/core.py
2018-06-03 09:16:57.000000000 +0200
@@ -42,6 +42,8 @@
doctreedir=None, # defaults to builddir/doctrees
search=None, # defaults to no search
storage=None, # defaults to SQLite in datadir
+ buildername='websupport',
+ confoverrides={},
status=sys.stdout,
warning=sys.stderr,
moderation_callback=None,
@@ -60,6 +62,9 @@
self.staticroot = staticroot.strip('/')
self.docroot = docroot.strip('/')

+ self.buildername = buildername
+ self.confoverrides = confoverrides
+
self.status = status
self.warning = warning
self.moderation_callback = moderation_callback
@@ -123,7 +128,8 @@

from sphinx.application import Sphinx
app = Sphinx(self.srcdir, self.srcdir, self.outdir, self.doctreedir,
- 'websupport', status=self.status, warning=self.warning)
+ self.buildername, self.confoverrides, status=self.status,
+ warning=self.warning)
app.builder.set_webinfo(self.staticdir, self.staticroot, # type:
ignore
self.search, self.storage)

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-websupport-1.0.1/sphinxcontrib/websupport/version.py
new/sphinxcontrib-websupport-1.1.0/sphinxcontrib/websupport/version.py
--- old/sphinxcontrib-websupport-1.0.1/sphinxcontrib/websupport/version.py
2017-05-07 07:48:02.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/sphinxcontrib/websupport/version.py
2018-06-03 09:53:50.000000000 +0200
@@ -3,9 +3,9 @@
sphinxcontrib.websupport.version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- :copyright: Copyright 2007-2017 by the Sphinx team, see README.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see README.
:license: BSD, see LICENSE for details.
"""

-__version__ = '1.0.1'
+__version__ = '1.1.0'
__version_info__ = tuple(map(int, __version__.split('.')))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-websupport-1.0.1/sphinxcontrib_websupport.egg-info/PKG-INFO
new/sphinxcontrib-websupport-1.1.0/sphinxcontrib_websupport.egg-info/PKG-INFO
---
old/sphinxcontrib-websupport-1.0.1/sphinxcontrib_websupport.egg-info/PKG-INFO
2017-05-07 08:17:21.000000000 +0200
+++
new/sphinxcontrib-websupport-1.1.0/sphinxcontrib_websupport.egg-info/PKG-INFO
2018-06-03 16:09:23.000000000 +0200
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: sphinxcontrib-websupport
-Version: 1.0.1
+Version: 1.1.0
Summary: Sphinx API for Web Apps
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
@@ -8,7 +8,7 @@
License: BSD
Download-URL: https://pypi.python.org/pypi/sphinxcontrib-websupport
Description:
- sphinxcontrib-webuspport provides a Python API to easily integrate
Sphinx
+ sphinxcontrib-websupport provides a Python API to easily integrate
Sphinx
documentation into your Web application.

Platform: any
@@ -21,10 +21,16 @@
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: Sphinx
Classifier: Framework :: Sphinx :: Extension
Classifier: Topic :: Documentation
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-websupport-1.0.1/sphinxcontrib_websupport.egg-info/not-zip-safe

new/sphinxcontrib-websupport-1.1.0/sphinxcontrib_websupport.egg-info/not-zip-safe
---
old/sphinxcontrib-websupport-1.0.1/sphinxcontrib_websupport.egg-info/not-zip-safe
2017-04-23 12:42:01.000000000 +0200
+++
new/sphinxcontrib-websupport-1.1.0/sphinxcontrib_websupport.egg-info/not-zip-safe
2018-06-03 09:27:16.000000000 +0200
@@ -1 +1 @@
-
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-websupport-1.0.1/tests/path.py
new/sphinxcontrib-websupport-1.1.0/tests/path.py
--- old/sphinxcontrib-websupport-1.0.1/tests/path.py 2017-04-23
12:41:16.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/tests/path.py 2018-06-03
09:53:50.000000000 +0200
@@ -4,7 +4,7 @@
path
~~~~

- :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-websupport-1.0.1/tests/test_searchadapters.py
new/sphinxcontrib-websupport-1.1.0/tests/test_searchadapters.py
--- old/sphinxcontrib-websupport-1.0.1/tests/test_searchadapters.py
2017-04-23 12:41:16.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/tests/test_searchadapters.py
2018-06-03 09:53:50.000000000 +0200
@@ -5,16 +5,17 @@

Test the Web Support Package search adapters.

- :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

from six import StringIO
+import pytest

from sphinx.websupport import WebSupport

from test_websupport import sqlalchemy_missing
-from util import rootdir, tempdir, skip_if, skip_unless_importable
+from util import rootdir, tempdir, skip_unless_importable


def teardown_module():
@@ -58,12 +59,12 @@


@skip_unless_importable('xapian', 'needs xapian bindings installed')
-@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@pytest.mark.skipif(sqlalchemy_missing, reason='needs sqlalchemy')
def test_xapian():
search_adapter_helper('xapian')


@skip_unless_importable('whoosh', 'needs whoosh package installed')
-@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@pytest.mark.skipif(sqlalchemy_missing, reason='needs sqlalchemy')
def test_whoosh():
search_adapter_helper('whoosh')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/sphinxcontrib-websupport-1.0.1/tests/test_websupport.py
new/sphinxcontrib-websupport-1.1.0/tests/test_websupport.py
--- old/sphinxcontrib-websupport-1.0.1/tests/test_websupport.py 2017-04-23
12:41:16.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/tests/test_websupport.py 2018-06-03
09:53:50.000000000 +0200
@@ -5,7 +5,7 @@

Test the Web Support Package

- :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

@@ -15,7 +15,7 @@
from sphinx.websupport.storage import StorageBackend
from sphinx.websupport.storage.differ import CombinedHtmlDiff
try:
- from sphinx.websupport.storage.sqlalchemystorage import Session, \
+ from sphinxcontrib.websupport.storage.sqlalchemystorage import Session, \
Comment, CommentVote
from sphinx.websupport.storage.sqlalchemy_db import Node
sqlalchemy_missing = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-websupport-1.0.1/tests/util.py
new/sphinxcontrib-websupport-1.1.0/tests/util.py
--- old/sphinxcontrib-websupport-1.0.1/tests/util.py 2017-04-23
12:41:16.000000000 +0200
+++ new/sphinxcontrib-websupport-1.1.0/tests/util.py 2018-06-03
09:53:50.000000000 +0200
@@ -3,95 +3,31 @@
Sphinx test suite utilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~

- :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""

import os
-import re
-import sys
import tempfile
-import warnings
-from functools import wraps
-from xml.etree import ElementTree
-
-from six import string_types
-from six import StringIO

import pytest

-from docutils import nodes
-from docutils.parsers.rst import directives, roles
-
-from sphinx import application
-from sphinx.builders.latex import LaTeXBuilder
-from sphinx.ext.autodoc import AutoDirective
-from sphinx.pycode import ModuleAnalyzer
-from sphinx.deprecation import RemovedInSphinx17Warning
-
from path import path


__all__ = [
'rootdir', 'tempdir',
- 'skip_unless_importable', 'Struct',
- 'SphinxTestApp',
- 'path',
- 'remove_unicode_literals',
+ 'skip_unless_importable',
]


-rootdir = path(os.path.dirname(__file__) or '.').abspath()
+rootdir = path(__file__).abspath().parent
if 'SPHINX_TEST_TEMPDIR' in os.environ:
tempdir = path(os.environ['SPHINX_TEST_TEMPDIR']).abspath()
else:
tempdir = path(tempfile.mkdtemp()).abspath()


-def assert_re_search(regex, text, flags=0):
- if not re.search(regex, text, flags):
- assert False, '%r did not match %r' % (regex, text)
-
-
-def assert_not_re_search(regex, text, flags=0):
- if re.search(regex, text, flags):
- assert False, '%r did match %r' % (regex, text)
-
-
-def assert_startswith(thing, prefix):
- if not thing.startswith(prefix):
- assert False, '%r does not start with %r' % (thing, prefix)
-
-
-def assert_node(node, cls=None, xpath="", **kwargs):
- if cls:
- if isinstance(cls, list):
- assert_node(node, cls[0], xpath=xpath, **kwargs)
- if cls[1:]:
- if isinstance(cls[1], tuple):
- assert_node(node, cls[1], xpath=xpath, **kwargs)
- else:
- assert len(node) == 1, \
- 'The node%s has %d child nodes, not one' % (xpath,
len(node))
- assert_node(node[0], cls[1:], xpath=xpath + "[0]",
**kwargs)
- elif isinstance(cls, tuple):
- assert len(node) == len(cls), \
- 'The node%s has %d child nodes, not %r' % (xpath, len(node),
len(cls))
- for i, nodecls in enumerate(cls):
- path = xpath + "[%d]" % i
- assert_node(node[i], nodecls, xpath=path, **kwargs)
- elif isinstance(cls, string_types):
- assert node == cls, 'The node %r is not %r: %r' % (xpath, cls,
node)
- else:
- assert isinstance(node, cls), \
- 'The node%s is not subclass of %r: %r' % (xpath, cls, node)
-
- for key, value in kwargs.items():
- assert key in node, 'The node%s does not have %r attribute: %r' %
(xpath, key, node)
- assert node[key] == value, \
- 'The node%s[%s] is not %r: %r' % (xpath, key, value, node[key])
-
-
def skip_unless_importable(module, msg=None):
"""Decorator to skip test if module is not importable."""
try:
@@ -100,265 +36,3 @@
return pytest.mark.skipif(True, reason=(msg or 'conditional skip'))
else:
return pytest.mark.skipif(False, reason=(msg or 'conditional skip'))
-
-
-def etree_parse(path):
- with warnings.catch_warnings(record=False):
- warnings.filterwarnings("ignore", category=DeprecationWarning)
- return ElementTree.parse(path)
-
-
-class Struct(object):
- def __init__(self, **kwds):
- self.__dict__.update(kwds)
-
-
-class SphinxTestApp(application.Sphinx):
- """
- A subclass of :class:`Sphinx` that runs on the test root, with some
- better default values for the initialization parameters.
- """
-
- def __init__(self, buildername='html', testroot=None, srcdir=None,
- freshenv=False, confoverrides=None, status=None, warning=None,
- tags=None, docutilsconf=None):
- if testroot is None:
- defaultsrcdir = 'root'
- testroot = rootdir / 'root'
- else:
- defaultsrcdir = 'test-' + testroot
- testroot = rootdir / 'roots' / ('test-' + testroot)
- if srcdir is None:
- srcdir = tempdir / defaultsrcdir
- else:
- srcdir = tempdir / srcdir
-
- if not srcdir.exists():
- testroot.copytree(srcdir)
-
- if docutilsconf is not None:
- (srcdir / 'docutils.conf').write_text(docutilsconf)
-
- builddir = srcdir / '_build'
-# if confdir is None:
- confdir = srcdir
-# if outdir is None:
- outdir = builddir.joinpath(buildername)
- if not outdir.isdir():
- outdir.makedirs()
-# if doctreedir is None:
- doctreedir = builddir.joinpath('doctrees')
- if not doctreedir.isdir():
- doctreedir.makedirs()
- if confoverrides is None:
- confoverrides = {}
-# if warningiserror is None:
- warningiserror = False
-
- self._saved_path = sys.path[:]
- self._saved_directives = directives._directives.copy()
- self._saved_roles = roles._roles.copy()
-
- self._saved_nodeclasses = set(v for v in dir(nodes.GenericNodeVisitor)
- if v.startswith('visit_'))
-
- try:
- application.Sphinx.__init__(self, srcdir, confdir, outdir,
doctreedir,
- buildername, confoverrides, status,
warning,
- freshenv, warningiserror, tags)
- except:
- self.cleanup()
- raise
-
- def cleanup(self, doctrees=False):
- AutoDirective._registry.clear()
- ModuleAnalyzer.cache.clear()
- LaTeXBuilder.usepackages = []
- sys.path[:] = self._saved_path
- sys.modules.pop('autodoc_fodder', None)
- directives._directives = self._saved_directives
- roles._roles = self._saved_roles
- for method in dir(nodes.GenericNodeVisitor):
- if method.startswith('visit_') and \
- method not in self._saved_nodeclasses:
- delattr(nodes.GenericNodeVisitor, 'visit_' + method[6:])
- delattr(nodes.GenericNodeVisitor, 'depart_' + method[6:])
-
- def __repr__(self):
- return '<%s buildername=%r>' % (self.__class__.__name__,
self.builder.name)
-
-
-_unicode_literals_re = re.compile(r'u(".*?")|u(\'.*?\')')
-
-
-def remove_unicode_literals(s):
- return _unicode_literals_re.sub(lambda x: x.group(1) or x.group(2), s)
-
-
-def find_files(root, suffix=None):
- for dirpath, dirs, files in os.walk(root, followlinks=True):
- dirpath = path(dirpath)
- for f in [f for f in files if not suffix or f.endswith(suffix)]:
- fpath = dirpath / f
- yield os.path.relpath(fpath, root)
-
-
-def strip_escseq(text):
- return re.sub('\x1b.*?m', '', text)
-
-
-# #############################################
-# DEPRECATED implementations
-
-
-def gen_with_app(*args, **kwargs):
- """
- **DEPRECATED**: use pytest.mark.parametrize instead.
-
- Decorate a test generator to pass a SphinxTestApp as the first argument to
- the test generator when it's executed.
- """
- def generator(func):
- @wraps(func)
- def deco(*args2, **kwargs2):
- status, warning = StringIO(), StringIO()
- kwargs['status'] = status
- kwargs['warning'] = warning
- app = SphinxTestApp(*args, **kwargs)
- try:
- for item in func(app, status, warning, *args2, **kwargs2):
- yield item
- finally:
- app.cleanup()
- return deco
- return generator
-
-
-def skip_if(condition, msg=None):
- """
- **DEPRECATED**: use pytest.mark.skipif instead.
-
- Decorator to skip test if condition is true.
- """
- return pytest.mark.skipif(condition, reason=(msg or 'conditional skip'))
-
-
-def skip_unless(condition, msg=None):
- """
- **DEPRECATED**: use pytest.mark.skipif instead.
-
- Decorator to skip test if condition is false.
- """
- return pytest.mark.skipif(not condition, reason=(msg or 'conditional
skip'))
-
-
-def with_tempdir(func):
- """
- **DEPRECATED**: use tempdir fixture instead.
- """
- return func
-
-
-def raises(exc, func, *args, **kwds):
- """
- **DEPRECATED**: use pytest.raises instead.
-
- Raise AssertionError if ``func(*args, **kwds)`` does not raise *exc*.
- """
- with pytest.raises(exc):
- func(*args, **kwds)
-
-
-def raises_msg(exc, msg, func, *args, **kwds):
- """
- **DEPRECATED**: use pytest.raises instead.
-
- Raise AssertionError if ``func(*args, **kwds)`` does not raise *exc*,
- and check if the message contains *msg*.
- """
- with pytest.raises(exc) as excinfo:
- func(*args, **kwds)
- assert msg in str(excinfo.value)
-
-
-def assert_true(v1, msg=''):
- """
- **DEPRECATED**: use assert instead.
- """
- assert v1, msg
-
-
-def assert_equal(v1, v2, msg=''):
- """
- **DEPRECATED**: use assert instead.
- """
- assert v1 == v2, msg
-
-
-def assert_in(x, thing, msg=''):
- """
- **DEPRECATED**: use assert instead.
- """
- if x not in thing:
- assert False, msg or '%r is not in %r' % (x, thing)
-
-
-def assert_not_in(x, thing, msg=''):
- """
- **DEPRECATED**: use assert instead.
- """
- if x in thing:
- assert False, msg or '%r is in %r' % (x, thing)
-
-
-class ListOutput(object):
- """
- File-like object that collects written text in a list.
- """
- def __init__(self, name):
- self.name = name
- self.content = []
-
- def reset(self):
- del self.content[:]
-
- def write(self, text):
- self.content.append(text)
-
-
-# **DEPRECATED**: use pytest.skip instead.
-SkipTest = pytest.skip.Exception
-
-
-class _DeprecationWrapper(object):
- def __init__(self, mod, deprecated):
- self._mod = mod
- self._deprecated = deprecated
-
- def __getattr__(self, attr):
- if attr in self._deprecated:
- obj, instead = self._deprecated[attr]
- warnings.warn("tests/util.py::%s is deprecated and will be "
- "removed in Sphinx 1.7, please use %s instead."
- % (attr, instead),
- RemovedInSphinx17Warning, stacklevel=2)
- return obj
- return getattr(self._mod, attr)
-
-
-sys.modules[__name__] = _DeprecationWrapper(sys.modules[__name__], dict( #
type: ignore
- with_app=(pytest.mark.sphinx, 'pytest.mark.sphinx'),
- TestApp=(SphinxTestApp, 'SphinxTestApp'),
- gen_with_app=(gen_with_app, 'pytest.mark.parametrize'),
- skip_if=(skip_if, 'pytest.skipif'),
- skip_unless=(skip_unless, 'pytest.skipif'),
- with_tempdir=(with_tempdir, 'tmpdir pytest fixture'),
- raises=(raises, 'pytest.raises'),
- raises_msg=(raises_msg, 'pytest.raises'),
- assert_true=(assert_true, 'assert'),
- assert_equal=(assert_equal, 'assert'),
- assert_in=(assert_in, 'assert'),
- assert_not_in=(assert_not_in, 'assert'),
- ListOutput=(ListOutput, 'StringIO'),
- SkipTest=(SkipTest, 'pytest.skip'),
-))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sphinxcontrib-websupport-1.0.1/tox.ini
new/sphinxcontrib-websupport-1.1.0/tox.ini
--- old/sphinxcontrib-websupport-1.0.1/tox.ini 2017-04-23 12:41:16.000000000
+0200
+++ new/sphinxcontrib-websupport-1.1.0/tox.ini 2018-06-03 09:46:52.000000000
+0200
@@ -1,5 +1,5 @@
[tox]
-envlist=flake8,py27,py35,py36
+envlist=flake8,py27,py34,py35,py36

[testenv]
deps=


< Previous Next >
This Thread
  • No further messages