Hello community,

here is the log from the commit of package python3-Sphinx for openSUSE:Factory 
checked in at 2016-12-02 16:39:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-10-10 16:16:48.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-Sphinx.new/python3-Sphinx.changes       
2016-12-02 16:39:44.000000000 +0100
@@ -1,0 +2,21 @@
+Sat Nov 26 21:05:46 UTC 2016 - [email protected]
+
+- update to version 1.4.9:
+  * #2936: Fix doc/Makefile that can't build man because doc/man
+     exists
+  * #3058: Using the same 'caption' attribute in multiple 'toctree'
+     directives results in warning / error
+  * #3068: Allow the '=' character in the -D option of sphinx-build.py
+  * #3074: "add_source_parser()" crashes in debug mode
+  * #3135: "sphinx.ext.autodoc" crashes with plain Callable
+  * #3150: Fix query word splitter in JavaScript. It behaves as same
+     as Python's regular expression.
+  * #3093: gettext build broken on substituted images.
+  * #3093: gettext build broken on image node under "note" directive.
+  * imgmath: crashes on showing error messages if image generation
+    failed
+  * #3117: LaTeX writer crashes if admonition is placed before first
+     section title
+  * #3164: Change search order of "sphinx.ext.inheritance_diagram"
+
+-------------------------------------------------------------------

Old:
----
  Sphinx-1.4.8.tar.gz

New:
----
  Sphinx-1.4.9.tar.gz

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

Other differences:
------------------
++++++ python3-Sphinx.spec ++++++
--- /var/tmp/diff_new_pack.FsVmpA/_old  2016-12-02 16:39:45.000000000 +0100
+++ /var/tmp/diff_new_pack.FsVmpA/_new  2016-12-02 16:39:45.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           python3-Sphinx
-Version:        1.4.8
+Version:        1.4.9
 Release:        0
 Url:            http://sphinx.pocoo.org
 Summary:        Python documentation generator

++++++ Sphinx-1.4.8.tar.gz -> Sphinx-1.4.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/CHANGES new/Sphinx-1.4.9/CHANGES
--- old/Sphinx-1.4.8/CHANGES    2016-10-01 17:37:50.000000000 +0200
+++ new/Sphinx-1.4.9/CHANGES    2016-11-23 15:26:03.000000000 +0100
@@ -1,3 +1,22 @@
+Release 1.4.9 (released Nov 23, 2016)
+=====================================
+
+Bugs fixed
+----------
+
+* #2936: Fix doc/Makefile that can't build man because doc/man exists
+* #3058: Using the same 'caption' attribute in multiple 'toctree' directives
+  results in warning / error
+* #3068: Allow the '=' character in the -D option of sphinx-build.py
+* #3074: ``add_source_parser()`` crashes in debug mode
+* #3135: ``sphinx.ext.autodoc`` crashes with plain Callable
+* #3150: Fix query word splitter in JavaScript. It behaves as same as Python's 
regular expression.
+* #3093: gettext build broken on substituted images.
+* #3093: gettext build broken on image node under ``note`` directive.
+* imgmath: crashes on showing error messages if image generation failed
+* #3117: LaTeX writer crashes if admonition is placed before first section 
title
+* #3164: Change search order of ``sphinx.ext.inheritance_diagram``
+
 Release 1.4.8 (released Oct 1, 2016)
 ====================================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/EXAMPLES new/Sphinx-1.4.9/EXAMPLES
--- old/Sphinx-1.4.8/EXAMPLES   2016-09-21 03:46:45.000000000 +0200
+++ new/Sphinx-1.4.9/EXAMPLES   2016-11-23 14:34:53.000000000 +0100
@@ -94,6 +94,7 @@
 * NumPy: http://docs.scipy.org/doc/numpy/reference/
 * OpenCV: http://docs.opencv.org/
 * Peach^3: http://peach3.nl/doc/latest/userdoc/
+* Pygame: http://www.pygame.org/docs/
 * Sage: http://www.sagemath.org/doc/
 * SciPy: http://docs.scipy.org/doc/scipy/reference/
 * simuPOP: http://simupop.sourceforge.net/manual_release/build/userGuide.html
@@ -134,6 +135,7 @@
 * jsFiddle: http://doc.jsfiddle.net/ (nature)
 * libLAS: http://www.liblas.org/ (nature)
 * Linguistica: http://linguistica-uchicago.github.io/lxa5/ (sphinx_rtd_theme)
+* MoinMoin: https://moin-20.readthedocs.io/en/latest/ (sphinx_rtd_theme)
 * MPipe: http://vmlaker.github.io/mpipe/ (sphinx13)
 * pip: https://pip.pypa.io/en/latest/ (sphinx_rtd_theme)
 * Pyramid web framework:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/PKG-INFO new/Sphinx-1.4.9/PKG-INFO
--- old/Sphinx-1.4.8/PKG-INFO   2016-10-01 17:38:28.000000000 +0200
+++ new/Sphinx-1.4.9/PKG-INFO   2016-11-23 15:32:28.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Sphinx
-Version: 1.4.8
+Version: 1.4.9
 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.8/Sphinx.egg-info/PKG-INFO 
new/Sphinx-1.4.9/Sphinx.egg-info/PKG-INFO
--- old/Sphinx-1.4.8/Sphinx.egg-info/PKG-INFO   2016-10-01 17:38:25.000000000 
+0200
+++ new/Sphinx-1.4.9/Sphinx.egg-info/PKG-INFO   2016-11-23 15:32:25.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Sphinx
-Version: 1.4.8
+Version: 1.4.9
 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.8/Sphinx.egg-info/SOURCES.txt 
new/Sphinx-1.4.9/Sphinx.egg-info/SOURCES.txt
--- old/Sphinx-1.4.8/Sphinx.egg-info/SOURCES.txt        2016-10-01 
17:38:26.000000000 +0200
+++ new/Sphinx-1.4.9/Sphinx.egg-info/SOURCES.txt        2016-11-23 
15:32:25.000000000 +0100
@@ -202,6 +202,7 @@
 sphinx/ext/napoleon/__init__.py
 sphinx/ext/napoleon/docstring.py
 sphinx/ext/napoleon/iterators.py
+sphinx/locale/.DS_Store
 sphinx/locale/__init__.py
 sphinx/locale/sphinx.pot
 sphinx/locale/.tx/config
@@ -332,9 +333,12 @@
 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.3.pickle
 sphinx/pycode/Grammar-py2-sphinx1.4.pickle
+sphinx/pycode/Grammar-py2-sphinx1.5.pickle
 sphinx/pycode/Grammar-py2.pickle
 sphinx/pycode/Grammar-py2.txt
+sphinx/pycode/Grammar-py3-sphinx1.4.pickle
 sphinx/pycode/Grammar-py3.pickle
 sphinx/pycode/Grammar-py3.txt
 sphinx/pycode/__init__.py
@@ -357,6 +361,7 @@
 sphinx/search/hu.py
 sphinx/search/it.py
 sphinx/search/ja.py
+sphinx/search/jssplitter.py
 sphinx/search/nl.py
 sphinx/search/no.py
 sphinx/search/pt.py
@@ -734,6 +739,8 @@
 tests/roots/test-ext-inheritance_diagram/conf.py
 tests/roots/test-ext-inheritance_diagram/index.rst
 tests/roots/test-ext-inheritance_diagram/test.py
+tests/roots/test-ext-inheritance_diagram/example/__init__.py
+tests/roots/test-ext-inheritance_diagram/example/sphinx.py
 tests/roots/test-ext-math/conf.py
 tests/roots/test-ext-math/index.rst
 tests/roots/test-ext-math/math.rst
@@ -832,6 +839,8 @@
 tests/roots/test-latex-babel/conf.py
 tests/roots/test-latex-babel/foo.rst
 tests/roots/test-latex-babel/index.rst
+tests/roots/test-latex-title/conf.py
+tests/roots/test-latex-title/index.rst
 tests/roots/test-numbered-circular/conf.py
 tests/roots/test-numbered-circular/contents.rst
 tests/roots/test-numbered-circular/sub.rst
@@ -904,6 +913,8 @@
 tests/roots/test-warnings/undecodable.rst
 tests/roots/test-warnings/wrongenc.inc
 utils/check_sources.py
+utils/jssplitter_generator.py
 utils/pylintrc
+utils/regression_test.js
 utils/reindent.py
 utils/release-checklist
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/doc/Makefile 
new/Sphinx-1.4.9/doc/Makefile
--- old/Sphinx-1.4.8/doc/Makefile       2016-09-07 04:38:02.000000000 +0200
+++ new/Sphinx-1.4.9/doc/Makefile       2016-11-23 15:06:38.000000000 +0100
@@ -1,3 +1,4 @@
+.PHONY: man
 # Makefile for Sphinx documentation
 #
 
@@ -12,6 +13,9 @@
 help:
        @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
+man:
+       @$(SPHINXBUILD) -M man "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
 # Catch-all target: route all unknown targets to Sphinx using the new
 # "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
 %:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Sphinx-1.4.8/doc/_themes/sphinx13/static/sphinx13.css 
new/Sphinx-1.4.9/doc/_themes/sphinx13/static/sphinx13.css
--- old/Sphinx-1.4.8/doc/_themes/sphinx13/static/sphinx13.css   2016-10-01 
17:14:36.000000000 +0200
+++ new/Sphinx-1.4.9/doc/_themes/sphinx13/static/sphinx13.css   2016-11-23 
15:06:38.000000000 +0100
@@ -384,6 +384,10 @@
     padding: 0;
 }
 
+div.admonition div.highlight {
+    background: none;
+}
+
 .viewcode-back {
     font-family: 'Open Sans', 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva',
                  'Verdana', sans-serif;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/doc/faq.rst new/Sphinx-1.4.9/doc/faq.rst
--- old/Sphinx-1.4.8/doc/faq.rst        2016-10-01 17:14:36.000000000 +0200
+++ new/Sphinx-1.4.9/doc/faq.rst        2016-11-23 15:06:38.000000000 +0100
@@ -248,7 +248,7 @@
 
      info:Texinfo#makeinfo_options
 
-  which produces:
+  which produces::
 
      info:Texinfo#makeinfo_options
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/doc/templating.rst 
new/Sphinx-1.4.9/doc/templating.rst
--- old/Sphinx-1.4.8/doc/templating.rst 2016-09-21 03:46:45.000000000 +0200
+++ new/Sphinx-1.4.9/doc/templating.rst 2016-11-23 14:34:53.000000000 +0100
@@ -377,6 +377,7 @@
 
    The name of the copied source file for the current document.  This is only
    nonempty if the :confval:`html_copy_source` value is ``True``.
+   This has empty value on creating automatically-generated files.
 
 .. data:: toc
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/__init__.py 
new/Sphinx-1.4.9/sphinx/__init__.py
--- old/Sphinx-1.4.8/sphinx/__init__.py 2016-10-01 17:37:40.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/__init__.py 2016-11-23 15:25:46.000000000 +0100
@@ -15,13 +15,13 @@
 import sys
 from os import path
 
-__version__  = '1.4.8'
-__released__ = '1.4.8'  # used when Sphinx builds its own docs
+__version__  = '1.4.9'
+__released__ = '1.4.9'  # 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, 8, 'final', 0)
+version_info = (1, 4, 9, 'final', 0)
 
 package_dir = path.abspath(path.dirname(__file__))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/addnodes.py 
new/Sphinx-1.4.9/sphinx/addnodes.py
--- old/Sphinx-1.4.8/sphinx/addnodes.py 2016-10-01 17:14:36.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/addnodes.py 2016-11-23 15:06:39.000000000 +0100
@@ -39,6 +39,8 @@
 
 class desc_addname(nodes.Part, nodes.Inline, nodes.TextElement):
     """Node for additional name parts (module name, class name)."""
+
+
 # compatibility alias
 desc_classname = desc_addname
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/apidoc.py 
new/Sphinx-1.4.9/sphinx/apidoc.py
--- old/Sphinx-1.4.8/sphinx/apidoc.py   2016-10-01 17:14:36.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/apidoc.py   2016-11-23 15:06:39.000000000 +0100
@@ -384,6 +384,7 @@
     elif not opts.notoc:
         create_modules_toc_file(modules, opts)
 
+
 # So program can be started with "python -m sphinx.apidoc ..."
 if __name__ == "__main__":
     main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/application.py 
new/Sphinx-1.4.9/sphinx/application.py
--- old/Sphinx-1.4.8/sphinx/application.py      2016-10-01 17:14:36.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/application.py      2016-11-23 15:06:39.000000000 
+0100
@@ -800,7 +800,7 @@
         languages[cls.lang] = cls
 
     def add_source_parser(self, suffix, parser):
-        self.debug('[app] adding search source_parser: %r, %r', (suffix, 
parser))
+        self.debug('[app] adding search source_parser: %r, %r', suffix, parser)
         if suffix in self._additional_source_parsers:
             self.warn('while setting up extension %s: source_parser for %r is '
                       'already registered, it will be overridden' %
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/builders/__init__.py 
new/Sphinx-1.4.9/sphinx/builders/__init__.py
--- old/Sphinx-1.4.8/sphinx/builders/__init__.py        2016-10-01 
17:14:36.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/builders/__init__.py        2016-11-23 
15:06:39.000000000 +0100
@@ -452,6 +452,7 @@
             optname = '%s_%s' % (default, option)
             return getattr(self.config, optname)
 
+
 BUILTIN_BUILDERS = {
     'dummy':      ('dummy', 'DummyBuilder'),
     'html':       ('html', 'StandaloneHTMLBuilder'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/builders/gettext.py 
new/Sphinx-1.4.9/sphinx/builders/gettext.py
--- old/Sphinx-1.4.8/sphinx/builders/gettext.py 2016-10-01 17:14:36.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/builders/gettext.py 2016-11-23 15:06:39.000000000 
+0100
@@ -150,6 +150,7 @@
     def dst(self, dt):
         return timedelta(0)
 
+
 ltz = LocalTimeZone()
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/builders/html.py 
new/Sphinx-1.4.9/sphinx/builders/html.py
--- old/Sphinx-1.4.8/sphinx/builders/html.py    2016-10-01 17:14:36.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/builders/html.py    2016-11-23 15:06:39.000000000 
+0100
@@ -1181,6 +1181,7 @@
     globalcontext_filename = 'globalcontext.pickle'
     searchindex_filename = 'searchindex.pickle'
 
+
 # compatibility alias
 WebHTMLBuilder = PickleHTMLBuilder
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/builders/linkcheck.py 
new/Sphinx-1.4.9/sphinx/builders/linkcheck.py
--- old/Sphinx-1.4.8/sphinx/builders/linkcheck.py       2016-10-01 
17:14:36.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/builders/linkcheck.py       2016-11-23 
15:06:39.000000000 +0100
@@ -48,6 +48,7 @@
         req.redirect_code = code
         return new_req
 
+
 # create an opener that will simulate a browser user-agent
 opener = build_opener(RedirectHandler)
 opener.addheaders = [('User-agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:25.0) '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/cmdline.py 
new/Sphinx-1.4.9/sphinx/cmdline.py
--- old/Sphinx-1.4.8/sphinx/cmdline.py  2016-10-01 17:14:36.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/cmdline.py  2016-11-23 15:06:39.000000000 +0100
@@ -204,7 +204,7 @@
     confoverrides = {}
     for val in opts.define:
         try:
-            key, val = val.split('=')
+            key, val = val.split('=', 1)
         except ValueError:
             print('Error: -D option argument must be in the form name=value.',
                   file=sys.stderr)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/directives/__init__.py 
new/Sphinx-1.4.9/sphinx/directives/__init__.py
--- old/Sphinx-1.4.8/sphinx/directives/__init__.py      2016-10-01 
17:14:36.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/directives/__init__.py      2016-11-23 
15:06:39.000000000 +0100
@@ -160,6 +160,7 @@
         self.after_content()
         return [self.indexnode, node]
 
+
 # backwards compatible old name
 DescDirective = ObjectDescription
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/directives/other.py 
new/Sphinx-1.4.9/sphinx/directives/other.py
--- old/Sphinx-1.4.8/sphinx/directives/other.py 2016-10-01 17:14:36.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/directives/other.py 2016-11-23 15:06:39.000000000 
+0100
@@ -52,9 +52,6 @@
         env = self.state.document.settings.env
         suffixes = env.config.source_suffix
         glob = 'glob' in self.options
-        caption = self.options.get('caption')
-        if caption:
-            self.options.setdefault('name', 
nodes.fully_normalize_name(caption))
 
         ret = []
         # (title, ref) pairs, where ref may be a document, or an external link,
@@ -113,7 +110,7 @@
         # includefiles only entries that are documents
         subnode['includefiles'] = includefiles
         subnode['maxdepth'] = self.options.get('maxdepth', -1)
-        subnode['caption'] = caption
+        subnode['caption'] = self.options.get('caption')
         subnode['glob'] = glob
         subnode['hidden'] = 'hidden' in self.options
         subnode['includehidden'] = 'includehidden' in self.options
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/ext/autodoc.py 
new/Sphinx-1.4.9/sphinx/ext/autodoc.py
--- old/Sphinx-1.4.8/sphinx/ext/autodoc.py      2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/ext/autodoc.py      2016-11-23 15:06:39.000000000 
+0100
@@ -131,6 +131,7 @@
         return ALL
     return set(x.strip() for x in arg.split(','))
 
+
 SUPPRESS = object()
 
 
@@ -263,6 +264,8 @@
     """
     if typing and isinstance(annotation, typing.TypeVar):
         return annotation.__name__
+    if annotation == Ellipsis:
+        return '...'
     if not isinstance(annotation, type):
         return repr(annotation)
 
@@ -281,7 +284,12 @@
             # arguments are in __parameters__.
             params = None
             if hasattr(annotation, '__args__'):
-                params = annotation.__args__
+                if annotation.__args__ is None or len(annotation.__args__) <= 
2:
+                    params = annotation.__args__
+                else:  # typing.Callable
+                    args = ', '.join(format_annotation(a) for a in 
annotation.__args__[:-1])
+                    result = format_annotation(annotation.__args__[-1])
+                    return '%s[[%s], %s]' % (qualified_name, args, result)
             elif hasattr(annotation, '__parameters__'):
                 params = annotation.__parameters__
             if params is not None:
@@ -299,7 +307,9 @@
                 hasattr(annotation, '__args__') and \
                 hasattr(annotation, '__result__'):
             args = annotation.__args__
-            if args is Ellipsis:
+            if args is None:
+                return qualified_name
+            elif args is Ellipsis:
                 args_str = '...'
             else:
                 formatted_args = (format_annotation(a) for a in args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/ext/imgmath.py 
new/Sphinx-1.4.9/sphinx/ext/imgmath.py
--- old/Sphinx-1.4.8/sphinx/ext/imgmath.py      2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/ext/imgmath.py      2016-11-23 15:06:39.000000000 
+0100
@@ -245,10 +245,11 @@
     try:
         fname, depth = render_math(self, latex)
     except MathExtError as exc:
-        sm = nodes.system_message(str(exc), type='WARNING', level=2,
+        msg = text_type(exc)
+        sm = nodes.system_message(msg, type='WARNING', level=2,
                                   backrefs=[], source=node['latex'])
         sm.walkabout(self)
-        self.builder.warn('inline latex %r: ' % node['latex'] + str(exc))
+        self.builder.warn('inline latex %r: ' % node['latex'] + msg)
         raise nodes.SkipNode
     self.body.append(self.starttag(node, 'div', CLASS='math'))
     self.body.append('<p>')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/ext/inheritance_diagram.py 
new/Sphinx-1.4.9/sphinx/ext/inheritance_diagram.py
--- old/Sphinx-1.4.8/sphinx/ext/inheritance_diagram.py  2016-10-01 
17:14:37.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/ext/inheritance_diagram.py  2016-11-23 
15:06:39.000000000 +0100
@@ -58,9 +58,61 @@
 from sphinx.util.compat import Directive
 
 
-class_sig_re = re.compile(r'''^([\w.]*\.)?    # module names
-                          (\w+)  \s* $        # class/final module name
-                          ''', re.VERBOSE)
+module_sig_re = re.compile(r'''^(?:([\w.]*)\.)?  # module names
+                           (\w+)  \s* $          # class/final module name
+                           ''', re.VERBOSE)
+
+
+def try_import(objname):
+    """Import a object or module using *name* and *currentmodule*.
+    *name* should be a relative name from *currentmodule* or
+    a fully-qualified name.
+
+    Returns imported object or module.  If failed, returns None value.
+    """
+    try:
+        __import__(objname)
+        return sys.modules.get(objname)
+    except ImportError:
+        modname, attrname = module_sig_re.match(objname).groups()
+        if modname is None:
+            return None
+        try:
+            __import__(modname)
+            return getattr(sys.modules.get(modname), attrname, None)
+        except ImportError:
+            return None
+
+
+def import_classes(name, currmodule):
+    """Import a class using its fully-qualified *name*."""
+    target = None
+
+    # import class or module using currmodule
+    if currmodule:
+        target = try_import(currmodule + '.' + name)
+
+    # import class or module without currmodule
+    if target is None:
+        target = try_import(name)
+
+    if target is None:
+        raise InheritanceException(
+            'Could not import class or module %r specified for '
+            'inheritance diagram' % name)
+
+    if inspect.isclass(target):
+        # If imported object is a class, just return it
+        return [target]
+    elif inspect.ismodule(target):
+        # If imported object is a module, return classes defined on it
+        classes = []
+        for cls in target.__dict__.values():
+            if inspect.isclass(cls) and cls.__module__ == target.__name__:
+                classes.append(cls)
+        return classes
+    raise InheritanceException('%r specified for inheritance diagram is '
+                               'not a class or module' % name)
 
 
 class InheritanceException(Exception):
@@ -88,56 +140,11 @@
             raise InheritanceException('No classes found for '
                                        'inheritance diagram')
 
-    def _import_class_or_module(self, name, currmodule):
-        """Import a class using its fully-qualified *name*."""
-        try:
-            path, base = class_sig_re.match(name).groups()
-        except (AttributeError, ValueError):
-            raise InheritanceException('Invalid class or module %r specified '
-                                       'for inheritance diagram' % name)
-
-        fullname = (path or '') + base
-        path = (path and path.rstrip('.') or '')
-
-        # two possibilities: either it is a module, then import it
-        try:
-            __import__(fullname)
-            todoc = sys.modules[fullname]
-        except ImportError:
-            # else it is a class, then import the module
-            if not path:
-                if currmodule:
-                    # try the current module
-                    path = currmodule
-                else:
-                    raise InheritanceException(
-                        'Could not import class %r specified for '
-                        'inheritance diagram' % base)
-            try:
-                __import__(path)
-                todoc = getattr(sys.modules[path], base)
-            except (ImportError, AttributeError):
-                raise InheritanceException(
-                    'Could not import class or module %r specified for '
-                    'inheritance diagram' % (path + '.' + base))
-
-        # If a class, just return it
-        if inspect.isclass(todoc):
-            return [todoc]
-        elif inspect.ismodule(todoc):
-            classes = []
-            for cls in todoc.__dict__.values():
-                if inspect.isclass(cls) and cls.__module__ == todoc.__name__:
-                    classes.append(cls)
-            return classes
-        raise InheritanceException('%r specified for inheritance diagram is '
-                                   'not a class or module' % name)
-
     def _import_classes(self, class_names, currmodule):
         """Import a list of classes."""
         classes = []
         for name in class_names:
-            classes.extend(self._import_class_or_module(name, currmodule))
+            classes.extend(import_classes(name, currmodule))
         return classes
 
     def _class_info(self, classes, show_builtins, private_bases, parts):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/ext/pngmath.py 
new/Sphinx-1.4.9/sphinx/ext/pngmath.py
--- old/Sphinx-1.4.8/sphinx/ext/pngmath.py      2016-09-21 03:46:45.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/ext/pngmath.py      2016-11-23 14:34:53.000000000 
+0100
@@ -218,10 +218,11 @@
     try:
         fname, depth = render_math(self, latex)
     except MathExtError as exc:
-        sm = nodes.system_message(str(exc), type='WARNING', level=2,
+        msg = text_type(exc)
+        sm = nodes.system_message(msg, type='WARNING', level=2,
                                   backrefs=[], source=node['latex'])
         sm.walkabout(self)
-        self.builder.warn('inline latex %r: ' % node['latex'] + str(exc))
+        self.builder.warn('inline latex %r: ' % node['latex'] + msg)
         raise nodes.SkipNode
     self.body.append(self.starttag(node, 'div', CLASS='math'))
     self.body.append('<p>')
Files old/Sphinx-1.4.8/sphinx/locale/.DS_Store and 
new/Sphinx-1.4.9/sphinx/locale/.DS_Store differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/locale/__init__.py 
new/Sphinx-1.4.9/sphinx/locale/__init__.py
--- old/Sphinx-1.4.8/sphinx/locale/__init__.py  2016-09-26 13:21:55.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/locale/__init__.py  2016-11-23 14:34:53.000000000 
+0100
@@ -152,6 +152,7 @@
     #     return string
     return _TranslationProxy(mygettext, string)
 
+
 l_ = lazy_gettext
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/locale/fr/LC_MESSAGES/sphinx.po 
new/Sphinx-1.4.9/sphinx/locale/fr/LC_MESSAGES/sphinx.po
--- old/Sphinx-1.4.8/sphinx/locale/fr/LC_MESSAGES/sphinx.po     2016-09-29 
08:19:30.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/locale/fr/LC_MESSAGES/sphinx.po     2016-11-23 
14:34:54.000000000 +0100
@@ -112,7 +112,7 @@
 
 #: sphinx/directives/other.py:153
 msgid "Code author: "
-msgstr "Auteur du code :"
+msgstr "Auteur du code : "
 
 #: sphinx/directives/other.py:155
 msgid "Author: "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/locale/it/LC_MESSAGES/sphinx.po 
new/Sphinx-1.4.9/sphinx/locale/it/LC_MESSAGES/sphinx.po
--- old/Sphinx-1.4.8/sphinx/locale/it/LC_MESSAGES/sphinx.po     2016-09-29 
08:19:30.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/locale/it/LC_MESSAGES/sphinx.po     2016-11-23 
14:34:54.000000000 +0100
@@ -819,7 +819,7 @@
 
 #: sphinx/themes/basic/static/searchtools.js_t:338
 msgid ", in "
-msgstr ", in"
+msgstr ", in "
 
 #: sphinx/themes/classic/static/sidebar.js_t:83
 msgid "Expand sidebar"
Files old/Sphinx-1.4.8/sphinx/pycode/Grammar-py2-sphinx1.2.pickle and 
new/Sphinx-1.4.9/sphinx/pycode/Grammar-py2-sphinx1.2.pickle differ
Files old/Sphinx-1.4.8/sphinx/pycode/Grammar-py2-sphinx1.3.pickle and 
new/Sphinx-1.4.9/sphinx/pycode/Grammar-py2-sphinx1.3.pickle differ
Files old/Sphinx-1.4.8/sphinx/pycode/Grammar-py2-sphinx1.4.pickle and 
new/Sphinx-1.4.9/sphinx/pycode/Grammar-py2-sphinx1.4.pickle differ
Files old/Sphinx-1.4.8/sphinx/pycode/Grammar-py2-sphinx1.5.pickle and 
new/Sphinx-1.4.9/sphinx/pycode/Grammar-py2-sphinx1.5.pickle differ
Files old/Sphinx-1.4.8/sphinx/pycode/Grammar-py3-sphinx1.4.pickle and 
new/Sphinx-1.4.9/sphinx/pycode/Grammar-py3-sphinx1.4.pickle differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/pycode/__init__.py 
new/Sphinx-1.4.9/sphinx/pycode/__init__.py
--- old/Sphinx-1.4.8/sphinx/pycode/__init__.py  2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/pycode/__init__.py  2016-11-23 15:06:39.000000000 
+0100
@@ -35,6 +35,8 @@
 # an object with attributes corresponding to token and symbol names
 class sym:
     pass
+
+
 for k, v in iteritems(pygrammar.symbol2number):
     setattr(sym, k, v)
 for k, v in iteritems(token.tok_name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/quickstart.py 
new/Sphinx-1.4.9/sphinx/quickstart.py
--- old/Sphinx-1.4.8/sphinx/quickstart.py       2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/quickstart.py       2016-11-23 15:06:39.000000000 
+0100
@@ -1516,6 +1516,7 @@
         print(msg, file=sys.stderr)
         print(file=sys.stderr)
 
+
 USAGE = """\
 Sphinx v%s
 Usage: %%prog [options] [projectdir]
@@ -1681,5 +1682,6 @@
 
     generate(d)
 
+
 if __name__ == '__main__':
     sys.exit(main(sys.argv))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/search/__init__.py 
new/Sphinx-1.4.9/sphinx/search/__init__.py
--- old/Sphinx-1.4.8/sphinx/search/__init__.py  2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/search/__init__.py  2016-11-23 15:06:39.000000000 
+0100
@@ -17,7 +17,7 @@
 
 from sphinx.util import jsdump, rpartition
 from sphinx.util.pycompat import htmlescape
-
+from sphinx.search.jssplitter import splitter_code
 
 class SearchLanguage(object):
     """
@@ -241,6 +241,7 @@
                 self.js_scorer_code = fp.read().decode('utf-8')
         else:
             self.js_scorer_code = u''
+        self.js_splitter_code = splitter_code
 
     def load(self, stream, format):
         """Reconstruct from frozen data."""
@@ -381,6 +382,7 @@
             search_language_stemming_code = self.lang.js_stemmer_code,
             search_language_stop_words = 
jsdump.dumps(sorted(self.lang.stopwords)),
             search_scorer_tool = self.js_scorer_code,
+            search_word_splitter_code = self.js_splitter_code,
         )
 
     def get_js_stemmer_rawcode(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/search/jssplitter.py 
new/Sphinx-1.4.9/sphinx/search/jssplitter.py
--- old/Sphinx-1.4.8/sphinx/search/jssplitter.py        1970-01-01 
01:00:00.000000000 +0100
+++ new/Sphinx-1.4.9/sphinx/search/jssplitter.py        2016-11-23 
15:07:38.000000000 +0100
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+"""
+    sphinx.search.jssplitter
+    ~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Provides Python compatible word splitter to JavaScript
+
+    DO NOT EDIT. This is generated by utils/jssplitter_generator.py
+
+    :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+splitter_code = """
+
+var splitChars = (function() {
+    var result = {};
+    var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 
1014, 1648,
+         1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 
2702,
+         2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 
2971,
+         2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 
3345,
+         3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 
3761,
+         3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 
4823,
+         4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 
8125,
+         8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 
11695,
+         11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 
43587,
+         43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
+    var i, j, start, end;
+    for (i = 0; i < singles.length; i++) {
+        result[singles[i]] = true;
+    }
+    var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 
184], [706, 709],
+         [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 
1161],
+         [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], 
[1523, 1568],
+         [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], 
[1792, 1807],
+         [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], 
[2043, 2047],
+         [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], 
[2366, 2383],
+         [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], 
[2449, 2450],
+         [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], 
[2546, 2547],
+         [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], 
[2672, 2673],
+         [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], 
[2800, 2820],
+         [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], 
[2930, 2946],
+         [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], 
[3002, 3023],
+         [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], 
[3170, 3173],
+         [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], 
[3312, 3332],
+         [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], 
[3479, 3481],
+         [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], 
[3717, 3718],
+         [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], 
[3783, 3791],
+         [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], 
[3980, 4095],
+         [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], 
[4199, 4205],
+         [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], 
[4686, 4687],
+         [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], 
[4955, 4968],
+         [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], 
[5867, 5869],
+         [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], 
[6068, 6102],
+         [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], 
[6264, 6271],
+         [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], 
[6572, 6592],
+         [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], 
[6810, 6822],
+         [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], 
[7098, 7167],
+         [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], 
[7958, 7959],
+         [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], 
[8141, 8143],
+         [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], 
[8314, 8318],
+         [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], 
[8478, 8483],
+         [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], 
[9472, 10101],
+         [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], 
[11558, 11567],
+         [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], 
[11824, 12292],
+         [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], 
[12439, 12444],
+         [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], 
[12728, 12783],
+         [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], 
[12992, 13311],
+         [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], 
[42509, 42511],
+         [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], 
[42736, 42774],
+         [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], 
[43062, 43071],
+         [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], 
[43260, 43263],
+         [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], 
[43482, 43519],
+         [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], 
[43643, 43647],
+         [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], 
[43742, 43967],
+         [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], 
[55292, 55295],
+         [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], 
[64263, 64274],
+         [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], 
[64968, 65007],
+         [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], 
[65371, 65381],
+         [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
+    for (i = 0; i < ranges.length; i++) {
+        start = ranges[i][0];
+        end = ranges[i][1];
+        for (j = start; j <= end; j++) {
+            result[j] = true;
+        }
+    }
+    return result;
+})();
+
+function splitQuery(query) {
+    var result = [];
+    var start = -1;
+    for (var i = 0; i < query.length; i++) {
+        if (splitChars[query.charCodeAt(i)]) {
+            if (start !== -1) {
+                result.push(query.slice(start, i));
+                start = -1;
+            }
+        } else if (start === -1) {
+            start = i;
+        }
+    }
+    if (start !== -1) {
+        result.push(query.slice(start));
+    }
+    return result;
+}
+
+"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Sphinx-1.4.8/sphinx/themes/basic/static/searchtools.js_t 
new/Sphinx-1.4.9/sphinx/themes/basic/static/searchtools.js_t
--- old/Sphinx-1.4.8/sphinx/themes/basic/static/searchtools.js_t        
2016-10-01 17:14:37.000000000 +0200
+++ new/Sphinx-1.4.9/sphinx/themes/basic/static/searchtools.js_t        
2016-11-23 15:06:39.000000000 +0100
@@ -47,6 +47,14 @@
 };
 {% endif %}
 
+{% if search_word_splitter_code %}
+{{ search_word_splitter_code }}
+{% else %}
+function splitQuery(query) {
+    return query.split(/\s+/);
+}
+{% endif %}
+
 /**
  * Search Module
  */
@@ -145,7 +153,7 @@
     var searchterms = [];
     var excluded = [];
     var hlterms = [];
-    var tmp = query.split(/\W+/);
+    var tmp = splitQuery(query);
     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.8/sphinx/transforms.py 
new/Sphinx-1.4.9/sphinx/transforms.py
--- old/Sphinx-1.4.8/sphinx/transforms.py       2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/transforms.py       2016-11-23 15:06:39.000000000 
+0100
@@ -166,7 +166,7 @@
 
     def apply(self):
         for n in self.document.traverse():
-            if isinstance(n, nodes.TextElement):
+            if isinstance(n, (nodes.TextElement, nodes.image)):
                 apply_source_workaround(n)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/util/__init__.py 
new/Sphinx-1.4.9/sphinx/util/__init__.py
--- old/Sphinx-1.4.8/sphinx/util/__init__.py    2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/util/__init__.py    2016-11-23 15:06:39.000000000 
+0100
@@ -212,6 +212,7 @@
         for file in files:
             copy_extra_file(os.path.join(root, file), reltargetdir)
 
+
 _DEBUG_HEADER = '''\
 # Sphinx version: %s
 # Python version: %s (%s)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/util/console.py 
new/Sphinx-1.4.9/sphinx/util/console.py
--- old/Sphinx-1.4.8/sphinx/util/console.py     2016-09-21 03:46:46.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/util/console.py     2016-11-23 14:34:54.000000000 
+0100
@@ -90,6 +90,7 @@
         return colorize(name, text)
     globals()[name] = inner
 
+
 _attrs = {
     'reset':     '39;49;00m',
     'bold':      '01m',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/util/i18n.py 
new/Sphinx-1.4.9/sphinx/util/i18n.py
--- old/Sphinx-1.4.8/sphinx/util/i18n.py        2016-09-21 03:46:46.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/util/i18n.py        2016-11-23 15:06:39.000000000 
+0100
@@ -125,6 +125,7 @@
 
     return catalogs
 
+
 # date_format mappings: ustrftime() to bable.dates.format_datetime()
 date_format_mappings = {
     '%a': 'EEE',     # Weekday as locale’s abbreviated name.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/util/nodes.py 
new/Sphinx-1.4.9/sphinx/util/nodes.py
--- old/Sphinx-1.4.8/sphinx/util/nodes.py       2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/util/nodes.py       2016-11-23 15:06:39.000000000 
+0100
@@ -46,6 +46,8 @@
         node.source = definition_list_item.source
         node.line = definition_list_item.line - 1
         node.rawsource = node.astext()  # set 'classifier1' (or 'classifier2')
+    if isinstance(node, nodes.image) and node.source is None:
+        node.source, node.line = node.parent.source, node.parent.line
     if isinstance(node, nodes.term):
         # strip classifier from rawsource of term
         for classifier in reversed(node.parent.traverse(nodes.classifier)):
@@ -69,6 +71,7 @@
             nodes.title,
             nodes.rubric,
             nodes.line,
+            nodes.image,
     ))):
         node.source = find_source_node(node)
         node.line = 0  # need fix docutils to get `node.line`
@@ -302,4 +305,5 @@
         newnode.line = self.line
     return newnode
 
+
 nodes.Element.copy = _new_copy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/util/pycompat.py 
new/Sphinx-1.4.9/sphinx/util/pycompat.py
--- old/Sphinx-1.4.8/sphinx/util/pycompat.py    2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/util/pycompat.py    2016-11-23 15:06:39.000000000 
+0100
@@ -147,6 +147,7 @@
             return self._deprecated[attr]
         return getattr(self._mod, attr)
 
+
 sys.modules[__name__] = _DeprecationWrapper(sys.modules[__name__], dict(
     zip_longest = zip_longest,
     product = product,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/util/smartypants.py 
new/Sphinx-1.4.9/sphinx/util/smartypants.py
--- old/Sphinx-1.4.8/sphinx/util/smartypants.py 2016-09-21 03:46:46.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/util/smartypants.py 2016-11-23 14:34:54.000000000 
+0100
@@ -81,8 +81,8 @@
     t = t.replace('"', '&quot;')
     return t
 
-# Constants for quote education.
 
+# Constants for quote education.
 punct_class = r"""[!"#\$\%'()*+,-.\/:;<=>?\@\[\\\]\^_`{|}~]"""
 end_of_word_class = r"""[\s.,;:!?)]"""
 close_class = r"""[^\ \t\r\n\[\{\(\-]"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/sphinx/writers/latex.py 
new/Sphinx-1.4.9/sphinx/writers/latex.py
--- old/Sphinx-1.4.8/sphinx/writers/latex.py    2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/sphinx/writers/latex.py    2016-11-23 15:06:39.000000000 
+0100
@@ -765,36 +765,36 @@
         if isinstance(parent, addnodes.seealso):
             # the environment already handles this
             raise nodes.SkipNode
-        elif self.this_is_the_title:
-            if len(node.children) != 1 and not isinstance(node.children[0],
-                                                          nodes.Text):
-                self.builder.warn('document title is not a single Text node',
-                                  (self.curfilestack[-1], node.line))
-            if not self.elements['title']:
-                # text needs to be escaped since it is inserted into
-                # the output literally
-                self.elements['title'] = 
node.astext().translate(tex_escape_map)
-            self.this_is_the_title = 0
-            raise nodes.SkipNode
         elif isinstance(parent, nodes.section):
-            short = ''
-            if node.traverse(nodes.image):
-                short = ('[%s]' %
-                         u' 
'.join(clean_astext(node).split()).translate(tex_escape_map))
-
-            try:
-                self.body.append(r'\%s%s{' % 
(self.sectionnames[self.sectionlevel], short))
-            except IndexError:
-                # just use "subparagraph", it's not numbered anyway
-                self.body.append(r'\%s%s{' % (self.sectionnames[-1], short))
-            self.context.append('}\n')
+            if self.this_is_the_title:
+                if len(node.children) != 1 and not isinstance(node.children[0],
+                                                              nodes.Text):
+                    self.builder.warn('document title is not a single Text 
node',
+                                      (self.curfilestack[-1], node.line))
+                if not self.elements['title']:
+                    # text needs to be escaped since it is inserted into
+                    # the output literally
+                    self.elements['title'] = 
node.astext().translate(tex_escape_map)
+                self.this_is_the_title = 0
+                raise nodes.SkipNode
+            else:
+                short = ''
+                if node.traverse(nodes.image):
+                    short = ('[%s]' %
+                             u' 
'.join(clean_astext(node).split()).translate(tex_escape_map))
 
-            self.restrict_footnote(node)
-            if self.next_section_ids:
-                for id in self.next_section_ids:
-                    self.context[-1] += self.hypertarget(id, anchor=False)
-                self.next_section_ids.clear()
+                try:
+                    self.body.append(r'\%s%s{' % 
(self.sectionnames[self.sectionlevel], short))
+                except IndexError:
+                    # just use "subparagraph", it's not numbered anyway
+                    self.body.append(r'\%s%s{' % (self.sectionnames[-1], 
short))
+                self.context.append('}\n')
 
+                self.restrict_footnote(node)
+                if self.next_section_ids:
+                    for id in self.next_section_ids:
+                        self.context[-1] += self.hypertarget(id, anchor=False)
+                    self.next_section_ids.clear()
         elif isinstance(parent, (nodes.topic, nodes.sidebar)):
             self.body.append(r'\textbf{')
             self.context.append('}\n\n\medskip\n\n')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Sphinx-1.4.8/tests/roots/test-ext-inheritance_diagram/example/__init__.py 
new/Sphinx-1.4.9/tests/roots/test-ext-inheritance_diagram/example/__init__.py
--- 
old/Sphinx-1.4.8/tests/roots/test-ext-inheritance_diagram/example/__init__.py   
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/Sphinx-1.4.9/tests/roots/test-ext-inheritance_diagram/example/__init__.py   
    2016-11-23 14:34:54.000000000 +0100
@@ -0,0 +1 @@
+# example.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Sphinx-1.4.8/tests/roots/test-ext-inheritance_diagram/example/sphinx.py 
new/Sphinx-1.4.9/tests/roots/test-ext-inheritance_diagram/example/sphinx.py
--- old/Sphinx-1.4.8/tests/roots/test-ext-inheritance_diagram/example/sphinx.py 
1970-01-01 01:00:00.000000000 +0100
+++ new/Sphinx-1.4.9/tests/roots/test-ext-inheritance_diagram/example/sphinx.py 
2016-11-23 14:34:54.000000000 +0100
@@ -0,0 +1,5 @@
+# example.sphinx
+
+
+class DummyClass(object):
+    pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/roots/test-intl/figure.po 
new/Sphinx-1.4.9/tests/roots/test-intl/figure.po
--- old/Sphinx-1.4.8/tests/roots/test-intl/figure.po    2016-09-21 
03:46:46.000000000 +0200
+++ new/Sphinx-1.4.9/tests/roots/test-intl/figure.po    2016-11-23 
14:34:54.000000000 +0100
@@ -50,3 +50,10 @@
 msgstr ""
 ".. image:: img.png\n"
 "   :alt: I18N -> IMG"
+
+msgid "image on substitution"
+msgstr "IMAGE ON SUBSTITUTION"
+
+msgid "image under note"
+msgstr "IMAGE UNDER NOTE"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/roots/test-intl/figure.txt 
new/Sphinx-1.4.9/tests/roots/test-intl/figure.txt
--- old/Sphinx-1.4.8/tests/roots/test-intl/figure.txt   2016-09-21 
03:46:46.000000000 +0200
+++ new/Sphinx-1.4.9/tests/roots/test-intl/figure.txt   2016-11-23 
14:34:54.000000000 +0100
@@ -34,3 +34,20 @@
 .. figure:: img.png
    :alt: img
 
+
+image on substitution
+---------------------
+
+.. |sub image| image:: i18n.png
+
+image under note
+-----------------
+
+.. note::
+
+   .. image:: i18n.png
+      :alt: i18n under note
+
+   .. figure:: img.png
+      :alt: img under note
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/roots/test-latex-title/conf.py 
new/Sphinx-1.4.9/tests/roots/test-latex-title/conf.py
--- old/Sphinx-1.4.8/tests/roots/test-latex-title/conf.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/Sphinx-1.4.9/tests/roots/test-latex-title/conf.py       2016-11-23 
14:34:54.000000000 +0100
@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+
+master_doc = 'index'
+
+# set empty string to the third column to use the first section title to 
document title
+latex_documents = [
+    (master_doc, 'test.tex', '', 'Sphinx', 'report')
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/roots/test-latex-title/index.rst 
new/Sphinx-1.4.9/tests/roots/test-latex-title/index.rst
--- old/Sphinx-1.4.8/tests/roots/test-latex-title/index.rst     1970-01-01 
01:00:00.000000000 +0100
+++ new/Sphinx-1.4.9/tests/roots/test-latex-title/index.rst     2016-11-23 
14:34:54.000000000 +0100
@@ -0,0 +1,12 @@
+.. admonition:: Notice
+
+   This generates nodes.title node before first section title.
+
+test-latex-title
+================
+
+.. toctree::
+   :numbered:
+
+   foo
+   bar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/test_autodoc.py 
new/Sphinx-1.4.9/tests/test_autodoc.py
--- old/Sphinx-1.4.8/tests/test_autodoc.py      2016-09-21 03:46:46.000000000 
+0200
+++ new/Sphinx-1.4.9/tests/test_autodoc.py      2016-11-23 15:06:39.000000000 
+0100
@@ -1025,7 +1025,7 @@
     from sphinx.util.inspect import getargspec
 
     try:
-        from typing_test_data import f0, f1, f2, f3, f4, f5, f6, f7, f8, f9
+        from typing_test_data import f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, 
f10
     except (ImportError, SyntaxError):
         raise SkipTest('Cannot import Python code with function annotations')
 
@@ -1057,10 +1057,11 @@
 
     # Callable types
     verify_arg_spec(f7, '(x: typing.Callable[[int, str], int]) -> None')
+    verify_arg_spec(f8, '(x: typing.Callable) -> None')
 
     # Tuple types
-    verify_arg_spec(f8, '(x: typing.Tuple[int, str],'
+    verify_arg_spec(f9, '(x: typing.Tuple[int, str],'
                         ' y: typing.Tuple[int, ...]) -> None')
 
     # Instance annotations
-    verify_arg_spec(f9, '(x: CustomAnnotation, y: 123) -> None')
+    verify_arg_spec(f10, '(x: CustomAnnotation, y: 123) -> None')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/test_build_latex.py 
new/Sphinx-1.4.9/tests/test_build_latex.py
--- old/Sphinx-1.4.8/tests/test_build_latex.py  2016-10-01 17:14:37.000000000 
+0200
+++ new/Sphinx-1.4.9/tests/test_build_latex.py  2016-11-23 15:06:39.000000000 
+0100
@@ -181,6 +181,26 @@
         '--- Got:\n' + warnings
 
 
+@with_app(buildername='latex', testroot='basic')
+def test_latex_title(app, status, warning):
+    app.builder.build_all()
+    result = (app.outdir / 'test.tex').text(encoding='utf8')
+    print(result)
+    print(status.getvalue())
+    print(warning.getvalue())
+    assert '\\title{The basic Sphinx documentation for testing}' in result
+
+
+@with_app(buildername='latex', testroot='latex-title')
+def test_latex_title_after_admonitions(app, status, warning):
+    app.builder.build_all()
+    result = (app.outdir / 'test.tex').text(encoding='utf8')
+    print(result)
+    print(status.getvalue())
+    print(warning.getvalue())
+    assert '\\title{test-latex-title}' in result
+
+
 @with_app(buildername='latex', testroot='numfig',
           confoverrides={'numfig': True})
 def test_numref(app, status, warning):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/test_ext_inheritance_diagram.py 
new/Sphinx-1.4.9/tests/test_ext_inheritance_diagram.py
--- old/Sphinx-1.4.8/tests/test_ext_inheritance_diagram.py      2016-10-01 
17:14:37.000000000 +0200
+++ new/Sphinx-1.4.9/tests/test_ext_inheritance_diagram.py      2016-11-23 
15:06:39.000000000 +0100
@@ -9,9 +9,56 @@
     :license: BSD, see LICENSE for details.
 """
 
-from util import with_app
+import sys
+from util import with_app, rootdir, raises
+from sphinx.ext.inheritance_diagram import InheritanceException, import_classes
 
 
 @with_app('html', testroot='ext-inheritance_diagram')
 def test_inheritance_diagram_html(app, status, warning):
     app.builder.build_all()
+
+
+def test_import_classes():
+    from sphinx.application import Sphinx, TemplateBridge
+    from sphinx.util.i18n import CatalogInfo
+
+    try:
+        sys.path.append(rootdir / 'roots/test-ext-inheritance_diagram')
+        from example.sphinx import DummyClass
+
+        # got exception for unknown class or module
+        raises(InheritanceException, import_classes, 'unknown', None)
+        raises(InheritanceException, import_classes, 'unknown.Unknown', None)
+
+        # a module having no classes
+        classes = import_classes('sphinx', None)
+        assert classes == []
+
+        classes = import_classes('sphinx', 'foo')
+        assert classes == []
+
+        # all of classes in the module
+        classes = import_classes('sphinx.application', None)
+        assert set(classes) == set([Sphinx, TemplateBridge])
+
+        # specified class in the module
+        classes = import_classes('sphinx.application.Sphinx', None)
+        assert classes == [Sphinx]
+
+        # specified class in current module
+        classes = import_classes('Sphinx', 'sphinx.application')
+        assert classes == [Sphinx]
+
+        # relative module name to current module
+        classes = import_classes('i18n.CatalogInfo', 'sphinx.util')
+        assert classes == [CatalogInfo]
+
+        # got exception for functions
+        raises(InheritanceException, import_classes, 'encode_uri', 
'sphinx.util')
+
+        # import submodule on current module (refs: #3164)
+        classes = import_classes('sphinx', 'example')
+        assert classes == [DummyClass]
+    finally:
+        sys.path.pop()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/test_intl.py 
new/Sphinx-1.4.9/tests/test_intl.py
--- old/Sphinx-1.4.8/tests/test_intl.py 2016-10-01 17:14:37.000000000 +0200
+++ new/Sphinx-1.4.9/tests/test_intl.py 2016-11-23 15:06:39.000000000 +0100
@@ -261,6 +261,18 @@
               u"[image: i18n][image]\n"
               u"\n"
               u"   [image: img][image]\n"
+              u"\n"
+              u"\n"
+              u"IMAGE ON SUBSTITUTION\n"
+              u"=====================\n"
+              u"\n"
+              u"\n"
+              u"IMAGE UNDER NOTE\n"
+              u"================\n"
+              u"\n"
+              u"Note: [image: i18n under note][image]\n"
+              u"\n"
+              u"     [image: img under note][image]\n"
               )
     yield assert_equal, result, expect
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/tests/typing_test_data.py 
new/Sphinx-1.4.9/tests/typing_test_data.py
--- old/Sphinx-1.4.8/tests/typing_test_data.py  2016-09-21 03:46:46.000000000 
+0200
+++ new/Sphinx-1.4.9/tests/typing_test_data.py  2016-11-23 15:06:39.000000000 
+0100
@@ -44,7 +44,11 @@
     pass
 
 
-def f8(x: Tuple[int, str], y: Tuple[int, ...]) -> None:
+def f8(x: Callable) -> None:
+    pass
+
+
+def f9(x: Tuple[int, str], y: Tuple[int, ...]) -> None:
     pass
 
 
@@ -52,5 +56,6 @@
     def __repr__(self):
         return 'CustomAnnotation'
 
-def f9(x: CustomAnnotation(), y: 123) -> None:
+
+def f10(x: CustomAnnotation(), y: 123) -> None:
     pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/utils/jssplitter_generator.py 
new/Sphinx-1.4.9/utils/jssplitter_generator.py
--- old/Sphinx-1.4.8/utils/jssplitter_generator.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/Sphinx-1.4.9/utils/jssplitter_generator.py      2016-11-23 
15:07:38.000000000 +0100
@@ -0,0 +1,142 @@
+# -*- coding: utf-8 -*-
+import re
+import json
+import subprocess
+import sys
+import six
+
+# find char codes they are matched with Python's \\w(?u)
+
+match = re.compile(r'\w(?u)')
+begin = -1
+
+ranges = []
+singles = []
+
+for i in range(65536):
+    # 0xd800-0xdfff is surrogate pair area. skip this.
+    if not match.match(six.unichr(i)) and not (0xd800 <= i <= 0xdfff):
+        if begin == -1:
+            begin = i
+    elif begin != -1:
+        if begin + 1 == i:
+            singles.append(begin)
+        else:
+            ranges.append((begin, i - 1))
+        begin = -1
+
+
+# fold json within almost 80 chars per line
+def fold(jsonData, splitter):
+    code = json.dumps(jsonData)
+    lines = []
+    while True:
+        if len(code) < 71:
+            lines.append('        ' + code)
+            break
+        index = code.index(splitter, 70)
+        lines.append('        ' + code[:index+len(splitter)])
+        code = code[index+len(splitter):]
+    lines[0] = lines[0][8:]
+    return '\n'.join(lines)
+
+
+# JavaScript code
+js_src = '''
+var splitChars = (function() {
+    var result = {};
+    var singles = %s;
+    var i, j, start, end;
+    for (i = 0; i < singles.length; i++) {
+        result[singles[i]] = true;
+    }
+    var ranges = %s;
+    for (i = 0; i < ranges.length; i++) {
+        start = ranges[i][0];
+        end = ranges[i][1];
+        for (j = start; j <= end; j++) {
+            result[j] = true;
+        }
+    }
+    return result;
+})();
+
+function splitQuery(query) {
+    var result = [];
+    var start = -1;
+    for (var i = 0; i < query.length; i++) {
+        if (splitChars[query.charCodeAt(i)]) {
+            if (start !== -1) {
+                result.push(query.slice(start, i));
+                start = -1;
+            }
+        } else if (start === -1) {
+            start = i;
+        }
+    }
+    if (start !== -1) {
+        result.push(query.slice(start));
+    }
+    return result;
+}
+''' % (fold(singles, ','), fold(ranges, '],'))
+
+js_test_src = u'''
+// This is regression test for https://github.com/sphinx-doc/sphinx/issues/3150
+// generated by compat_regexp_generator.py
+// it needs node.js for testing
+var assert = require('assert');
+
+%s
+
+console.log("test splitting English words")
+assert.deepEqual(['Hello', 'World'], splitQuery('   Hello    World   '));
+console.log('   ... ok\\n')
+
+console.log("test splitting special characters")
+assert.deepEqual(['Pin', 'Code'], splitQuery('Pin-Code'));
+console.log('   ... ok\\n')
+
+console.log("test splitting Chinese characters")
+assert.deepEqual(['Hello', 'from', '中国', '上海'], splitQuery('Hello from 中国 
上海'));
+console.log('   ... ok\\n')
+
+console.log("test splitting Emoji(surrogate pair) characters. It should keep 
emojis.")
+assert.deepEqual(['😁😁'], splitQuery('😁😁'));
+console.log('   ... ok\\n')
+
+console.log("test splitting umlauts. It should keep umlauts.")
+assert.deepEqual(
+    ['Löschen', 'Prüfung', 'Abändern', 'ærlig', 'spørsmål'],
+    splitQuery('Löschen Prüfung Abändern ærlig spørsmål'));
+console.log('   ... ok\\n')
+
+''' % js_src
+
+python_src = '''# -*- coding: utf-8 -*-
+"""
+    sphinx.search.jssplitter
+    ~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Provides Python compatible word splitter to JavaScript
+
+    DO NOT EDIT. This is generated by utils/jssplitter_generator.py
+
+    :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
+"""
+
+splitter_code = """
+%s
+"""
+''' % js_src
+
+with open('../sphinx/search/jssplitter.py', 'w') as f:
+    f.write(python_src)
+
+with open('./regression_test.js', 'w') as f:
+    f.write(js_test_src.encode('utf-8'))
+
+print("starting test...")
+result = subprocess.call(['node', './regression_test.js'])
+sys.exit(result)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/utils/regression_test.js 
new/Sphinx-1.4.9/utils/regression_test.js
--- old/Sphinx-1.4.8/utils/regression_test.js   1970-01-01 01:00:00.000000000 
+0100
+++ new/Sphinx-1.4.9/utils/regression_test.js   2016-11-23 06:35:28.000000000 
+0100
@@ -0,0 +1,124 @@
+
+// This is regression test for https://github.com/sphinx-doc/sphinx/issues/3150
+// generated by compat_regexp_generator.py
+// it needs node.js for testing
+var assert = require('assert');
+
+
+var splitChars = (function() {
+    var result = {};
+    var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 
1014, 1648,
+         1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 
2702,
+         2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 
2971,
+         2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 
3345,
+         3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 
3761,
+         3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 
4823,
+         4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 
8125,
+         8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 
11695,
+         11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 
43587,
+         43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
+    var i, j, start, end;
+    for (i = 0; i < singles.length; i++) {
+        result[singles[i]] = true;
+    }
+    var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 
184], [706, 709],
+         [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 
1161],
+         [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], 
[1523, 1568],
+         [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], 
[1792, 1807],
+         [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], 
[2043, 2047],
+         [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], 
[2366, 2383],
+         [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], 
[2449, 2450],
+         [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], 
[2546, 2547],
+         [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], 
[2672, 2673],
+         [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], 
[2800, 2820],
+         [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], 
[2930, 2946],
+         [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], 
[3002, 3023],
+         [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], 
[3170, 3173],
+         [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], 
[3312, 3332],
+         [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], 
[3479, 3481],
+         [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], 
[3717, 3718],
+         [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], 
[3783, 3791],
+         [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], 
[3980, 4095],
+         [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], 
[4199, 4205],
+         [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], 
[4686, 4687],
+         [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], 
[4955, 4968],
+         [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], 
[5867, 5869],
+         [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], 
[6068, 6102],
+         [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], 
[6264, 6271],
+         [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], 
[6572, 6592],
+         [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], 
[6810, 6822],
+         [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], 
[7098, 7167],
+         [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], 
[7958, 7959],
+         [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], 
[8141, 8143],
+         [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], 
[8314, 8318],
+         [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], 
[8478, 8483],
+         [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], 
[9472, 10101],
+         [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], 
[11558, 11567],
+         [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], 
[11824, 12292],
+         [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], 
[12439, 12444],
+         [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], 
[12728, 12783],
+         [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], 
[12992, 13311],
+         [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], 
[42509, 42511],
+         [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], 
[42736, 42774],
+         [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], 
[43062, 43071],
+         [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], 
[43260, 43263],
+         [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], 
[43482, 43519],
+         [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], 
[43643, 43647],
+         [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], 
[43742, 43967],
+         [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], 
[55292, 55295],
+         [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], 
[64263, 64274],
+         [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], 
[64968, 65007],
+         [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], 
[65371, 65381],
+         [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
+    for (i = 0; i < ranges.length; i++) {
+        start = ranges[i][0];
+        end = ranges[i][1];
+        for (j = start; j <= end; j++) {
+            result[j] = true;
+        }
+    }
+    return result;
+})();
+
+function splitQuery(query) {
+    var result = [];
+    var start = -1;
+    for (var i = 0; i < query.length; i++) {
+        if (splitChars[query.charCodeAt(i)]) {
+            if (start !== -1) {
+                result.push(query.slice(start, i));
+                start = -1;
+            }
+        } else if (start === -1) {
+            start = i;
+        }
+    }
+    if (start !== -1) {
+        result.push(query.slice(start));
+    }
+    return result;
+}
+
+
+console.log("test splitting English words")
+assert.deepEqual(['Hello', 'World'], splitQuery('   Hello    World   '));
+console.log('   ... ok\n')
+
+console.log("test splitting special characters")
+assert.deepEqual(['Pin', 'Code'], splitQuery('Pin-Code'));
+console.log('   ... ok\n')
+
+console.log("test splitting Chinese characters")
+assert.deepEqual(['Hello', 'from', '中国', '上海'], splitQuery('Hello from 中国 
上海'));
+console.log('   ... ok\n')
+
+console.log("test splitting Emoji(surrogate pair) characters. It should keep 
emojis.")
+assert.deepEqual(['😁😁'], splitQuery('😁😁'));
+console.log('   ... ok\n')
+
+console.log("test splitting umlauts. It should keep umlauts.")
+assert.deepEqual(
+    ['Löschen', 'Prüfung', 'Abändern', 'ærlig', 'spørsmål'],
+    splitQuery('Löschen Prüfung Abändern ærlig spørsmål'));
+console.log('   ... ok\n')
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Sphinx-1.4.8/utils/reindent.py 
new/Sphinx-1.4.9/utils/reindent.py
--- old/Sphinx-1.4.8/utils/reindent.py  2016-10-01 17:14:37.000000000 +0200
+++ new/Sphinx-1.4.9/utils/reindent.py  2016-11-23 15:06:39.000000000 +0100
@@ -316,5 +316,6 @@
         i += 1
     return i
 
+
 if __name__ == '__main__':
     main()


Reply via email to