[Python-modules-commits] [sphinx] 01/13: Import sphinx_1.3.2.orig.tar.gz

Dmitry Shachnev mitya57 at moszumanska.debian.org
Mon Nov 30 15:35:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

mitya57 pushed a commit to branch master
in repository sphinx.

commit ded891849d330349aeb9f9f1ae21ab9f54460338
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Mon Nov 30 18:05:24 2015 +0300

    Import sphinx_1.3.2.orig.tar.gz
---
 CHANGES                                            |  78 +++
 PKG-INFO                                           |   2 +-
 Sphinx.egg-info/PKG-INFO                           |   2 +-
 Sphinx.egg-info/SOURCES.txt                        |  17 +
 Sphinx.egg-info/requires.txt                       |   4 +-
 doc/_templates/indexsidebar.html                   |   2 +-
 doc/builders.rst                                   |  38 ++
 doc/config.rst                                     |   2 +-
 doc/ext/graphviz.rst                               |   4 +
 doc/ext/ifconfig.rst                               |   4 +-
 doc/ext/todo.rst                                   |   4 +
 doc/extdev/tutorial.rst                            |   4 +-
 doc/install.rst                                    |   2 +-
 doc/make.bat                                       |  33 ++
 setup.py                                           |   4 +-
 sphinx/__init__.py                                 |   6 +-
 sphinx/apidoc.py                                   |   7 +-
 sphinx/application.py                              |  19 +-
 sphinx/builders/__init__.py                        |   9 +-
 sphinx/builders/html.py                            |   8 +-
 sphinx/builders/latex.py                           |  13 +-
 sphinx/builders/linkcheck.py                       |  12 +-
 sphinx/builders/manpage.py                         |   2 +-
 sphinx/builders/texinfo.py                         |   2 +-
 sphinx/builders/websupport.py                      |   2 +
 sphinx/cmdline.py                                  |   7 +-
 sphinx/directives/code.py                          |   9 -
 sphinx/directives/other.py                         |   9 +-
 sphinx/domains/std.py                              |   2 +-
 sphinx/environment.py                              |  12 +-
 sphinx/ext/autosummary/__init__.py                 |   2 +-
 sphinx/ext/coverage.py                             |   6 +-
 sphinx/ext/doctest.py                              |  60 +-
 sphinx/ext/intersphinx.py                          |   1 +
 sphinx/ext/napoleon/docstring.py                   | 114 ++--
 sphinx/ext/todo.py                                 |   9 +-
 sphinx/highlighting.py                             |  12 +-
 sphinx/locale/__init__.py                          |   5 +-
 sphinx/pycode/__init__.py                          |  17 +-
 sphinx/quickstart.py                               |   8 +-
 sphinx/search/__init__.py                          |  10 +
 sphinx/search/da.py                                |   1 +
 sphinx/search/de.py                                |   1 +
 sphinx/search/es.py                                |   1 +
 sphinx/search/fi.py                                |   1 +
 sphinx/search/fr.py                                |   1 +
 sphinx/search/hu.py                                |   1 +
 sphinx/search/it.py                                |   1 +
 sphinx/search/ja.py                                |   9 +-
 sphinx/search/nl.py                                |   1 +
 sphinx/search/no.py                                |   1 +
 sphinx/search/pt.py                                |   1 +
 sphinx/search/ro.py                                |   1 +
 sphinx/search/ru.py                                |   1 +
 sphinx/search/sv.py                                |   1 +
 sphinx/search/tr.py                                |   1 +
 sphinx/themes/basic/static/searchtools.js_t        |  46 +-
 sphinx/themes/default/static/default.css           |   1 +
 sphinx/theming.py                                  |  56 +-
 sphinx/transforms.py                               |  22 +-
 sphinx/util/docfields.py                           |   7 +-
 sphinx/util/i18n.py                                |  11 +-
 sphinx/util/nodes.py                               |  73 ++-
 sphinx/util/osutil.py                              |  11 +-
 sphinx/websupport/search/__init__.py               |   4 +
 sphinx/writers/html.py                             |   5 +-
 sphinx/writers/latex.py                            | 104 +++-
 sphinx/writers/text.py                             |  14 +-
 tests/root/footnote.txt                            |  15 +
 tests/root/markup.txt                              |   8 +-
 tests/roots/test-build-text/listitems.txt          |   4 +
 tests/roots/test-contentsname/bar.rst              |   4 +
 tests/roots/test-contentsname/conf.py              |   4 +
 tests/roots/test-contentsname/foo.rst              |   4 +
 tests/roots/test-contentsname/index.rst            |   8 +
 tests/roots/test-directive-code/empty.inc          |   3 +
 tests/roots/test-directive-code/lineno_match.rst   |   3 +
 tests/roots/test-directive-code/literal.inc        |   1 +
 tests/roots/test-doctest/doctest.txt               |   9 +
 .../base_themes_dir/base_theme1/theme.conf         |   2 +
 .../base_themes_dir/base_theme2/theme.conf         |   2 +
 tests/roots/test-double-inheriting-theme/conf.py   |   7 +
 tests/roots/test-double-inheriting-theme/index.rst |   3 +
 tests/roots/test-ext-graphviz/conf.py              |   4 +
 tests/roots/test-ext-graphviz/index.rst            |   7 +
 tests/roots/test-intl/contents.txt                 |   1 +
 tests/roots/test-intl/definition_terms.po          |  10 +
 tests/roots/test-intl/definition_terms.txt         |   3 +
 tests/roots/test-intl/refs.po                      |  85 +++
 tests/roots/test-intl/refs.txt                     |  47 ++
 tests/test_build_html.py                           |   8 +-
 tests/test_build_latex.py                          |  43 ++
 tests/test_build_text.py                           |  12 +
 tests/test_directive_code.py                       |  34 +-
 tests/test_ext_graphviz.py                         |  23 +
 tests/test_ext_napoleon_docstring.py               | 635 ++++++++++++++++++++-
 tests/test_intl.py                                 |  23 +-
 tests/test_markup.py                               |   2 +-
 tests/test_theming.py                              |  18 +-
 tests/test_util_i18n.py                            |   8 +-
 tests/test_util_nodes.py                           |  36 +-
 101 files changed, 1739 insertions(+), 277 deletions(-)

diff --git a/CHANGES b/CHANGES
index 666944a..2d11770 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,79 @@
+Release 1.3.2 (released Nov 29, 2015)
+=====================================
+
+Features added
+--------------
+
+* #1935: Make "numfig_format" overridable in latex_elements.
+
+Bugs fixed
+----------
+
+* #1976: Avoid "2.0" version of Babel because it doesn't work with Windows environment.
+* Add a "default.css" stylesheet (which imports "classic.css") for compatibility.
+* #1788: graphviz extension raises exception when caption option is present.
+* #1789: ``:pyobject:`` option of ``literalinclude`` directive includes following
+  lines after class definitions
+* #1790: ``literalinclude`` strips empty lines at the head and tail
+* #1802: load plugin themes automatically when theme.conf use it as 'inherit'. Thanks to
+  Takayuki Hirai.
+* #1794: custom theme extended from alabaster or sphinx_rtd_theme can't find base theme.
+* #1834: compatibility for docutils-0.13: handle_io_errors keyword argument for
+  docutils.io.FileInput cause TypeError.
+* #1823: '.' as <module_path> for sphinx-apidoc cause an unfriendly error. Now '.'
+  is converted to absolute path automatically.
+* Fix a crash when setting up extensions which do not support metadata.
+* #1784: Provide non-minified JS code in ``sphinx/search/*.py``
+* #1822, #1892: Fix regression for #1061. autosummary can't generate doc for imported
+  members since sphinx-1.3b3. Thanks to Eric Larson.
+* #1793, #1819: "see also" misses a linebreak in text output. Thanks to Takayuki Hirai.
+* #1780, #1866: "make text" shows "class" keyword twice. Thanks to Takayuki
+  Hirai.
+* #1871: Fix for LaTeX output of tables with one column and multirows.
+* Work around the lack of the HTMLParserError exception in Python 3.5.
+* #1949: Use ``safe_getattr`` in the coverage builder to avoid aborting with
+  descriptors that have custom behavior.
+* #1915: Do not generate smart quotes in doc field type annotations.
+* #1796: On py3, automated .mo building caused UnicodeDecodeError.
+* #1923: Use babel features only if the babel latex element is nonempty.
+* #1942: Fix a KeyError in websupport.
+* #1903: Fix strange id generation for glossary terms.
+* #1796, On py3, automated .mo building cause UnicodeDecodeError
+* Fix: ``make text`` will crush if a definition list item has more than 1 classifiers as:
+* #1796: On py3, automated .mo building cause UnicodeDecodeError
+* ``make text`` will crush if a definition list item has more than 1 classifiers as:
+* Fixed #1855: make gettext generates broken po file for definition lists with classifier.
+  ``term : classifier1 : classifier2``.
+* #1855: make gettext generates broken po file for definition lists with classifier.
+* #1869: Fix problems when dealing with files containing non-ASCII characters. Thanks to
+  Marvin Schmidt.
+* #1798: Fix building LaTeX with references in titles.
+* #1725: On py2 environment, doctest with using non-ASCII characters causes
+  ``'ascii' codec can't decode byte`` exception.
+* #1540: Fix RuntimeError with circular referenced toctree
+* #1983: i18n translation feature breaks references which uses section name.
+* #1990: Use caption of toctree to title of \tableofcontents in LaTeX
+* #1987: Fix ampersand is ignored in ``:menuselection:`` and ``:guilabel:`` on LaTeX builder
+* #1994: More supporting non-standard parser (like recommonmark parser) for Translation and
+  WebSupport feature. Now node.rawsource is fall backed to node.astext() during docutils
+  transforming.
+* On Py2 environment, conf.py that is generated by sphinx-quickstart should have u prefixed
+  config value for 'version' and 'release'.
+* #2102: On Windows + Py3, using ``|today|`` and non-ASCII date format will raise
+  UnicodeEncodeError.
+* #1974: UnboundLocalError: local variable 'domain' referenced before assignment when
+  using `any` role and `sphinx.ext.intersphinx` in same time.
+* #2121: multiple words search doesn't find pages when words across on the page title and
+  the page content.
+* #1884, #1885: plug-in html themes cannot inherit another plug-in theme. Thanks to
+  Suzumizaki.
+* #1818: `sphinx.ext.todo` directive generates broken html class attribute as
+  'admonition-' when :confval:`language` is specified with non-ASCII linguistic area like
+  'ru' or 'ja'. To fix this, now ``todo`` directive can use ```:class:`` option.
+* #2140: Fix footnotes in table has broken in LaTeX
+* #2127: MecabBinder for html searching feature doesn't work with Python 3.
+  Thanks to Tomoko Uchida.
+
 Release 1.3.1 (released Mar 17, 2015)
 =====================================
 
@@ -18,6 +94,7 @@ Bugs fixed
   Thanks to Jens Hedegaard Nielsen.
 * #1781: Setting `html_domain_indices` to a list raises a type check warnings.
 
+
 Release 1.3 (released Mar 10, 2015)
 ===================================
 
@@ -66,6 +143,7 @@ Documentation
 
 * #1651: Add ``vartype`` field descritpion for python domain.
 
+
 Release 1.3b3 (released Feb 24, 2015)
 =====================================
 
diff --git a/PKG-INFO b/PKG-INFO
index a6c8c16..f758643 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Sphinx
-Version: 1.3.1
+Version: 1.3.2
 Summary: Python documentation generator
 Home-page: http://sphinx-doc.org/
 Author: Georg Brandl
diff --git a/Sphinx.egg-info/PKG-INFO b/Sphinx.egg-info/PKG-INFO
index a6c8c16..f758643 100644
--- a/Sphinx.egg-info/PKG-INFO
+++ b/Sphinx.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Sphinx
-Version: 1.3.1
+Version: 1.3.2
 Summary: Python documentation generator
 Home-page: http://sphinx-doc.org/
 Author: Georg Brandl
diff --git a/Sphinx.egg-info/SOURCES.txt b/Sphinx.egg-info/SOURCES.txt
index f257ead..7570874 100644
--- a/Sphinx.egg-info/SOURCES.txt
+++ b/Sphinx.egg-info/SOURCES.txt
@@ -39,6 +39,7 @@ doc/installpython.jpg
 doc/intl.rst
 doc/intro.rst
 doc/invocation.rst
+doc/make.bat
 doc/more.png
 doc/pythonorg.png
 doc/rest.rst
@@ -396,6 +397,7 @@ sphinx/themes/classic/theme.conf
 sphinx/themes/classic/static/classic.css_t
 sphinx/themes/classic/static/sidebar.js_t
 sphinx/themes/default/theme.conf
+sphinx/themes/default/static/default.css
 sphinx/themes/epub/epub-cover.html
 sphinx/themes/epub/layout.html
 sphinx/themes/epub/theme.conf
@@ -508,6 +510,7 @@ tests/test_environment.py
 tests/test_ext_autosummary.py
 tests/test_ext_coverage.py
 tests/test_ext_doctest.py
+tests/test_ext_graphviz.py
 tests/test_ext_ifconfig.py
 tests/test_ext_intersphinx.py
 tests/test_ext_napoleon.py
@@ -602,6 +605,7 @@ tests/roots/test-autosummary/sphinx.rst
 tests/roots/test-build-text/conf.py
 tests/roots/test-build-text/contents.txt
 tests/roots/test-build-text/lineblock.txt
+tests/roots/test-build-text/listitems.txt
 tests/roots/test-build-text/maxwidth.txt
 tests/roots/test-build-text/nonascii_maxwidth.txt
 tests/roots/test-build-text/nonascii_table.txt
@@ -610,10 +614,15 @@ tests/roots/test-build-text/table.txt
 tests/roots/test-circular/conf.py
 tests/roots/test-circular/contents.rst
 tests/roots/test-circular/sub.rst
+tests/roots/test-contentsname/bar.rst
+tests/roots/test-contentsname/conf.py
+tests/roots/test-contentsname/foo.rst
+tests/roots/test-contentsname/index.rst
 tests/roots/test-directive-code/caption.rst
 tests/roots/test-directive-code/conf.py
 tests/roots/test-directive-code/dedent.rst
 tests/roots/test-directive-code/dedent_code.rst
+tests/roots/test-directive-code/empty.inc
 tests/roots/test-directive-code/index.rst
 tests/roots/test-directive-code/lineno_match.rst
 tests/roots/test-directive-code/lineno_start.rst
@@ -627,6 +636,12 @@ tests/roots/test-doctest/doctest.txt
 tests/roots/test-docutilsconf/conf.py
 tests/roots/test-docutilsconf/contents.txt
 tests/roots/test-docutilsconf/docutils.conf
+tests/roots/test-double-inheriting-theme/conf.py
+tests/roots/test-double-inheriting-theme/index.rst
+tests/roots/test-double-inheriting-theme/base_themes_dir/base_theme1/theme.conf
+tests/roots/test-double-inheriting-theme/base_themes_dir/base_theme2/theme.conf
+tests/roots/test-ext-graphviz/conf.py
+tests/roots/test-ext-graphviz/index.rst
 tests/roots/test-ext-ifconfig/conf.py
 tests/roots/test-ext-ifconfig/index.rst
 tests/roots/test-ext-viewcode/conf.py
@@ -665,6 +680,8 @@ tests/roots/test-intl/literalblock.po
 tests/roots/test-intl/literalblock.txt
 tests/roots/test-intl/raw.po
 tests/roots/test-intl/raw.txt
+tests/roots/test-intl/refs.po
+tests/roots/test-intl/refs.txt
 tests/roots/test-intl/refs_inconsistency.po
 tests/roots/test-intl/refs_inconsistency.txt
 tests/roots/test-intl/refs_python_domain.po
diff --git a/Sphinx.egg-info/requires.txt b/Sphinx.egg-info/requires.txt
index eb8535b..5100b88 100644
--- a/Sphinx.egg-info/requires.txt
+++ b/Sphinx.egg-info/requires.txt
@@ -3,9 +3,9 @@ Jinja2>=2.3
 Pygments>=2.0
 docutils>=0.11
 snowballstemmer>=1.1
-babel>=1.3
+babel>=1.3,!=2.0
 alabaster>=0.7,<0.8
-sphinx_rtd_theme>=0.1,<0.2
+sphinx_rtd_theme>=0.1,<2.0
 
 [:sys_platform=="win32"]
 colorama
diff --git a/doc/_templates/indexsidebar.html b/doc/_templates/indexsidebar.html
index 0bd3d71..5609480 100644
--- a/doc/_templates/indexsidebar.html
+++ b/doc/_templates/indexsidebar.html
@@ -27,7 +27,7 @@ are also available.{%endtrans%}</p>
 
 <h3>{%trans%}Questions? Suggestions?{%endtrans%}</h3>
 
-<p>{%trans%}Join the <a href="http://groups.google.com/group/sphinx-users">Google group</a>:{%endtrans%}</p>
+<p>{%trans%}Join the <a href="http://groups.google.com/group/sphinx-users">sphinx-users</a> mailing list on Google Groups:{%endtrans%}</p>
 <form action="http://groups.google.com/group/sphinx-users/boxsubscribe"
       style="padding-left: 0.5em">
   <input type="text" name="email" value="your at email" style="font-size: 90%; width: 120px"
diff --git a/doc/builders.rst b/doc/builders.rst
index 4fbd5ba..93e01e4 100644
--- a/doc/builders.rst
+++ b/doc/builders.rst
@@ -23,6 +23,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
 .. class:: DirectoryHTMLBuilder
@@ -36,6 +38,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 0.6
@@ -48,6 +52,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 1.0
@@ -61,6 +67,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
 .. module:: sphinx.builders.qthelp
@@ -72,6 +80,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. _Qt help: http://qt-project.org/doc/qt-4.8/qthelp-framework.html
@@ -96,6 +106,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 1.3
@@ -109,6 +121,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
 .. module:: sphinx.builders.epub
@@ -122,6 +136,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
 .. module:: sphinx.builders.latex
@@ -145,6 +161,8 @@ The builder's "name" must be given to the **-b** command-line option of
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
 Note that a direct PDF builder using ReportLab is available in `rst2pdf
@@ -162,6 +180,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 0.4
@@ -175,6 +195,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 1.0
@@ -196,6 +218,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 1.1
@@ -261,6 +285,8 @@ for details.
 
       The old name ``web`` still works as well.
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    The file suffix is ``.fpickle``.  The global context is called
@@ -276,6 +302,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    The file suffix is ``.fjson``.  The global context is called
@@ -293,6 +321,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 1.1
@@ -307,6 +337,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
 .. module:: sphinx.builders.linkcheck
@@ -318,6 +350,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
 .. module:: sphinx.builders.xml
@@ -329,6 +363,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 1.2
@@ -343,6 +379,8 @@ for details.
 
    .. autoattribute:: name
 
+   .. autoattribute:: format
+
    .. autoattribute:: supported_image_types
 
    .. versionadded:: 1.2
diff --git a/doc/config.rst b/doc/config.rst
index 0219a9e..552471f 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -867,7 +867,7 @@ that use Sphinx's HTMLWriter class.
    * ``it`` -- Italian
    * ``ja`` -- Japanese
    * ``no`` -- Norwegian
-   * ``pr`` -- Portuguese
+   * ``pt`` -- Portuguese
    * ``ro`` -- Romanian
    * ``ru`` -- Russian
    * ``es`` -- Spanish
diff --git a/doc/ext/graphviz.rst b/doc/ext/graphviz.rst
index 9b34b48..d5a5969 100644
--- a/doc/ext/graphviz.rst
+++ b/doc/ext/graphviz.rst
@@ -53,6 +53,10 @@ It adds these directives:
 
          "bar" -- "baz";
 
+   .. note:: The graph name is passed unchanged to Graphviz.  If it contains
+      non-alphanumeric characters (e.g. a dash), you will have to double-quote
+      it.
+
 
 .. rst:directive:: digraph
 
diff --git a/doc/ext/ifconfig.rst b/doc/ext/ifconfig.rst
index a11e307..f64ca6c 100644
--- a/doc/ext/ifconfig.rst
+++ b/doc/ext/ifconfig.rst
@@ -26,8 +26,8 @@ This extension is quite simple, and features only one directive:
    :file:`conf.py`, e.g.::
 
       def setup(app):
-          app.add_config_value('releaselevel', '', True)
+          app.add_config_value('releaselevel', '', 'env')
 
-   The second argument is the default value, the third should always be ``True``
+   The second argument is the default value, the third should always be ``'env'``
    for such values (it selects if Sphinx re-reads the documents if the value
    changes).
diff --git a/doc/ext/todo.rst b/doc/ext/todo.rst
index c0d94ba..8ab6eb3 100644
--- a/doc/ext/todo.rst
+++ b/doc/ext/todo.rst
@@ -16,6 +16,10 @@ There are two additional directives when using this extension:
    It will only show up in the output if :confval:`todo_include_todos` is
    ``True``.
 
+   .. versionadded:: 1.3.2
+      This directive supports an ``class`` option that determines the class attribute
+      for HTML output.  If not given, the class defaults to ``admonition-todo``.
+
 
 .. rst:directive:: todolist
 
diff --git a/doc/extdev/tutorial.rst b/doc/extdev/tutorial.rst
index 8241e10..8edff71 100644
--- a/doc/extdev/tutorial.rst
+++ b/doc/extdev/tutorial.rst
@@ -149,7 +149,7 @@ The new elements are added in the extension's setup function.  Let us create a
 new Python module called :file:`todo.py` and add the setup function::
 
    def setup(app):
-       app.add_config_value('todo_include_todos', False, False)
+       app.add_config_value('todo_include_todos', False, 'html')
 
        app.add_node(todolist)
        app.add_node(todo,
@@ -171,7 +171,7 @@ the individual calls do is the following:
   new *config value* ``todo_include_todos``, whose default value should be
   ``False`` (this also tells Sphinx that it is a boolean value).
 
-  If the third argument was ``True``, all documents would be re-read if the
+  If the third argument was ``'html'``, HTML documents would be full rebuild if the
   config value changed its value.  This is needed for config values that
   influence reading (build phase 1).
 
diff --git a/doc/install.rst b/doc/install.rst
index 046b31b..40d10a9 100644
--- a/doc/install.rst
+++ b/doc/install.rst
@@ -147,7 +147,7 @@ If you finished the installation of pip, type this line in the command prompt:
 
    C:\> pip install sphinx
 
-After installation, type :command:`sphinx-build` on the command prompt.  If
+After installation, type :command:`sphinx-build -h` on the command prompt.  If
 everything worked fine, you will get a Sphinx version number and a list of
 options for this command.
 
diff --git a/doc/make.bat b/doc/make.bat
new file mode 100644
index 0000000..0a4bd77
--- /dev/null
+++ b/doc/make.bat
@@ -0,0 +1,33 @@
+ at ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=python ../sphinx-build.py
+)
+set SOURCEDIR=.
+set BUILDDIR=_build
+set SPHINXPROJ=sphinx-doc
+
+if "%1" == "" goto help
+
+%SPHINXBUILD% 2> nul
+if errorlevel 9009 (
+	echo.
+	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+	echo.installed, then set the SPHINXBUILD environment variable to point
+	echo.to the full path of the 'sphinx-build' executable. Alternatively you
+	echo.may add the Sphinx directory to PATH.
+	echo.
+	echo.If you don't have Sphinx installed, grab it from
+	echo.http://sphinx-doc.org/
+	exit /b 1
+)
+
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
+
+:end
diff --git a/setup.py b/setup.py
index 2978915..6bc2887 100644
--- a/setup.py
+++ b/setup.py
@@ -51,9 +51,9 @@ requires = [
     'Pygments>=2.0',
     'docutils>=0.11',
     'snowballstemmer>=1.1',
-    'babel>=1.3',
+    'babel>=1.3,!=2.0',
     'alabaster>=0.7,<0.8',
-    'sphinx_rtd_theme>=0.1,<0.2',
+    'sphinx_rtd_theme>=0.1,<2.0',
 ]
 extras_require = {
     # Environment Marker works for wheel 0.24 or later
diff --git a/sphinx/__init__.py b/sphinx/__init__.py
index 705aeab..3b45b23 100644
--- a/sphinx/__init__.py
+++ b/sphinx/__init__.py
@@ -15,13 +15,13 @@
 import sys
 from os import path
 
-__version__  = '1.3.1'
-__released__ = '1.3.1'  # used when Sphinx builds its own docs
+__version__  = '1.3.2'
+__released__ = '1.3.2'  # 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, 3, 1, 'final', 0)
+version_info = (1, 3, 2, 'final', 0)
 
 package_dir = path.abspath(path.dirname(__file__))
 
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py
index 6891aec..10311e6 100644
--- a/sphinx/apidoc.py
+++ b/sphinx/apidoc.py
@@ -238,7 +238,7 @@ def recurse_tree(rootpath, excludes, opts):
 
 def normalize_excludes(rootpath, excludes):
     """Normalize the excluded directory list."""
-    return [path.normpath(path.abspath(exclude)) for exclude in excludes]
+    return [path.abspath(exclude) for exclude in excludes]
 
 
 def is_excluded(root, excludes):
@@ -247,7 +247,6 @@ def is_excluded(root, excludes):
     Note: by having trailing slashes, we avoid common prefix issues, like
           e.g. an exlude "foo" also accidentally excluding "foobar".
     """
-    root = path.normpath(root)
     for exclude in excludes:
         if root == exclude:
             return True
@@ -328,7 +327,7 @@ Note: By default this script will not overwrite already created files.""")
     if not opts.destdir:
         parser.error('An output directory is required.')
     if opts.header is None:
-        opts.header = path.normpath(rootpath).split(path.sep)[-1]
+        opts.header = path.abspath(rootpath).split(path.sep)[-1]
     if opts.suffix.startswith('.'):
         opts.suffix = opts.suffix[1:]
     if not path.isdir(rootpath):
@@ -337,7 +336,7 @@ Note: By default this script will not overwrite already created files.""")
     if not path.isdir(opts.destdir):
         if not opts.dryrun:
             os.makedirs(opts.destdir)
-    rootpath = path.normpath(path.abspath(rootpath))
+    rootpath = path.abspath(rootpath)
     excludes = normalize_excludes(rootpath, excludes)
     modules = recurse_tree(rootpath, excludes, opts)
     if opts.full:
diff --git a/sphinx/application.py b/sphinx/application.py
index f65592b..16b1c81 100644
--- a/sphinx/application.py
+++ b/sphinx/application.py
@@ -79,6 +79,7 @@ class Sphinx(object):
         self._extension_metadata = {}
         self._listeners = {}
         self.domains = BUILTIN_DOMAINS.copy()
+        self.buildername = buildername
         self.builderclasses = BUILTIN_BUILDERS.copy()
         self.builder = None
         self.env = None
@@ -185,7 +186,7 @@ class Sphinx(object):
         # set up the build environment
         self._init_env(freshenv)
         # set up the builder
-        self._init_builder(buildername)
+        self._init_builder(self.buildername)
 
     def _init_i18n(self):
         """Load translated strings from the configured localedirs if enabled in
@@ -199,7 +200,8 @@ class Sphinx(object):
         else:
             locale_dirs = []
         self.translator, has_translation = locale.init(locale_dirs,
-                                                       self.config.language)
+                                                       self.config.language,
+                                                       charset=self.config.source_encoding)
         if self.config.language is not None:
             if has_translation or self.config.language == 'en':
                 # "en" never needs to be translated
@@ -446,8 +448,17 @@ class Sphinx(object):
                     'version.' % (extension, err))
         if ext_meta is None:
             ext_meta = {}
-        if not ext_meta.get('version'):
-            ext_meta['version'] = 'unknown version'
+            # special-case for compatibility
+            if extension == 'rst2pdf.pdfbuilder':
+                ext_meta = {'parallel_read_safe': True}
+        try:
+            if not ext_meta.get('version'):
+                ext_meta['version'] = 'unknown version'
+        except Exception:
+            self.warn('extension %r returned an unsupported object from '
+                      'its setup() function; it should return None or a '
+                      'metadata dictionary' % extension)
+            ext_meta = {'version': 'unknown version'}
         self._extensions[extension] = mod
         self._extension_metadata[extension] = ext_meta
 
diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py
index 38cde61..eebd6af 100644
--- a/sphinx/builders/__init__.py
+++ b/sphinx/builders/__init__.py
@@ -160,16 +160,21 @@ class Builder(object):
     def compile_catalogs(self, catalogs, message):
         if not self.config.gettext_auto_build:
             return
+
+        def cat2relpath(cat):
+            return path.relpath(cat.mo_path, self.env.srcdir).replace(path.sep, SEP)
+
         self.info(bold('building [mo]: ') + message)
         for catalog in self.app.status_iterator(
                 catalogs, 'writing output... ', darkgreen, len(catalogs),
-                lambda c: c.mo_path):
+                cat2relpath):
             catalog.write_mo(self.config.language)
 
     def compile_all_catalogs(self):
         catalogs = i18n.find_catalog_source_files(
             [path.join(self.srcdir, x) for x in self.config.locale_dirs],
             self.config.language,
+            charset=self.config.source_encoding,
             gettext_compact=self.config.gettext_compact,
             force_all=True)
         message = 'all of %d po files' % len(catalogs)
@@ -186,6 +191,7 @@ class Builder(object):
             [path.join(self.srcdir, x) for x in self.config.locale_dirs],
             self.config.language,
             domains=list(specified_domains),
+            charset=self.config.source_encoding,
             gettext_compact=self.config.gettext_compact)
         message = 'targets for %d po files that are specified' % len(catalogs)
         self.compile_catalogs(catalogs, message)
@@ -194,6 +200,7 @@ class Builder(object):
         catalogs = i18n.find_catalog_source_files(
             [path.join(self.srcdir, x) for x in self.config.locale_dirs],
             self.config.language,
+            charset=self.config.source_encoding,
             gettext_compact=self.config.gettext_compact)
         message = 'targets for %d po files that are out of date' % len(catalogs)
         self.compile_catalogs(catalogs, message)
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index 431ac40..7006eff 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -584,6 +584,12 @@ class StandaloneHTMLBuilder(Builder):
                 copyfile(jsfile, path.join(self.outdir, '_static',
                                            'translations.js'))
 
+        # copy non-minified stemmer JavaScript file
+        if self.indexer is not None:
+            jsfile = self.indexer.get_js_stemmer_rawcode()
+            if jsfile:
+                copyfile(jsfile, path.join(self.outdir, '_static', '_stemmer.js'))
+
         ctx = self.globalcontext.copy()
 
         # add context items for search function used in searchtools.js_t
@@ -932,7 +938,7 @@ class SingleFileHTMLBuilder(StandaloneHTMLBuilder):
     def assemble_doctree(self):
         master = self.config.master_doc
         tree = self.env.get_doctree(master)
-        tree = inline_all_toctrees(self, set(), master, tree, darkgreen)
+        tree = inline_all_toctrees(self, set(), master, tree, darkgreen, [master])
         tree['docname'] = master
         self.env.resolve_references(tree, master, self)
         self.fix_refuris(tree)
diff --git a/sphinx/builders/latex.py b/sphinx/builders/latex.py
index f0c1d3a..1eef58d 100644
--- a/sphinx/builders/latex.py
+++ b/sphinx/builders/latex.py
@@ -102,11 +102,22 @@ class LaTeXBuilder(Builder):
             doctree.settings = docsettings
             doctree.settings.author = author
             doctree.settings.title = title
+            doctree.settings.contentsname = self.get_contentsname(docname)
             doctree.settings.docname = docname
             doctree.settings.docclass = docclass
             docwriter.write(doctree, destination)
             self.info("done")
 
+    def get_contentsname(self, indexfile):
+        tree = self.env.get_doctree(indexfile)
+        contentsname = None
+        for toctree in tree.traverse(addnodes.toctree):
+            if toctree['caption']:
+                contentsname = toctree['caption']
+                break
+
+        return contentsname
+
     def assemble_doctree(self, indexfile, toctree_only, appendices):
         self.docnames = set([indexfile] + appendices)
         self.info(darkgreen(indexfile) + " ", nonl=1)
@@ -124,7 +135,7 @@ class LaTeXBuilder(Builder):
                 new_sect += node
             tree = new_tree
         largetree = inline_all_toctrees(self, self.docnames, indexfile, tree,
-                                        darkgreen)
+                                        darkgreen, [indexfile])
         largetree['docname'] = indexfile
         for docname in appendices:
             appendix = self.env.get_doctree(docname)
diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
index 9f5c213..b05c5b2 100644
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -19,9 +19,19 @@ from six.moves import queue
 from six.moves.urllib.request import build_opener, Request, HTTPRedirectHandler
 from six.moves.urllib.parse import unquote, urlsplit, quote
 from six.moves.urllib.error import HTTPError
-from six.moves.html_parser import HTMLParser, HTMLParseError
+from six.moves.html_parser import HTMLParser
 from docutils import nodes
 
+# 2015-06-25 barry at python.org.  This exception was deprecated in Python 3.3 and
+# removed in Python 3.5, however for backward compatibility reasons, we're not
+# going to just remove it.  If it doesn't exist, define an exception that will
+# never be caught but leaves the code in check_anchor() intact.
+try:
+    from six.moves.html_parser import HTMLParseError
+except ImportError:
+    class HTMLParseError(Exception):
+        pass
+
 from sphinx.builders import Builder
 from sphinx.util.console import purple, red, darkgreen, darkgray, \
     darkred, turquoise
diff --git a/sphinx/builders/manpage.py b/sphinx/builders/manpage.py
index 0176621..2af853d 100644
--- a/sphinx/builders/manpage.py
+++ b/sphinx/builders/manpage.py
@@ -70,7 +70,7 @@ class ManualPageBuilder(Builder):
             tree = self.env.get_doctree(docname)
             docnames = set()
             largetree = inline_all_toctrees(self, docnames, docname, tree,
-                                            darkgreen)
+                                            darkgreen, [docname])
             self.info('} ', nonl=True)
             self.env.resolve_references(largetree, docname, self)
             # remove pending_xref nodes
diff --git a/sphinx/builders/texinfo.py b/sphinx/builders/texinfo.py
index 3adeec4..7528c07 100644
--- a/sphinx/builders/texinfo.py
+++ b/sphinx/builders/texinfo.py
@@ -180,7 +180,7 @@ class TexinfoBuilder(Builder):
                 new_sect += node
             tree = new_tree
         largetree = inline_all_toctrees(self, self.docnames, indexfile, tree,
-                                        darkgreen)
+                                        darkgreen, [indexfile])
         largetree['docname'] = indexfile
         for docname in appendices:
             appendix = self.env.get_doctree(docname)
diff --git a/sphinx/builders/websupport.py b/sphinx/builders/websupport.py
index 4a33667..66af0ab 100644
--- a/sphinx/builders/websupport.py
+++ b/sphinx/builders/websupport.py
@@ -114,6 +114,8 @@ class WebSupportBuilder(PickleHTMLBuilder):
         doc_ctx = {
             'body': ctx.get('body', ''),
             'title': ctx.get('title', ''),
+            'css': ctx.get('css', ''),
+            'script': ctx.get('script', ''),
         }
         # partially render the html template to get at interesting macros
         template = self.templates.environment.get_template(templatename)
diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py
index e5335f4..e411836 100644
--- a/sphinx/cmdline.py
+++ b/sphinx/cmdline.py
@@ -27,11 +27,6 @@ from sphinx.util.osutil import abspath, fs_encoding
 from sphinx.util.pycompat import terminal_safe
 
 
-def usage(argv, msg=None):
-    if msg:
-        print(msg, file=sys.stderr)
-        print(file=sys.stderr)
-
 USAGE = """\
 Sphinx v%s
 Usage: %%prog [options] sourcedir outdir [filenames...]
@@ -150,7 +145,7 @@ def main(argv):
             return 1
         outdir = abspath(args[1])
     except IndexError:
-        usage(argv, 'Error: Insufficient arguments.')
+        parser.print_help()
         return 1
     except UnicodeError:
         print(
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py
index 5043a31..f31ba7a 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -302,15 +302,6 @@ class LiteralInclude(Directive):
                     res.append(line)
             lines = res
 
-        if 'lineno-match' in self.options:
-            # handle that docutils remove preceding lines which only contains
-            # line separation.
-            for line in lines:
-                # check if line contains anything else than line separation.
-                if line and line.splitlines()[0]:
-                    break
-                linenostart += 1
-
         prepend = self.options.get('prepend')
         if prepend:
             lines.insert(0, prepend + '\n')
diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py
index 2b941c3..794dbda 100644
--- a/sphinx/directives/other.py
+++ b/sphinx/directives/other.py
@@ -142,7 +142,7 @@ class Author(Directive):
         env = self.state.document.settings.env
         if not env.config.show_authors:
             return []
-        para = nodes.paragraph()
+        para = nodes.paragraph(translatable=False)
         emph = nodes.emphasis()
         para += emph
         if self.name == 'sectionauthor':
@@ -205,7 +205,7 @@ class VersionChange(Directive):
         if len(self.arguments) == 2:
             inodes, messages = self.state.inline_text(self.arguments[1],
... 3155 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinx.git



More information about the Python-modules-commits mailing list