Hello community, here is the log from the commit of package python3-Sphinx for openSUSE:Factory checked in at 2016-10-10 16:16:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-Sphinx (Old) and /work/SRC/openSUSE:Factory/.python3-Sphinx.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-Sphinx" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-Sphinx/python3-Sphinx.changes 2016-08-31 14:29:35.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-Sphinx.new/python3-Sphinx.changes 2016-10-10 16:16:48.000000000 +0200 @@ -1,0 +2,33 @@ +Sun Oct 2 15:45:36 UTC 2016 - a...@gmx.de + +- update to version 1.4.8: + * #2996: The wheel package of Sphinx got crash with ImportError + +- changes from version 1.4.7: + * #2890: Quickstart should return an error consistently on all error + conditions + * #2870: flatten genindex columns' heights. + * #2856: Search on generated HTML site doesnt find some symbols + * #2882: Fall back to a GET request on 403 status in linkcheck + * #2902: jsdump.loads fails to load search index if keywords starts + with underscore + * #2900: Fix epub content.opf: add auto generated orphan files to + spine. + * #2899: Fix "hasdoc()" function in Jinja2 template. It can detect + "genindex", "search" collectly. + * #2901: Fix epub result: skip creating links from image tags to + original image files. + * #2917: inline code is hyphenated on HTML + * #1462: autosummary warns for namedtuple with attribute with + trailing underscore + * Could not reference equations if ":nowrap:" option specified + * #2873: code-block overflow in latex (due to commas) + * #1060, #2056: sphinx.ext.intersphinx: broken links are generated + if relative paths are used in `intersphinx_mapping` + * #2931: code-block directive with same :caption: causes warning of + duplicate target. Now `code-block` and `literalinclude` does not + define hyperlink target using its caption automatially. + * #2962: latex: missing label of longtable + * #2968: autodoc: show-inheritance option breaks docstrings + +------------------------------------------------------------------- Old: ---- Sphinx-1.4.6.tar.gz New: ---- Sphinx-1.4.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-Sphinx.spec ++++++ --- /var/tmp/diff_new_pack.9QMjbR/_old 2016-10-10 16:16:49.000000000 +0200 +++ /var/tmp/diff_new_pack.9QMjbR/_new 2016-10-10 16:16:49.000000000 +0200 @@ -17,7 +17,7 @@ Name: python3-Sphinx -Version: 1.4.6 +Version: 1.4.8 Release: 0 Url: http://sphinx.pocoo.org Summary: Python documentation generator ++++++ Sphinx-1.4.6.tar.gz -> Sphinx-1.4.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/CHANGES new/Sphinx-1.4.8/CHANGES --- old/Sphinx-1.4.6/CHANGES 2016-08-20 10:59:33.000000000 +0200 +++ new/Sphinx-1.4.8/CHANGES 2016-10-01 17:37:50.000000000 +0200 @@ -1,3 +1,38 @@ +Release 1.4.8 (released Oct 1, 2016) +==================================== + +Bugs fixed +---------- + +* #2996: The wheel package of Sphinx got crash with ImportError + +Release 1.4.7 (released Oct 1, 2016) +==================================== + +Bugs fixed +---------- + +* #2890: Quickstart should return an error consistently on all error conditions +* #2870: flatten genindex columns' heights. +* #2856: Search on generated HTML site doesnt find some symbols +* #2882: Fall back to a GET request on 403 status in linkcheck +* #2902: jsdump.loads fails to load search index if keywords starts with + underscore +* #2900: Fix epub content.opf: add auto generated orphan files to spine. +* #2899: Fix ``hasdoc()`` function in Jinja2 template. It can detect ``genindex``, ``search`` collectly. +* #2901: Fix epub result: skip creating links from image tags to original image files. +* #2917: inline code is hyphenated on HTML +* #1462: autosummary warns for namedtuple with attribute with trailing underscore +* Could not reference equations if ``:nowrap:`` option specified +* #2873: code-block overflow in latex (due to commas) +* #1060, #2056: sphinx.ext.intersphinx: broken links are generated if relative + paths are used in `intersphinx_mapping` +* #2931: code-block directive with same :caption: causes warning of duplicate + target. Now `code-block` and `literalinclude` does not define hyperlink + target using its caption automatially. +* #2962: latex: missing label of longtable +* #2968: autodoc: show-inheritance option breaks docstrings + Release 1.4.6 (released Aug 20, 2016) ===================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/Makefile new/Sphinx-1.4.8/Makefile --- old/Sphinx-1.4.6/Makefile 2016-08-20 10:56:36.000000000 +0200 +++ new/Sphinx-1.4.8/Makefile 2016-10-01 17:20:38.000000000 +0200 @@ -34,7 +34,7 @@ style-check: @$(PYTHON) utils/check_sources.py $(DONT_CHECK) . -clean: clean-pyc clean-pycache clean-patchfiles clean-backupfiles clean-generated clean-testfiles +clean: clean-pyc clean-pycache clean-patchfiles clean-backupfiles clean-generated clean-testfiles clean-buildfiles clean-pyc: find . -name '*.pyc' -exec rm -f {} + @@ -58,6 +58,9 @@ rm -rf tests/build rm -rf .tox/ +clean-buildfiles: + rm -rf build + pylint: @pylint --rcfile utils/pylintrc sphinx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/PKG-INFO new/Sphinx-1.4.8/PKG-INFO --- old/Sphinx-1.4.6/PKG-INFO 2016-08-20 11:00:46.000000000 +0200 +++ new/Sphinx-1.4.8/PKG-INFO 2016-10-01 17:38:28.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: Sphinx -Version: 1.4.6 +Version: 1.4.8 Summary: Python documentation generator Home-page: http://sphinx-doc.org/ Author: Georg Brandl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/Sphinx.egg-info/PKG-INFO new/Sphinx-1.4.8/Sphinx.egg-info/PKG-INFO --- old/Sphinx-1.4.6/Sphinx.egg-info/PKG-INFO 2016-08-20 11:00:41.000000000 +0200 +++ new/Sphinx-1.4.8/Sphinx.egg-info/PKG-INFO 2016-10-01 17:38:25.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: Sphinx -Version: 1.4.6 +Version: 1.4.8 Summary: Python documentation generator Home-page: http://sphinx-doc.org/ Author: Georg Brandl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/Sphinx.egg-info/SOURCES.txt new/Sphinx-1.4.8/Sphinx.egg-info/SOURCES.txt --- old/Sphinx-1.4.6/Sphinx.egg-info/SOURCES.txt 2016-08-20 11:00:42.000000000 +0200 +++ new/Sphinx-1.4.8/Sphinx.egg-info/SOURCES.txt 2016-10-01 17:38:26.000000000 +0200 @@ -331,6 +331,8 @@ sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +sphinx/pycode/Grammar-py2-sphinx1.2.pickle +sphinx/pycode/Grammar-py2-sphinx1.4.pickle sphinx/pycode/Grammar-py2.pickle sphinx/pycode/Grammar-py2.txt sphinx/pycode/Grammar-py3.pickle @@ -508,6 +510,7 @@ sphinx/util/parallel.py sphinx/util/png.py sphinx/util/pycompat.py +sphinx/util/rst.py sphinx/util/smartypants.py sphinx/util/stemmer.py sphinx/util/tags.py @@ -589,6 +592,7 @@ tests/test_util_jsdump.py tests/test_util_logging.py tests/test_util_nodes.py +tests/test_util_rst.py tests/test_versioning.py tests/test_websupport.py tests/typing_test_data.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/doc/extdev/markupapi.rst new/Sphinx-1.4.8/doc/extdev/markupapi.rst --- old/Sphinx-1.4.6/doc/extdev/markupapi.rst 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/doc/extdev/markupapi.rst 2016-09-21 03:46:45.000000000 +0200 @@ -125,6 +125,8 @@ node = docutils.nodes.paragraph() # either + from sphinx.ext.autodoc import AutodocReporter + self.state.memo.reporter = AutodocReporter(self.result, self.state.memo.reporter) # override reporter to avoid errors from "include" directive nested_parse_with_titles(self.state, self.result, node) # or self.state.nested_parse(self.result, 0, node) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/doc/theming.rst new/Sphinx-1.4.8/doc/theming.rst --- old/Sphinx-1.4.6/doc/theming.rst 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/doc/theming.rst 2016-10-01 17:14:36.000000000 +0200 @@ -86,33 +86,28 @@ +--------------------+--------------------+ | **Theme overview** | | +--------------------+--------------------+ -| |alabaster| | |sphinx_rtd_theme| | +| |alabaster| | |classic| | | | | -| *alabaster* | *sphinx_rtd_theme* | +| *alabaster* | *classic* | +--------------------+--------------------+ -| |classic| | |sphinxdoc| | +| |sphinxdoc| | |scrolls| | | | | -| *classic* | *sphinxdoc* | +| *sphinxdoc* | *scrolls* | +--------------------+--------------------+ -| |scrolls| | |agogo| | +| |agogo| | |traditional| | | | | -| *scrolls* | *agogo* | +| *agogo* | *traditional* | +--------------------+--------------------+ -| |traditional| | |nature| | +| |nature| | |haiku| | | | | -| *traditional* | *nature* | +| *nature* | *haiku* | +--------------------+--------------------+ -| |haiku| | |pyramid| | +| |pyramid| | |bizstyle| | | | | -| *haiku* | *pyramid* | -+--------------------+--------------------+ -| |bizstyle| | | -| | | -| *bizstyle* | | +| *pyramid* | *bizstyle* | +--------------------+--------------------+ .. |alabaster| image:: themes/alabaster.png -.. |sphinx_rtd_theme| image:: themes/sphinx_rtd_theme.png .. |classic| image:: themes/classic.png .. |sphinxdoc| image:: themes/sphinxdoc.png .. |scrolls| image:: themes/scrolls.png @@ -147,13 +142,6 @@ .. _Alabaster theme: https://pypi.python.org/pypi/alabaster -* **sphinx_rtd_theme** -- `Read the Docs Sphinx Theme`_. - This is a mobile-friendly sphinx theme that was made for readthedocs.org. - View a working demo over on readthedocs.org. You can get options information - at `Read the Docs Sphinx Theme`_ page. - - .. _Read the Docs Sphinx Theme: https://pypi.python.org/pypi/sphinx_rtd_theme - * **classic** -- This is the classic theme, which looks like `the Python 2 documentation <https://docs.python.org/2/>`_. It can be customized via these options: @@ -359,3 +347,28 @@ .. [1] It is not an executable Python file, as opposed to :file:`conf.py`, because that would pose an unnecessary security risk if themes are shared. + +Third Party Themes +------------------ + +.. cssclass:: longtable + ++--------------------+--------------------+ +| **Theme overview** | | ++--------------------+--------------------+ +| |sphinx_rtd_theme| | | +| | | +| *sphinx_rtd_theme* | | ++--------------------+--------------------+ + +.. |sphinx_rtd_theme| image:: themes/sphinx_rtd_theme.png + +* **sphinx_rtd_theme** -- `Read the Docs Sphinx Theme`_. + This is a mobile-friendly sphinx theme that was made for readthedocs.org. + View a working demo over on readthedocs.org. You can get install and options + information at `Read the Docs Sphinx Theme`_ page. + + .. _Read the Docs Sphinx Theme: https://pypi.python.org/pypi/sphinx_rtd_theme + + .. versionchanged:: 1.4 + **sphinx_rtd_theme** has become optional. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/__init__.py new/Sphinx-1.4.8/sphinx/__init__.py --- old/Sphinx-1.4.6/sphinx/__init__.py 2016-08-20 10:59:02.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/__init__.py 2016-10-01 17:37:40.000000000 +0200 @@ -15,13 +15,13 @@ import sys from os import path -__version__ = '1.4.6' -__released__ = '1.4.6' # used when Sphinx builds its own docs +__version__ = '1.4.8' +__released__ = '1.4.8' # used when Sphinx builds its own docs # version info for better programmatic use # possible values for 3rd element: 'alpha', 'beta', 'rc', 'final' # 'final' has 0 as the last element -version_info = (1, 4, 6, 'final', 0) +version_info = (1, 4, 8, 'final', 0) package_dir = path.abspath(path.dirname(__file__)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/builders/epub.py new/Sphinx-1.4.8/sphinx/builders/epub.py --- old/Sphinx-1.4.6/sphinx/builders/epub.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/builders/epub.py 2016-10-01 17:14:36.000000000 +0200 @@ -123,6 +123,9 @@ SPINE_TEMPLATE = u'''\ <itemref idref="%(idref)s" />''' +NO_LINEAR_SPINE_TEMPLATE = u'''\ + <itemref idref="%(idref)s" linear="no" />''' + GUIDE_TEMPLATE = u'''\ <reference type="%(type)s" title="%(title)s" href="%(uri)s" />''' @@ -187,7 +190,8 @@ add_permalinks = False # don't add sidebar etc. embedded = True - + # dont' create links to original images from images + html_scaled_image_link = False # don't generate search index or include search page search = False @@ -202,6 +206,7 @@ coverpage_name = COVERPAGE_NAME file_template = FILE_TEMPLATE spine_template = SPINE_TEMPLATE + no_linear_spine_template = NO_LINEAR_SPINE_TEMPLATE guide_template = GUIDE_TEMPLATE toctree_template = TOCTREE_TEMPLATE doctype = DOCTYPE @@ -584,6 +589,7 @@ # spine spine = [] + spinefiles = set() for item in self.refnodes: if '#' in item['refuri']: continue @@ -592,14 +598,23 @@ spine.append(self.spine_template % { 'idref': self.esc(self.make_id(item['refuri'])) }) + spinefiles.add(item['refuri']) for info in self.domain_indices: spine.append(self.spine_template % { 'idref': self.esc(self.make_id(info[0] + self.out_suffix)) }) + spinefiles.add(info[0] + self.out_suffix) if self.get_builder_config('use_index', 'epub'): spine.append(self.spine_template % { 'idref': self.esc(self.make_id('genindex' + self.out_suffix)) }) + spinefiles.add('genindex' + self.out_suffix) + # add auto generated files + for name in self.files: + if name not in spinefiles and name.endswith(self.out_suffix): + spine.append(self.no_linear_spine_template % { + 'idref': self.esc(self.make_id(name)) + }) # add the optional cover content_tmpl = self.content_template @@ -626,6 +641,7 @@ ctx = {'image': self.esc(image), 'title': self.config.project} self.handle_page( path.splitext(self.coverpage_name)[0], ctx, html_tmpl) + spinefiles.add(self.coverpage_name) guide = [] auto_add_cover = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/builders/html.py new/Sphinx-1.4.8/sphinx/builders/html.py --- old/Sphinx-1.4.6/sphinx/builders/html.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/builders/html.py 2016-10-01 17:14:36.000000000 +0200 @@ -74,6 +74,8 @@ link_suffix = '.html' # defaults to matching out_suffix indexer_format = js_index indexer_dumps_unicode = True + # create links to original images from images [True/False] + html_scaled_image_link = True supported_image_types = ['image/svg+xml', 'image/png', 'image/gif', 'image/jpeg'] searchindex_filename = 'searchindex.js' @@ -678,7 +680,7 @@ """ Builder.post_process_images(self, doctree) - if self.config.html_scaled_image_link: + if self.config.html_scaled_image_link and self.html_scaled_image_link: for node in doctree.traverse(nodes.image): scale_keys = ('scale', 'width', 'height') if not any((key in node) for key in scale_keys) or \ @@ -785,7 +787,17 @@ uri = relative_uri(baseuri, otheruri) or '#' return uri ctx['pathto'] = pathto - ctx['hasdoc'] = lambda name: name in self.env.all_docs + + def hasdoc(name): + if name in self.env.all_docs: + return True + elif name == 'search' and self.search: + return True + elif name == 'genindex' and self.get_builder_config('use_index', 'html'): + return True + return False + ctx['hasdoc'] = hasdoc + if self.name != 'htmlhelp': ctx['encoding'] = encoding = self.config.html_output_encoding else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/builders/linkcheck.py new/Sphinx-1.4.8/sphinx/builders/linkcheck.py --- old/Sphinx-1.4.6/sphinx/builders/linkcheck.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/builders/linkcheck.py 2016-10-01 17:14:36.000000000 +0200 @@ -183,10 +183,10 @@ f = opener.open(req, **kwargs) f.close() except HTTPError as err: - if err.code != 405: + if err.code not in (403, 405): raise # retry with GET if that fails, some servers - # don't like HEAD requests and reply with 405 + # don't like HEAD requests and reply with 403 or 405 req = Request(req_url) f = opener.open(req, **kwargs) f.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/directives/code.py new/Sphinx-1.4.8/sphinx/directives/code.py --- old/Sphinx-1.4.6/sphinx/directives/code.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/directives/code.py 2016-10-01 17:14:36.000000000 +0200 @@ -133,7 +133,6 @@ caption = self.options.get('caption') if caption: - self.options.setdefault('name', nodes.fully_normalize_name(caption)) try: literal = container_wrapper(self, literal, caption) except ValueError as exc: @@ -344,7 +343,6 @@ if caption is not None: if not caption: caption = self.arguments[0] - self.options.setdefault('name', nodes.fully_normalize_name(caption)) try: retnode = container_wrapper(self, retnode, caption) except ValueError as exc: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/ext/autodoc.py new/Sphinx-1.4.8/sphinx/ext/autodoc.py --- old/Sphinx-1.4.6/sphinx/ext/autodoc.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/ext/autodoc.py 2016-10-01 17:14:37.000000000 +0200 @@ -261,6 +261,8 @@ Displaying complex types from ``typing`` relies on its private API. """ + if typing and isinstance(annotation, typing.TypeVar): + return annotation.__name__ if not isinstance(annotation, type): return repr(annotation) @@ -270,9 +272,7 @@ if annotation.__module__ == 'builtins': return annotation.__qualname__ elif typing: - if isinstance(annotation, typing.TypeVar): - return annotation.__name__ - elif hasattr(typing, 'GenericMeta') and \ + if hasattr(typing, 'GenericMeta') and \ isinstance(annotation, typing.GenericMeta): # In Python 3.5.2+, all arguments are stored in __args__, # whereas __parameters__ only contains generic parameters. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/ext/autosummary/__init__.py new/Sphinx-1.4.8/sphinx/ext/autosummary/__init__.py --- old/Sphinx-1.4.6/sphinx/ext/autosummary/__init__.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/ext/autosummary/__init__.py 2016-10-01 17:14:37.000000000 +0200 @@ -67,6 +67,7 @@ import sphinx from sphinx import addnodes +from sphinx.util import rst from sphinx.util.compat import Directive from sphinx.pycode import ModuleAnalyzer, PycodeError from sphinx.ext.autodoc import Options @@ -367,7 +368,7 @@ for name, sig, summary, real_name in items: qualifier = 'obj' if 'nosignatures' not in self.options: - col1 = ':%s:`%s <%s>`\ %s' % (qualifier, name, real_name, sig) + col1 = ':%s:`%s <%s>`\ %s' % (qualifier, name, real_name, rst.escape(sig)) else: col1 = ':%s:`%s <%s>`' % (qualifier, name, real_name) col2 = summary diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/ext/intersphinx.py new/Sphinx-1.4.8/sphinx/ext/intersphinx.py --- old/Sphinx-1.4.6/sphinx/ext/intersphinx.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/ext/intersphinx.py 2016-10-01 17:14:37.000000000 +0200 @@ -366,7 +366,7 @@ proj, version, uri, dispname = inventory[objtype][target] if '://' not in uri and node.get('refdoc'): # get correct path in case of subdirectories - uri = path.join(relative_path(node['refdoc'], env.srcdir), uri) + uri = path.join(relative_path(node['refdoc'], '.'), uri) newnode = nodes.reference('', '', internal=False, refuri=uri, reftitle=_('(in %s v%s)') % (proj, version)) if node.get('refexplicit'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/ext/mathbase.py new/Sphinx-1.4.8/sphinx/ext/mathbase.py --- old/Sphinx-1.4.6/sphinx/ext/mathbase.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/ext/mathbase.py 2016-10-01 17:14:37.000000000 +0200 @@ -131,10 +131,12 @@ def latex_visit_displaymath(self, node): + label = node['label'] and node['docname'] + '-' + node['label'] or None if node['nowrap']: + if label: + self.body.append(r'\label{%s}' % label) self.body.append(node['latex']) else: - label = node['label'] and node['docname'] + '-' + node['label'] or None self.body.append(wrap_displaymath(node['latex'], label, self.builder.config.math_number_all)) raise nodes.SkipNode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/jinja2glue.py new/Sphinx-1.4.8/sphinx/jinja2glue.py --- old/Sphinx-1.4.6/sphinx/jinja2glue.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/jinja2glue.py 2016-10-01 17:14:37.000000000 +0200 @@ -35,6 +35,27 @@ return 0 +def _slice_index(values, slices): + seq = list(values) + length = 0 + for value in values: + length += 1 + len(value[1][1]) # count includes subitems + items_per_slice = length // slices + offset = 0 + for slice_number in range(slices): + count = 0 + start = offset + if slices == slice_number + 1: # last column + offset = len(seq) + else: + for value in values[offset:]: + count += 1 + len(value[1][1]) + offset += 1 + if count >= items_per_slice: + break + yield seq[start:offset] + + def accesskey(context, key): """Helper to output each access key only once.""" if '_accesskeys' not in context: @@ -127,6 +148,7 @@ extensions=extensions) self.environment.filters['tobool'] = _tobool self.environment.filters['toint'] = _toint + self.environment.filters['slice_index'] = _slice_index self.environment.globals['debug'] = contextfunction(pformat) self.environment.globals['accesskey'] = contextfunction(accesskey) self.environment.globals['idgen'] = idgen Files old/Sphinx-1.4.6/sphinx/locale/fr/LC_MESSAGES/sphinx.mo and new/Sphinx-1.4.8/sphinx/locale/fr/LC_MESSAGES/sphinx.mo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/locale/fr/LC_MESSAGES/sphinx.po new/Sphinx-1.4.8/sphinx/locale/fr/LC_MESSAGES/sphinx.po --- old/Sphinx-1.4.6/sphinx/locale/fr/LC_MESSAGES/sphinx.po 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/locale/fr/LC_MESSAGES/sphinx.po 2016-09-29 08:19:30.000000000 +0200 @@ -446,7 +446,7 @@ #: sphinx/ext/autodoc.py:1265 #, python-format msgid " Bases: %s" -msgstr "Bases: %s" +msgstr " Bases: %s" #: sphinx/ext/autodoc.py:1318 #, python-format Files old/Sphinx-1.4.6/sphinx/locale/it/LC_MESSAGES/sphinx.mo and new/Sphinx-1.4.8/sphinx/locale/it/LC_MESSAGES/sphinx.mo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/locale/it/LC_MESSAGES/sphinx.po new/Sphinx-1.4.8/sphinx/locale/it/LC_MESSAGES/sphinx.po --- old/Sphinx-1.4.6/sphinx/locale/it/LC_MESSAGES/sphinx.po 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/locale/it/LC_MESSAGES/sphinx.po 2016-09-29 08:19:30.000000000 +0200 @@ -441,7 +441,7 @@ #: sphinx/ext/autodoc.py:1265 #, python-format msgid " Bases: %s" -msgstr "Basi: %s" +msgstr " Basi: %s" #: sphinx/ext/autodoc.py:1318 #, python-format Files old/Sphinx-1.4.6/sphinx/locale/ne/LC_MESSAGES/sphinx.mo and new/Sphinx-1.4.8/sphinx/locale/ne/LC_MESSAGES/sphinx.mo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/locale/ne/LC_MESSAGES/sphinx.po new/Sphinx-1.4.8/sphinx/locale/ne/LC_MESSAGES/sphinx.po --- old/Sphinx-1.4.6/sphinx/locale/ne/LC_MESSAGES/sphinx.po 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/locale/ne/LC_MESSAGES/sphinx.po 2016-09-29 08:19:30.000000000 +0200 @@ -439,7 +439,7 @@ #: sphinx/ext/autodoc.py:1265 #, python-format msgid " Bases: %s" -msgstr "Bases: %s" +msgstr " Bases: %s" #: sphinx/ext/autodoc.py:1318 #, python-format Files old/Sphinx-1.4.6/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo and new/Sphinx-1.4.8/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po new/Sphinx-1.4.8/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po --- old/Sphinx-1.4.6/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po 2016-09-29 08:19:30.000000000 +0200 @@ -440,7 +440,7 @@ #: sphinx/ext/autodoc.py:1265 #, python-format msgid " Bases: %s" -msgstr "Bases: %s" +msgstr " Bases: %s" #: sphinx/ext/autodoc.py:1318 #, python-format Files old/Sphinx-1.4.6/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo and new/Sphinx-1.4.8/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po new/Sphinx-1.4.8/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po --- old/Sphinx-1.4.6/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po 2016-09-29 08:19:30.000000000 +0200 @@ -439,7 +439,7 @@ #: sphinx/ext/autodoc.py:1265 #, python-format msgid " Bases: %s" -msgstr "Bases: %s" +msgstr " Bases: %s" #: sphinx/ext/autodoc.py:1318 #, python-format Files old/Sphinx-1.4.6/sphinx/locale/ro/LC_MESSAGES/sphinx.mo and new/Sphinx-1.4.8/sphinx/locale/ro/LC_MESSAGES/sphinx.mo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/locale/ro/LC_MESSAGES/sphinx.po new/Sphinx-1.4.8/sphinx/locale/ro/LC_MESSAGES/sphinx.po --- old/Sphinx-1.4.6/sphinx/locale/ro/LC_MESSAGES/sphinx.po 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/locale/ro/LC_MESSAGES/sphinx.po 2016-09-29 08:19:30.000000000 +0200 @@ -439,7 +439,7 @@ #: sphinx/ext/autodoc.py:1265 #, python-format msgid " Bases: %s" -msgstr "Baze: %s" +msgstr " Baze: %s" #: sphinx/ext/autodoc.py:1318 #, python-format Files old/Sphinx-1.4.6/sphinx/locale/sk/LC_MESSAGES/sphinx.mo and new/Sphinx-1.4.8/sphinx/locale/sk/LC_MESSAGES/sphinx.mo differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/locale/sk/LC_MESSAGES/sphinx.po new/Sphinx-1.4.8/sphinx/locale/sk/LC_MESSAGES/sphinx.po --- old/Sphinx-1.4.6/sphinx/locale/sk/LC_MESSAGES/sphinx.po 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/locale/sk/LC_MESSAGES/sphinx.po 2016-09-29 08:19:30.000000000 +0200 @@ -440,7 +440,7 @@ #: sphinx/ext/autodoc.py:1265 #, python-format msgid " Bases: %s" -msgstr "Základné: %s" +msgstr " Základné: %s" #: sphinx/ext/autodoc.py:1318 #, python-format Files old/Sphinx-1.4.6/sphinx/pycode/Grammar-py2-sphinx1.2.pickle and new/Sphinx-1.4.8/sphinx/pycode/Grammar-py2-sphinx1.2.pickle differ Files old/Sphinx-1.4.6/sphinx/pycode/Grammar-py2-sphinx1.4.pickle and new/Sphinx-1.4.8/sphinx/pycode/Grammar-py2-sphinx1.4.pickle differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/quickstart.py new/Sphinx-1.4.8/sphinx/quickstart.py --- old/Sphinx-1.4.6/sphinx/quickstart.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/quickstart.py 2016-10-01 17:14:37.000000000 +0200 @@ -1646,7 +1646,7 @@ if not set(['project', 'author', 'version']).issubset(d): print('''"quiet" is specified, but any of "project", \ "author" or "version" is not specified.''') - return + return 1 if set(['quiet', 'project', 'author', 'version']).issubset(d): # quiet mode with all required params satisfied, use default @@ -1666,13 +1666,13 @@ ' files already exist.')) print('sphinx-quickstart only generate into a empty directory.' ' Please specify a new root path.') - return + return 1 else: ask_user(d) except (KeyboardInterrupt, EOFError): print() print('[Interrupted.]') - return + return 130 # 128 + SIGINT # decode values in d if value is a Python string literal for key, value in d.items(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/texinputs/sphinx.sty new/Sphinx-1.4.8/sphinx/texinputs/sphinx.sty --- old/Sphinx-1.4.6/sphinx/texinputs/sphinx.sty 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/texinputs/sphinx.sty 2016-10-01 17:14:37.000000000 +0200 @@ -290,6 +290,7 @@ \def\PYGZti{\discretionary{\char`\~}{\sphinxafterbreak}{\char`\~}}% } +\def\sphinx@verbatim@nolig@list {\do \`}% % Some characters . , ; ? ! / are not pygmentized. % This macro makes them "active" and they will insert potential linebreaks \newcommand*\sphinxbreaksatpunct {% @@ -387,6 +388,8 @@ % For grid placement from \strut's in \FancyVerbFormatLine \lineskip\z@skip % Breaks at punctuation characters . , ; ? ! and / need catcode=\active + % and the active comma should not be overwritten by \@noligs + \let\verbatim@nolig@list \sphinx@verbatim@nolig@list \OriginalVerbatim[#1,codes*=\sphinxbreaksatpunct]% } \renewcommand{\endVerbatim}{% diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/themes/basic/genindex.html new/Sphinx-1.4.8/sphinx/themes/basic/genindex.html --- old/Sphinx-1.4.6/sphinx/themes/basic/genindex.html 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/themes/basic/genindex.html 2016-10-01 17:14:37.000000000 +0200 @@ -44,7 +44,7 @@ {%- for key, entries in genindexentries %} <h2 id="{{ key }}">{{ key }}</h2> <table style="width: 100%" class="indextable genindextable"><tr> - {%- for column in entries|slice(2) if column %} + {%- for column in entries|slice_index(2) if column %} <td style="width: 33%" valign="top"><dl> {%- for entryname, (links, subitems, _) in column %} {{ indexentries(entryname, links) }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/themes/basic/static/basic.css_t new/Sphinx-1.4.8/sphinx/themes/basic/static/basic.css_t --- old/Sphinx-1.4.6/sphinx/themes/basic/static/basic.css_t 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/themes/basic/static/basic.css_t 2016-10-01 17:14:37.000000000 +0200 @@ -494,6 +494,13 @@ overflow-y: hidden; /* fixes display issues on Chrome browsers */ } +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; +} + td.linenos pre { padding: 5px 0px; border: 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/themes/basic/static/searchtools.js_t new/Sphinx-1.4.8/sphinx/themes/basic/static/searchtools.js_t --- old/Sphinx-1.4.6/sphinx/themes/basic/static/searchtools.js_t 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/themes/basic/static/searchtools.js_t 2016-10-01 17:14:37.000000000 +0200 @@ -145,7 +145,7 @@ var searchterms = []; var excluded = []; var hlterms = []; - var tmp = query.split(/\s+/); + var tmp = query.split(/\W+/); var objectterms = []; for (i = 0; i < tmp.length; i++) { if (tmp[i] !== "") { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/util/jsdump.py new/Sphinx-1.4.8/sphinx/util/jsdump.py --- old/Sphinx-1.4.6/sphinx/util/jsdump.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/util/jsdump.py 2016-09-21 03:46:46.000000000 +0200 @@ -18,7 +18,7 @@ _str_re = re.compile(r'"(\\\\|\\"|[^"])*"') _int_re = re.compile(r'\d+') -_name_re = re.compile(r'[a-zA-Z]\w*') +_name_re = re.compile(r'[a-zA-Z_]\w*') _nameonly_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*$') # escape \, ", control characters and everything outside ASCII diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/util/rst.py new/Sphinx-1.4.8/sphinx/util/rst.py --- old/Sphinx-1.4.6/sphinx/util/rst.py 1970-01-01 01:00:00.000000000 +0100 +++ new/Sphinx-1.4.8/sphinx/util/rst.py 2016-09-21 03:46:46.000000000 +0200 @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +""" + sphinx.util.rst + ~~~~~~~~~~~~~~~ + + reST helper functions. + + :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +import re + +symbols_re = re.compile('([!-/:-@\[-`{-~])') + + +def escape(text): + return symbols_re.sub(r'\\\1', text) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/sphinx/writers/latex.py new/Sphinx-1.4.8/sphinx/writers/latex.py --- old/Sphinx-1.4.6/sphinx/writers/latex.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/sphinx/writers/latex.py 2016-10-01 17:14:37.000000000 +0200 @@ -1029,6 +1029,8 @@ self.body.append('}') for id in self.pop_hyperlink_ids('table'): self.body.append(self.hypertarget(id, anchor=False)) + if node['ids']: + self.body.append(self.hypertarget(node['ids'][0], anchor=False)) self.body.append(u'\\\\\n') if self.table.longtable: self.body.append('\\hline\n') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/tests/roots/test-autosummary/dummy_module.py new/Sphinx-1.4.8/tests/roots/test-autosummary/dummy_module.py --- old/Sphinx-1.4.6/tests/roots/test-autosummary/dummy_module.py 2016-08-20 10:03:09.000000000 +0200 +++ new/Sphinx-1.4.8/tests/roots/test-autosummary/dummy_module.py 2016-09-21 03:46:46.000000000 +0200 @@ -69,3 +69,7 @@ ''' This is a nested inner class docstring ''' + + +def func(arg_): + """Test function take an argument ended with underscore.""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/tests/roots/test-directive-code/caption.rst new/Sphinx-1.4.8/tests/roots/test-directive-code/caption.rst --- old/Sphinx-1.4.6/tests/roots/test-directive-code/caption.rst 2016-08-20 10:03:10.000000000 +0200 +++ new/Sphinx-1.4.8/tests/roots/test-directive-code/caption.rst 2016-09-29 08:19:30.000000000 +0200 @@ -4,7 +4,7 @@ References ---------- -See :numref:`caption *test* rb` and :numref:`caption **test** py`. +See :numref:`name *test* rb` and :numref:`name **test** py`. See :ref:`Ruby <name *test* rb>` and :ref:`Python <name **test** py>`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/tests/test_directive_code.py new/Sphinx-1.4.8/tests/test_directive_code.py --- old/Sphinx-1.4.6/tests/test_directive_code.py 2016-08-20 10:03:10.000000000 +0200 +++ new/Sphinx-1.4.8/tests/test_directive_code.py 2016-10-01 17:14:37.000000000 +0200 @@ -56,7 +56,7 @@ caption = (u'<div class="code-block-caption">' u'<span class="caption-number">Listing 1 </span>' u'<span class="caption-text">caption <em>test</em> rb' - u'</span><a class="headerlink" href="#caption-test-rb" ' + u'</span><a class="headerlink" href="#id1" ' u'title="Permalink to this code">\xb6</a></div>') assert caption in html @@ -66,9 +66,9 @@ app.builder.build_all() latex = (app.outdir / 'Python.tex').text(encoding='utf-8') caption = '\\sphinxSetupCaptionForVerbatim{literal-block}{caption \\emph{test} rb}' - label = '\\def\\sphinxLiteralBlockLabel{\\label{caption:caption-test-rb}}' - link = '\hyperref[caption:caption-test-rb]' \ - '{Listing \\ref{caption:caption-test-rb}}' + label = '\\def\\sphinxLiteralBlockLabel{\\label{caption:id1}}' + link = '\hyperref[caption:name-test-rb]' \ + '{Listing \\ref{caption:name-test-rb}}' assert caption in latex assert label in latex assert link in latex @@ -243,7 +243,7 @@ caption = (u'<div class="code-block-caption">' u'<span class="caption-number">Listing 2 </span>' u'<span class="caption-text">caption <strong>test</strong> py' - u'</span><a class="headerlink" href="#caption-test-py" ' + u'</span><a class="headerlink" href="#id2" ' u'title="Permalink to this code">\xb6</a></div>') assert caption in html @@ -253,9 +253,9 @@ app.builder.build('index') latex = (app.outdir / 'Python.tex').text(encoding='utf-8') caption = '\\sphinxSetupCaptionForVerbatim{literal-block}{caption \\textbf{test} py}' - label = '\\def\\sphinxLiteralBlockLabel{\\label{caption:caption-test-py}}' - link = '\hyperref[caption:caption-test-py]' \ - '{Listing \\ref{caption:caption-test-py}}' + label = '\\def\\sphinxLiteralBlockLabel{\\label{caption:id2}}' + link = '\hyperref[caption:name-test-py]' \ + '{Listing \\ref{caption:name-test-py}}' assert caption in latex assert label in latex assert link in latex diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/tests/test_ext_intersphinx.py new/Sphinx-1.4.8/tests/test_ext_intersphinx.py --- old/Sphinx-1.4.6/tests/test_ext_intersphinx.py 2016-08-20 10:03:10.000000000 +0200 +++ new/Sphinx-1.4.8/tests/test_ext_intersphinx.py 2016-10-01 17:14:37.000000000 +0200 @@ -135,6 +135,8 @@ app.config.intersphinx_mapping = { 'https://docs.python.org/': inv_file, 'py3k': ('https://docs.python.org/py3k/', inv_file), + 'py3krel': ('py3k', inv_file), # relative path + 'py3krelparent': ('../../py3k', inv_file), # relative path, parent dir } app.config.intersphinx_cache_limit = 0 @@ -202,6 +204,19 @@ assert rn is None assert contnode[0].astext() == 'py3k:unknown' + # check relative paths + rn = reference_check('py', 'mod', 'py3krel:module1', 'foo') + assert rn['refuri'] == 'py3k/foo.html#module-module1' + + rn = reference_check('py', 'mod', 'py3krelparent:module1', 'foo') + assert rn['refuri'] == '../../py3k/foo.html#module-module1' + + rn = reference_check('py', 'mod', 'py3krel:module1', 'foo', refdoc='sub/dir/test') + assert rn['refuri'] == '../../py3k/foo.html#module-module1' + + rn = reference_check('py', 'mod', 'py3krelparent:module1', 'foo', refdoc='sub/dir/test') + assert rn['refuri'] == '../../../../py3k/foo.html#module-module1' + @with_app() @with_tempdir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/tests/test_util_jsdump.py new/Sphinx-1.4.8/tests/test_util_jsdump.py --- old/Sphinx-1.4.6/tests/test_util_jsdump.py 2016-08-20 10:03:10.000000000 +0200 +++ new/Sphinx-1.4.8/tests/test_util_jsdump.py 2016-09-21 03:46:46.000000000 +0200 @@ -1,9 +1,20 @@ # -*- coding: utf-8 -*- +from sphinx.util.jsdump import dumps, loads + def test_jsdump(): - from sphinx.util.jsdump import dumps + data = {'1a': 1} + assert dumps(data) == '{"1a":1}' + assert data == loads(dumps(data)) + + data = {'a1': 1} + assert dumps(data) == '{a1:1}' + assert data == loads(dumps(data)) - assert dumps({'1a': 1}) == '{"1a":1}' - assert dumps({'a1': 1}) == '{a1:1}' + data = {u'a\xe8': 1} + assert dumps(data) == '{"a\\u00e8":1}' + assert data == loads(dumps(data)) - assert dumps({u'a\xe8': 1}) == '{"a\\u00e8":1}' + data = {'_foo': 1} + assert dumps(data) == '{_foo:1}' + assert data == loads(dumps(data)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sphinx-1.4.6/tests/test_util_rst.py new/Sphinx-1.4.8/tests/test_util_rst.py --- old/Sphinx-1.4.6/tests/test_util_rst.py 1970-01-01 01:00:00.000000000 +0100 +++ new/Sphinx-1.4.8/tests/test_util_rst.py 2016-09-21 03:46:46.000000000 +0200 @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +""" + test_util_rst + ~~~~~~~~~~~~~~~ + + Tests sphinx.util.rst functions. + + :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" +from sphinx.util.rst import escape + + +def test_escape(): + assert escape(':ref:`id`') == '\:ref\:\`id\`' + assert escape('footnote [#]_') == 'footnote \[\#\]\_'