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

Dmitry Shachnev mitya57 at moszumanska.debian.org
Thu Jan 14 15:59:25 UTC 2016


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

mitya57 pushed a commit to branch master
in repository sphinx.

commit caededb0f2c03d23ce5f20fb19c602ab6c8ba4ea
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Thu Jan 14 18:58:00 2016 +0300

    Import sphinx_1.3.4.orig.tar.gz
---
 CHANGES                                            |  74 ++++++-
 PKG-INFO                                           |   2 +-
 Sphinx.egg-info/PKG-INFO                           |   2 +-
 Sphinx.egg-info/SOURCES.txt                        |  32 +++
 Sphinx.egg-info/requires.txt                       |   2 +-
 doc/_templates/index.html                          |   8 +-
 doc/_templates/indexsidebar.html                   |   8 -
 doc/config.rst                                     |   8 +-
 doc/domains.rst                                    |   2 +-
 doc/ext/graphviz.rst                               |  17 +-
 doc/ext/math.rst                                   |   4 +-
 doc/ext/viewcode.rst                               |   6 +-
 doc/extdev/appapi.rst                              |   2 +-
 doc/extdev/envapi.rst                              |   6 +-
 doc/intl.rst                                       |   2 +-
 doc/markup/inline.rst                              |   5 +-
 doc/tutorial.rst                                   |   5 +-
 doc/web/quickstart.rst                             |   2 +-
 setup.py                                           |   4 +-
 sphinx/__init__.py                                 |   6 +-
 sphinx/apidoc.py                                   |  10 +
 sphinx/builders/__init__.py                        |   3 +-
 sphinx/builders/latex.py                           |  17 +-
 sphinx/builders/linkcheck.py                       |  31 +--
 sphinx/cmdline.py                                  |   4 +
 sphinx/domains/cpp.py                              |  12 ++
 sphinx/domains/std.py                              |  36 ++--
 sphinx/environment.py                              |  79 +++-----
 sphinx/ext/doctest.py                              |  18 +-
 sphinx/ext/graphviz.py                             |   3 +-
 sphinx/ext/inheritance_diagram.py                  |  17 +-
 sphinx/ext/jsmath.py                               |   2 +-
 sphinx/ext/mathbase.py                             |  19 +-
 sphinx/ext/mathjax.py                              |   2 +-
 sphinx/quickstart.py                               |  48 +++--
 sphinx/search/de.py                                |   1 +
 sphinx/search/ja.py                                |  10 +-
 sphinx/texinputs/sphinx.sty                        |  36 ++--
 sphinx/themes/classic/static/classic.css_t         |   2 +-
 sphinx/util/__init__.py                            |  11 +
 sphinx/util/docfields.py                           |   5 +-
 sphinx/util/nodes.py                               |   6 +-
 sphinx/util/parallel.py                            | 107 +++++-----
 sphinx/writers/latex.py                            | 221 +++++++++++++++++----
 sphinx/writers/manpage.py                          |  32 +++
 sphinx/writers/text.py                             |   4 +-
 tests/path.py                                      |  31 ++-
 tests/root/images.txt                              |   3 +
 tests/root/img.foo.png                             | Bin 0 -> 67765 bytes
 tests/root/markup.txt                              |   9 +
 tests/root/math.txt                                |  15 +-
 tests/root/objects.txt                             |  12 +-
 tests/roots/test-autosummary/conf.py               |   2 +
 tests/roots/test-build-text/conf.py                |   1 +
 tests/roots/test-circular/conf.py                  |   1 +
 tests/roots/test-contentsname/conf.py              |   1 +
 tests/roots/test-directive-code/conf.py            |   1 +
 tests/roots/test-directive-only/conf.py            |   1 +
 tests/roots/test-doctest/conf.py                   |   3 +-
 tests/roots/test-doctest/doctest.txt               |  11 +
 tests/roots/test-docutilsconf/conf.py              |   1 +
 tests/roots/test-domain-cpp/any-role.rst           |  10 +
 .../{test-tocdepth => test-domain-cpp}/conf.py     |   1 +
 tests/roots/test-domain-cpp/index.rst              |  37 ++++
 tests/roots/test-domain-cpp/roles.rst              |  10 +
 tests/roots/test-double-inheriting-theme/conf.py   |   1 +
 tests/roots/test-ext-graphviz/conf.py              |   1 +
 tests/roots/test-ext-ifconfig/conf.py              |   1 +
 tests/roots/test-ext-viewcode/conf.py              |   1 +
 .../{test-tocdepth => test-footnotes}/conf.py      |   1 +
 tests/roots/test-footnotes/index.rst               | 142 +++++++++++++
 tests/roots/test-footnotes/rimg.png                | Bin 0 -> 218 bytes
 tests/roots/test-image-in-section/conf.py          |  12 ++
 tests/roots/test-image-in-section/index.rst        |  18 ++
 tests/roots/test-image-in-section/pic.png          | Bin 0 -> 218 bytes
 tests/roots/test-intl/conf.py                      |   1 +
 tests/roots/test-intl/definition_terms.po          |   8 +-
 tests/roots/test-intl/definition_terms.txt         |   4 +-
 tests/roots/test-numbered-circular/conf.py         |   1 +
 tests/roots/test-numfig/conf.py                    |   1 +
 tests/roots/test-setup/doc/conf.py                 |   1 +
 tests/roots/test-templating/conf.py                |   1 +
 tests/roots/test-theming/conf.py                   |   1 +
 tests/roots/test-tocdepth/conf.py                  |   1 +
 tests/roots/test-toctree-glob/bar/bar_1.rst        |   4 +
 tests/roots/test-toctree-glob/bar/bar_2.rst        |   4 +
 tests/roots/test-toctree-glob/bar/bar_3.rst        |   4 +
 tests/roots/test-toctree-glob/bar/bar_4/index.rst  |   4 +
 tests/roots/test-toctree-glob/bar/index.rst        |   8 +
 tests/roots/test-toctree-glob/baz.rst              |   4 +
 .../{test-tocdepth => test-toctree-glob}/conf.py   |   1 +
 tests/roots/test-toctree-glob/foo.rst              |   4 +
 tests/roots/test-toctree-glob/index.rst            |  11 +
 tests/roots/test-toctree-glob/quux.rst             |   4 +
 tests/roots/test-toctree-glob/qux/index.rst        |   8 +
 tests/roots/test-toctree-glob/qux/qux_1.rst        |   4 +
 tests/roots/test-toctree-glob/qux/qux_2.rst        |   4 +
 tests/roots/test-toctree-maxdepth/bar.rst          |  27 +++
 tests/roots/test-toctree-maxdepth/baz.rst          |   5 +
 .../conf.py                                        |   1 +
 tests/roots/test-toctree-maxdepth/foo.rst          |  26 +++
 tests/roots/test-toctree-maxdepth/index.rst        |   9 +
 tests/roots/test-versioning/conf.py                |   1 +
 tests/test_apidoc.py                               |  41 ++++
 tests/test_build.py                                |  17 +-
 tests/test_build_html.py                           |  79 ++++----
 tests/test_build_latex.py                          | 169 +++++++++++++++-
 tests/test_build_manpage.py                        |  22 ++
 tests/test_build_texinfo.py                        |   2 +-
 tests/test_directive_code.py                       |   4 +-
 tests/test_domain_cpp.py                           |  50 ++++-
 tests/test_environment.py                          |  10 +-
 tests/test_intl.py                                 |  41 +++-
 tests/test_toctree.py                              |  29 +++
 tests/test_util.py                                 |  26 +++
 tests/test_util_i18n.py                            |   3 +-
 utils/check_sources.py                             |   2 +-
 117 files changed, 1519 insertions(+), 388 deletions(-)

diff --git a/CHANGES b/CHANGES
index 54bbfd9..7ba27dc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,64 @@
+Release 1.3.4 (released Jan 12, 2016)
+=====================================
+
+Bugs fixed
+----------
+
+* #2134: Fix figure caption with reference causes latex build error
+* #2094: Fix rubric with reference not working in Latex
+* #2147: Fix litralinclude code in latex does not break in pages
+* #1833: Fix email addresses is showed again if latex_show_urls is not None
+* #2176: sphinx.ext.graphviz: use <object> instead of <img> to embed svg
+* #967: Fix SVG inheritance diagram is not hyperlinked (clickable)
+* #1237: Fix footnotes not working in definition list in LaTeX
+* #2168: Fix raw directive does not work for text writer
+* #2171: Fix cannot linkcheck url with unicode
+* #2182: LaTeX: support image file names with more than 1 dots
+* #2189: Fix previous sibling link for first file in subdirectory uses last file, not
+  intended previous from root toctree
+* #2003: Fix decode error under python2 (only) when ``make linkcheck`` is run
+* #2186: Fix LaTeX output of \mathbb in math
+* #1480, #2188: LaTeX: Support math in section titles
+* #2071: Fix same footnote in more than two section titles => LaTeX/PDF Bug
+* #2040: Fix UnicodeDecodeError in sphinx-apidoc when author contains non-ascii characters
+* #2193: Fix shutil.SameFileError if source directory and destination directory are same
+* #2178: Fix unparseable C++ cross-reference when referencing a function with :cpp:any:
+* #2206: Fix Sphinx latex doc build failed due to a footnotes
+* #2201: Fix wrong table caption for tables with over 30 rows
+* #2213: Set <blockquote> in the classic theme to fit with <p>
+* #1815: Fix linkcheck does not raise an exception if warniserror set to true and link is
+  broken
+* #2197: Fix slightly cryptic error message for missing index.rst file
+* #1894: Unlisted phony targets in quickstart Makefile
+* #2125: Fix unifies behavior of collapsed fields (``GroupedField`` and ``TypedField``)
+* #1408: Check latex_logo validity before copying
+* #771: Fix latex output doesn't set tocdepth
+* #1820: On Windows, console coloring is broken with colorama version 0.3.3.
+  Now sphinx use colorama>=0.3.5 to avoid this problem.
+* #2072: Fix footnotes in chapter-titles do not appear in PDF output
+* #1580: Fix paragraphs in longtable don't work in Latex output
+* #1366: Fix centered image not centered in latex
+* #1860: Fix man page using ``:samp:`` with braces - font doesn't reset
+* #1610: Sphinx crashes in japanese indexing in some systems
+* Fix Sphinx crashes if mecab initialization failed
+* #2160: Fix broken TOC of PDFs if section includes an image
+* #2172: Fix dysfunctional admonition \py at lightbox in sphinx.sty. Thanks to jfbu.
+* #2198,#2205: ``make gettext`` generate broken msgid for definition lists.
+* #2062: Escape characters in doctests are treated incorrectly with Python 2.
+* #2225: Fix if the option does not begin with dash, linking is not performed
+* #2226: Fix math is not HTML-encoded when :nowrap: is given (jsmath, mathjax)
+* #1601, #2220: 'any' role breaks extended domains behavior. Affected extensions doesn't
+  support resolve_any_xref and resolve_xref returns problematic node instead of None.
+  sphinxcontrib-httpdomain is one of them.
+* #2229: Fix no warning is given for unknown options
+
 Release 1.3.3 (released Dec 2, 2015)
 ====================================
 
 Bugs fixed
 ----------
 
+* #2177: Fix parallel hangs
 * #2012: Fix exception occurred if ``numfig_format`` is invalid
 * #2142: Provide non-minified JS code in ``sphinx/search/non-minified-js/*.js`` for
   source distribution on PyPI.
@@ -50,11 +105,7 @@ Bugs fixed
 * #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
@@ -69,6 +120,8 @@ Bugs fixed
 * #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.
+* #1989: "make blahblah" on Windows indicate help messages for sphinx-build every time.
+  It was caused by wrong make.bat that generated by Sphinx-1.3.0/1.3.1.
 * 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
@@ -81,7 +134,7 @@ Bugs fixed
   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.
+  '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.
@@ -889,13 +942,12 @@ Features added
 * Command-line interfaces:
 
   - PR#75: Added ``--follow-links`` option to sphinx-apidoc.
-  - #869: sphinx-build now has the option :option:`-T` for printing the full
+  - #869: sphinx-build now has the option ``-T`` for printing the full
     traceback after an unhandled exception.
-  - sphinx-build now supports the standard :option:`--help` and
-    :option:`--version` options.
+  - sphinx-build now supports the standard ``--help`` and ``--version`` options.
   - sphinx-build now provides more specific error messages when called with
     invalid options or arguments.
-  - sphinx-build now has a verbose option :option:`-v` which can be repeated for
+  - sphinx-build now has a verbose option ``-v`` which can be repeated for
     greater effect.  A single occurrence provides a slightly more verbose output
     than normal.  Two or more occurrences of this option provides more detailed
     output which may be useful for debugging.
@@ -917,7 +969,7 @@ Features added
     stemming routines.  Saves about 20 seconds when building the Python
     documentation.
   - PR#108: Add experimental support for parallel building with a new
-    :option:`-j` option.
+    :option:`sphinx-build -j` option.
 
 Documentation
 -------------
@@ -1507,7 +1559,7 @@ Features added
 * General:
 
   - Added a "nitpicky" mode that emits warnings for all missing
-    references.  It is activated by the :option:`-n` command-line switch
+    references.  It is activated by the :option:`sphinx-build -n` command-line switch
     or the `nitpicky` config value.
   - Added ``latexpdf`` target in quickstart Makefile.
 
diff --git a/PKG-INFO b/PKG-INFO
index 47c6e17..de19fae 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: Sphinx
-Version: 1.3.3
+Version: 1.3.4
 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 47c6e17..de19fae 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.3
+Version: 1.3.4
 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 b899981..00666f3 100644
--- a/Sphinx.egg-info/SOURCES.txt
+++ b/Sphinx.egg-info/SOURCES.txt
@@ -510,6 +510,7 @@ tests/test_build_applehelp.py
 tests/test_build_gettext.py
 tests/test_build_html.py
 tests/test_build_latex.py
+tests/test_build_manpage.py
 tests/test_build_texinfo.py
 tests/test_build_text.py
 tests/test_catalogs.py
@@ -543,6 +544,8 @@ tests/test_searchadapters.py
 tests/test_setup_command.py
 tests/test_templating.py
 tests/test_theming.py
+tests/test_toctree.py
+tests/test_util.py
 tests/test_util_i18n.py
 tests/test_util_nodes.py
 tests/test_versioning.py
@@ -565,6 +568,7 @@ tests/root/extapi.txt
 tests/root/extensions.txt
 tests/root/footnote.txt
 tests/root/images.txt
+tests/root/img.foo.png
 tests/root/img.gif
 tests/root/img.pdf
 tests/root/img.png
@@ -651,6 +655,10 @@ 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-domain-cpp/any-role.rst
+tests/roots/test-domain-cpp/conf.py
+tests/roots/test-domain-cpp/index.rst
+tests/roots/test-domain-cpp/roles.rst
 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
@@ -665,6 +673,12 @@ tests/roots/test-ext-viewcode/objects.rst
 tests/roots/test-ext-viewcode/spam/__init__.py
 tests/roots/test-ext-viewcode/spam/mod1.py
 tests/roots/test-ext-viewcode/spam/mod2.py
+tests/roots/test-footnotes/conf.py
+tests/roots/test-footnotes/index.rst
+tests/roots/test-footnotes/rimg.png
+tests/roots/test-image-in-section/conf.py
+tests/roots/test-image-in-section/index.rst
+tests/roots/test-image-in-section/pic.png
 tests/roots/test-intl/admonitions.po
 tests/roots/test-intl/admonitions.txt
 tests/roots/test-intl/bom.po
@@ -743,6 +757,24 @@ tests/roots/test-tocdepth/baz.rst
 tests/roots/test-tocdepth/conf.py
 tests/roots/test-tocdepth/foo.rst
 tests/roots/test-tocdepth/index.rst
+tests/roots/test-toctree-glob/baz.rst
+tests/roots/test-toctree-glob/conf.py
+tests/roots/test-toctree-glob/foo.rst
+tests/roots/test-toctree-glob/index.rst
+tests/roots/test-toctree-glob/quux.rst
+tests/roots/test-toctree-glob/bar/bar_1.rst
+tests/roots/test-toctree-glob/bar/bar_2.rst
+tests/roots/test-toctree-glob/bar/bar_3.rst
+tests/roots/test-toctree-glob/bar/index.rst
+tests/roots/test-toctree-glob/bar/bar_4/index.rst
+tests/roots/test-toctree-glob/qux/index.rst
+tests/roots/test-toctree-glob/qux/qux_1.rst
+tests/roots/test-toctree-glob/qux/qux_2.rst
+tests/roots/test-toctree-maxdepth/bar.rst
+tests/roots/test-toctree-maxdepth/baz.rst
+tests/roots/test-toctree-maxdepth/conf.py
+tests/roots/test-toctree-maxdepth/foo.rst
+tests/roots/test-toctree-maxdepth/index.rst
 tests/roots/test-versioning/added.txt
 tests/roots/test-versioning/conf.py
 tests/roots/test-versioning/deleted.txt
diff --git a/Sphinx.egg-info/requires.txt b/Sphinx.egg-info/requires.txt
index 5100b88..8b45115 100644
--- a/Sphinx.egg-info/requires.txt
+++ b/Sphinx.egg-info/requires.txt
@@ -8,7 +8,7 @@ alabaster>=0.7,<0.8
 sphinx_rtd_theme>=0.1,<2.0
 
 [:sys_platform=="win32"]
-colorama
+colorama>=0.3.5
 
 [test]
 nose
diff --git a/doc/_templates/index.html b/doc/_templates/index.html
index ccef89a..4c23114 100644
--- a/doc/_templates/index.html
+++ b/doc/_templates/index.html
@@ -62,11 +62,11 @@
   </table>
 
   <p>{%trans%}
-    You can also download PDF versions of the Sphinx documentation:
-    a <a href="http://sphinx-doc.org/sphinx.pdf">version</a> generated from
+    You can also download PDF/EPUB versions of the Sphinx documentation:
+    a <a href="http://readthedocs.org/projects/sphinx/downloads/pdf/stable/">PDF version</a> generated from
     the LaTeX Sphinx produces, and
-    a <a href="http://sphinx-doc.org/sphinx-rst2pdf.pdf">version</a> generated
-    by rst2pdf.{%endtrans%}
+    a <a href="http://readthedocs.org/projects/sphinx/downloads/epub/stable/">EPUB version</a>.
+   {%endtrans%}
   </p>
 
   <h2>{%trans%}Examples{%endtrans%}</h2>
diff --git a/doc/_templates/indexsidebar.html b/doc/_templates/indexsidebar.html
index 5609480..b6f12f0 100644
--- a/doc/_templates/indexsidebar.html
+++ b/doc/_templates/indexsidebar.html
@@ -14,15 +14,7 @@
 <p>{%trans%}Current version: <b>{{ version }}</b>{%endtrans%}</p>
 <p>{%trans%}Get Sphinx from the <a href="https://pypi.python.org/pypi/Sphinx">Python Package
 Index</a>, or install it with:{%endtrans%}</p>
-{% if version.split('b')|length > 1 %}
-<pre>pip install Sphinx=={{ version }}</pre>
-<p>{%trans%}<a href="http://sphinx-doc.org/">Stable version docs</a>
-are also available.{%endtrans%}</p>
-{% else %}
 <pre>pip install -U Sphinx</pre>
-<p>{%trans%}Latest <a href="http://sphinx-doc.org/latest/">development version docs</a>
-are also available.{%endtrans%}</p>
-{% endif %}
 {% endif %}
 
 <h3>{%trans%}Questions? Suggestions?{%endtrans%}</h3>
diff --git a/doc/config.rst b/doc/config.rst
index 552471f..086e0dc 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -234,7 +234,7 @@ General configuration
 
    If true, Sphinx will warn about *all* references where the target cannot be
    found.  Default is ``False``.  You can activate this mode temporarily using
-   the :option:`-n` command-line switch.
+   the :option:`-n <sphinx-build -n>` command-line switch.
 
    .. versionadded:: 1.0
 
@@ -453,7 +453,7 @@ documentation on :ref:`intl` for details.
    this path are searched by the standard :mod:`gettext` module.
 
    Internal messages are fetched from a text domain of ``sphinx``; so if you
-   add the directory :file:`./locale` to this settting, the message catalogs
+   add the directory :file:`./locale` to this setting, the message catalogs
    (compiled from ``.po`` format using :program:`msgfmt`) must be in
    :file:`./locale/{language}/LC_MESSAGES/sphinx.mo`.  The text domain of
    individual documents depends on :confval:`gettext_compact`.
@@ -580,7 +580,7 @@ that use Sphinx's HTMLWriter class.
 
    A dictionary of values to pass into the template engine's context for all
    pages.  Single values can also be put in this dictionary using the
-   :option:`-A` command-line option of ``sphinx-build``.
+   :option:`-A <sphinx-build -A>` command-line option of ``sphinx-build``.
 
    .. versionadded:: 0.5
 
@@ -1431,6 +1431,8 @@ These options influence LaTeX output.
         'floated' into the next page but may be preceded by any other text.
         If you don't like this behavior, use 'H' which will disable floating
         and position figures strictly in the order they appear in the source.
+
+        .. versionadded:: 1.3
      ``'footer'``
         Additional footer content (before the indices), default empty.
 
diff --git a/doc/domains.rst b/doc/domains.rst
index 2e85841..f2e437b 100644
--- a/doc/domains.rst
+++ b/doc/domains.rst
@@ -561,7 +561,7 @@ a visibility statement (``public``, ``private`` or ``protected``).
 .. rst:directive:: .. cpp:member:: (member-)variable declaration
                    .. cpp:var:: (member-)variable declaration
 
-   Describe a varible or member variable, e.g.,::
+   Describe a variable or member variable, e.g.,::
 
       .. cpp:member:: std::string theclass::name
 
diff --git a/doc/ext/graphviz.rst b/doc/ext/graphviz.rst
index d5a5969..db7fe7e 100644
--- a/doc/ext/graphviz.rst
+++ b/doc/ext/graphviz.rst
@@ -97,8 +97,8 @@ There are also these new config values:
 
    Since this setting is not portable from system to system, it is normally not
    useful to set it in ``conf.py``; rather, giving it on the
-   :program:`sphinx-build` command line via the :option:`-D` option should be
-   preferable, like this::
+   :program:`sphinx-build` command line via the :option:`-D <sphinx-build -D>`
+   option should be preferable, like this::
 
       sphinx-build -b html -D graphviz_dot=C:\graphviz\bin\dot.exe . _build/html
 
@@ -111,7 +111,18 @@ There are also these new config values:
 .. confval:: graphviz_output_format
 
    The output format for Graphviz when building HTML files.  This must be either
-   ``'png'`` or ``'svg'``; the default is ``'png'``.
+   ``'png'`` or ``'svg'``; the default is ``'png'``. If ``'svg'`` is used, in
+   order to make the URL links work properly, an appropriate ``target``
+   attribute must be set, such as ``"_top"`` and ``"_blank"``. For example, the
+   link in the following graph should work in the svg output: ::
+
+       .. graphviz::
+
+            digraph example {
+                a [label="sphinx", href="http://sphinx-doc.org", target="_top"];
+                b [label="other"];
+                a -> b;
+            }
 
    .. versionadded:: 1.0
       Previously, output always was PNG.
diff --git a/doc/ext/math.rst b/doc/ext/math.rst
index 4c15461..a249932 100644
--- a/doc/ext/math.rst
+++ b/doc/ext/math.rst
@@ -117,8 +117,8 @@ built:
 
    Since this setting is not portable from system to system, it is normally not
    useful to set it in ``conf.py``; rather, giving it on the
-   :program:`sphinx-build` command line via the :option:`-D` option should be
-   preferable, like this::
+   :program:`sphinx-build` command line via the :option:`-D <sphinx-build -D>`
+   option should be preferable, like this::
 
       sphinx-build -b html -D pngmath_latex=C:\tex\latex.exe . _build/html
 
diff --git a/doc/ext/viewcode.rst b/doc/ext/viewcode.rst
index f2b6c92..5bf8eb0 100644
--- a/doc/ext/viewcode.rst
+++ b/doc/ext/viewcode.rst
@@ -15,11 +15,7 @@ a highlighted version of the source code, and a link will be added to all object
 descriptions that leads to the source code of the described object.  A link back
 from the source to the description will also be inserted.
 
-There are currently no configuration values for this extension; you just need to
-add ``'sphinx.ext.viewcode'`` to your :confval:`extensions` value for it to
-work.
-
-There is also an additional config value:
+There is an additional config value:
 
 .. confval:: viewcode_import
 
diff --git a/doc/extdev/appapi.rst b/doc/extdev/appapi.rst
index c2ee4cc..d191267 100644
--- a/doc/extdev/appapi.rst
+++ b/doc/extdev/appapi.rst
@@ -155,7 +155,7 @@ package.
       add_directive('literalinclude', literalinclude_directive,
                     content = 0, arguments = (1, 0, 0),
                     linenos = directives.flag,
-                    language = direcitves.unchanged,
+                    language = directives.unchanged,
                     encoding = directives.encoding)
 
    .. versionchanged:: 0.6
diff --git a/doc/extdev/envapi.rst b/doc/extdev/envapi.rst
index 84ad3e0..729725f 100644
--- a/doc/extdev/envapi.rst
+++ b/doc/extdev/envapi.rst
@@ -17,7 +17,11 @@ Build environment API
 
    .. attribute:: srcdir
 
-      Source directory (the directory containing ``conf.py``).
+      Source directory.
+
+   .. attribute:: confdir
+
+      Directory containing ``conf.py``.
 
    .. attribute:: doctreedir
 
diff --git a/doc/intl.rst b/doc/intl.rst
index a358c43..bd4f9e8 100644
--- a/doc/intl.rst
+++ b/doc/intl.rst
@@ -63,7 +63,7 @@ be translated you need to follow these instructions:
         msgfmt "usage.po" -o "locale/es/LC_MESSAGES/usage.mo"
 
 * Set :confval:`locale_dirs` to ``["locale/"]``.
-* Set :confval:`language` to ``es`` (also possible via :option:`-D`).
+* Set :confval:`language` to ``es`` (also possible via :option:`-D <sphinx-build -D>`).
 * Run your desired build.
 
 
diff --git a/doc/markup/inline.rst b/doc/markup/inline.rst
index 10db17d..0e825b6 100644
--- a/doc/markup/inline.rst
+++ b/doc/markup/inline.rst
@@ -242,9 +242,8 @@ objects:
 
 .. rst:role:: option
 
-   A command-line option to an executable program.  The leading hyphen(s) must
-   be included.  This generates a link to a :rst:dir:`option` directive, if it
-   exists.
+   A command-line option to an executable program.  This generates a link to
+   a :rst:dir:`option` directive, if it exists.
 
 
 The following role creates a cross-reference to a term in a
diff --git a/doc/tutorial.rst b/doc/tutorial.rst
index 95bd61e..385746f 100644
--- a/doc/tutorial.rst
+++ b/doc/tutorial.rst
@@ -122,8 +122,9 @@ this::
    $ sphinx-build -b html sourcedir builddir
 
 where *sourcedir* is the :term:`source directory`, and *builddir* is the
-directory in which you want to place the built documentation.  The :option:`-b`
-option selects a builder; in this example Sphinx will build HTML files.
+directory in which you want to place the built documentation.
+The :option:`-b <sphinx-build -b>` option selects a builder; in this example
+Sphinx will build HTML files.
 
 |more| See :ref:`invocation` for all options that :program:`sphinx-build`
 supports.
diff --git a/doc/web/quickstart.rst b/doc/web/quickstart.rst
index 996942d..1611774 100644
--- a/doc/web/quickstart.rst
+++ b/doc/web/quickstart.rst
@@ -135,7 +135,7 @@ add this data to the ``COMMENT_OPTIONS`` that are used in the template.
 
 .. note::
 
-   This only works works if your documentation is served from your
+   This only works if your documentation is served from your
    document root. If it is served from another directory, you will
    need to prefix the url route with that directory, and give the `docroot`
    keyword argument when creating the web support object::
diff --git a/setup.py b/setup.py
index 6bc2887..4ff6315 100644
--- a/setup.py
+++ b/setup.py
@@ -58,7 +58,7 @@ requires = [
 extras_require = {
     # Environment Marker works for wheel 0.24 or later
     ':sys_platform=="win32"': [
-        'colorama',
+        'colorama>=0.3.5',
     ],
     'websupport': [
         'sqlalchemy>=0.9',
@@ -73,7 +73,7 @@ extras_require = {
 
 # for sdist installation with pip-1.5.6
 if sys.platform == 'win32':
-    requires.append('colorama')
+    requires.append('colorama>=0.3.5')
 
 # Provide a "compile_catalog" command that also creates the translated
 # JavaScript files if Babel is available.
diff --git a/sphinx/__init__.py b/sphinx/__init__.py
index 18c6db2..d159c27 100644
--- a/sphinx/__init__.py
+++ b/sphinx/__init__.py
@@ -15,13 +15,13 @@
 import sys
 from os import path
 
-__version__  = '1.3.3'
-__released__ = '1.3.3'  # used when Sphinx builds its own docs
+__version__  = '1.3.4'
+__released__ = '1.3.4'  # 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, 3, 'final', 0)
+version_info = (1, 3, 4, 'final', 0)
 
 package_dir = path.abspath(path.dirname(__file__))
 
diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py
index 10311e6..1238693 100644
--- a/sphinx/apidoc.py
+++ b/sphinx/apidoc.py
@@ -20,6 +20,7 @@ import os
 import sys
 import optparse
 from os import path
+from six import binary_type
 
 from sphinx.util.osutil import walk
 from sphinx import __display_version__
@@ -369,6 +370,15 @@ Note: By default this script will not overwrite already created files.""")
             mastertoctree = text,
             language = 'en',
         )
+        if isinstance(opts.header, binary_type):
+            d['project'] = d['project'].decode('utf-8')
+        if isinstance(opts.author, binary_type):
+            d['author'] = d['author'].decode('utf-8')
+        if isinstance(opts.version, binary_type):
+            d['version'] = d['version'].decode('utf-8')
+        if isinstance(opts.release, binary_type):
+            d['release'] = d['release'].decode('utf-8')
+
         if not opts.dryrun:
             qs.generate(d, silent=True, overwrite=opts.force)
     elif not opts.notoc:
diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py
index eebd6af..2688f84 100644
--- a/sphinx/builders/__init__.py
+++ b/sphinx/builders/__init__.py
@@ -14,9 +14,8 @@ from os import path
 
 try:
     import multiprocessing
-    import threading
 except ImportError:
-    multiprocessing = threading = None
+    multiprocessing = None
 
 from docutils import nodes
 
diff --git a/sphinx/builders/latex.py b/sphinx/builders/latex.py
index 1eef58d..18041ea 100644
--- a/sphinx/builders/latex.py
+++ b/sphinx/builders/latex.py
@@ -20,6 +20,7 @@ from docutils.frontend import OptionParser
 
 from sphinx import package_dir, addnodes
 from sphinx.util import texescape
+from sphinx.errors import SphinxError
 from sphinx.locale import _
 from sphinx.builders import Builder
 from sphinx.environment import NoUri
@@ -94,9 +95,18 @@ class LaTeXBuilder(Builder):
                 destination_path=path.join(self.outdir, targetname),
                 encoding='utf-8')
             self.info("processing " + targetname + "... ", nonl=1)
+            toctrees = self.env.get_doctree(docname).traverse(addnodes.toctree)
+            if toctrees:
+                if toctrees[0].get('maxdepth'):
+                    tocdepth = int(toctrees[0].get('maxdepth'))
+                else:
+                    tocdepth = None
+            else:
+                tocdepth = None
             doctree = self.assemble_doctree(
                 docname, toctree_only,
                 appendices=((docclass != 'howto') and self.config.latex_appendices or []))
+            doctree['tocdepth'] = tocdepth
             self.post_process_images(doctree)
             self.info("writing... ", nonl=1)
             doctree.settings = docsettings
@@ -191,6 +201,9 @@ class LaTeXBuilder(Builder):
         # the logo is handled differently
         if self.config.latex_logo:
             logobase = path.basename(self.config.latex_logo)
-            copyfile(path.join(self.confdir, self.config.latex_logo),
-                     path.join(self.outdir, logobase))
+            logotarget = path.join(self.outdir, logobase)
+            if not path.isfile(path.join(self.confdir, self.config.latex_logo)):
+                raise SphinxError('logo file %r does not exist' % self.config.latex_logo)
+            elif not path.isfile(logotarget):
+                copyfile(path.join(self.confdir, self.config.latex_logo), logotarget)
         self.info('done')
diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
index b05c5b2..7201011 100644
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -17,7 +17,7 @@ from os import path
 
 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.parse import unquote
 from six.moves.urllib.error import HTTPError
 from six.moves.html_parser import HTMLParser
 from docutils import nodes
@@ -33,6 +33,7 @@ except ImportError:
         pass
 
 from sphinx.builders import Builder
+from sphinx.util import encode_uri
 from sphinx.util.console import purple, red, darkgreen, darkgray, \
     darkred, turquoise
 from sphinx.util.pycompat import TextIOWrapper
@@ -94,6 +95,17 @@ def check_anchor(f, hash):
     return parser.found
 
 
+def get_content_charset(f):
+    content_type = f.headers.get('content-type')
+    if content_type:
+        params = (p.strip() for p in content_type.split(';')[1:])
+        for param in params:
+            if param.startswith('charset='):
+                return param[8:]
+
+    return None
+
+
 class CheckExternalLinksBuilder(Builder):
     """
     Checks for broken external links.
@@ -153,15 +165,7 @@ class CheckExternalLinksBuilder(Builder):
             try:
                 req_url.encode('ascii')
             except UnicodeError:
-                split = urlsplit(req_url)
-                req_url = (split[0].encode() + '://' +       # scheme
-                           split[1].encode('idna') +         # netloc
-                           quote(split[2].encode('utf-8')))  # path
-                if split[3]:  # query
-                    req_url += '?' + quote(split[3].encode('utf-8'))
-                # go back to Unicode strings which is required by Python 3
-                # (but now all parts are pure ascii)
-                req_url = req_url.decode('ascii')
+                req_url = encode_uri(req_url)
 
             # need to actually check the URI
             try:
@@ -172,6 +176,8 @@ class CheckExternalLinksBuilder(Builder):
                     encoding = 'utf-8'
                     if hasattr(f.headers, 'get_content_charset'):
                         encoding = f.headers.get_content_charset() or encoding
+                    else:
+                        encoding = get_content_charset(f) or encoding
                     found = check_anchor(TextIOWrapper(f, encoding), unquote(hash))
                     f.close()
 
@@ -237,11 +243,12 @@ class CheckExternalLinksBuilder(Builder):
         elif status == 'working':
             self.info(darkgreen('ok        ')  + uri + info)
         elif status == 'broken':
-            self.info(red('broken    ') + uri + red(' - ' + info))
             self.write_entry('broken', docname, lineno, uri + ': ' + info)
-            if self.app.quiet:
+            if self.app.quiet or self.app.warningiserror:
                 self.warn('broken link: %s' % uri,
                           '%s:%s' % (self.env.doc2path(docname), lineno))
+            else:
+                self.info(red('broken    ') + uri + red(' - ' + info))
         elif status == 'redirected':
             text, color = {
                 301: ('permanently', darkred),
diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py
index e411836..e9d76bb 100644
--- a/sphinx/cmdline.py
+++ b/sphinx/cmdline.py
@@ -144,6 +144,10 @@ def main(argv):
                   file=sys.stderr)
             return 1
         outdir = abspath(args[1])
+        if srcdir == outdir:
+            print('Error: source directory and destination directory are same.',
+                  file=sys.stderr)
+            return 1
     except IndexError:
         parser.print_help()
         return 1
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py
index 09c2204..69b99d2 100644
--- a/sphinx/domains/cpp.py
+++ b/sphinx/domains/cpp.py
@@ -2659,6 +2659,9 @@ class CPPXRefRole(XRefRole):
         parent = env.ref_context.get('cpp:parent')
         if parent:
             refnode['cpp:parent'] = parent[:]
+        if refnode['reftype'] == 'any':
+            # Remove parentheses from the target (not from title)
+            title, target = self._fix_parens(env, True, title, target)
         if not has_explicit_title:
             target = target.lstrip('~')  # only has a meaning for the title
             # if the first character is a tilde, don't display the module/class
@@ -2731,6 +2734,15 @@ class CPPDomain(Domain):
                 if name not in self.data['objects']:
                     return None, None
             docname, ast = self.data['objects'][name]
+            if node['reftype'] == 'any' and ast.objectType == 'function':
+                title = contnode.pop(0).astext()
+                if title.endswith('()'):
+                    # remove parentheses
+                    title = title[:-2]
+                if env.config.add_function_parentheses:
+                    # add them back to all occurrences if configured
+                    title += '()'
+                contnode.insert(0, nodes.Text(title))
             return make_refnode(builder, fromdocname, docname, ast.newestId,
                                 contnode, name), ast.objectType
 
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py
index b0bf303..6e132e5 100644
--- a/sphinx/domains/std.py
+++ b/sphinx/domains/std.py
@@ -210,10 +210,6 @@ class Program(Directive):
 
 class OptionXRefRole(XRefRole):
     def process_link(self, env, refnode, has_explicit_title, title, target):
-        # validate content
-        if not re.match(r'(.+ )?[-/+\w]', target):
-            env.warn_node('Malformed :option: %r, does not contain option '
-                          'marker - or -- or / or +' % target, refnode)
         refnode['std:program'] = env.ref_context.get('std:program')
         return title, target
 
@@ -457,7 +453,7 @@ class StandardDomain(Domain):
         'productionlist': ProductionList,
     }
     roles = {
-        'option':  OptionXRefRole(),
+        'option':  OptionXRefRole(warn_dangling=True),
         'envvar':  EnvVarXRefRole(),
         # links to tokens in grammar productions
         'token':   XRefRole(),
@@ -495,6 +491,7 @@ class StandardDomain(Domain):
                 'the label must precede a section header)',
         'numref':  'undefined label: %(target)s',
         'keyword': 'unknown keyword: %(target)s',
+        'option': 'unknown option: %(target)s',
     }
 
     def clear_doc(self, docname):
@@ -664,22 +661,23 @@ class StandardDomain(Domain):
             return make_refnode(builder, fromdocname, docname,
                                 labelid, contnode)
         elif typ == 'option':
+            progname = node.get('std:program')
             target = target.strip()
-            # most obvious thing: we are a flag option without program
-            if target.startswith(('-', '/', '+')):
-                progname = node.get('std:program')
-            elif re.search(r'[-/+]', target):
-                try:
-                    progname, target = re.split(r' (?=-|--|/|\+)', target, 1)
-                except ValueError:
-                    return None
-                progname = ws_re.sub('-', progname.strip())
-            else:
-                progname = None
-            docname, labelid = self.data['progoptions'].get((progname, target),
-                                                            ('', ''))
+            docname, labelid = self.data['progoptions'].get((progname, target), ('', ''))
             if not docname:
-                return None
+                commands = []
+                while ws_re.search(target):
+                    subcommand, target = ws_re.split(target, 1)
+                    commands.append(subcommand)
+                    progname = "-".join(commands)
+
+                    docname, labelid = self.data['progoptions'].get((progname, target),
+                                                                    ('', ''))
+                    if docname:
+                        break
+                else:
+                    return None
+
             return make_refnode(builder, fromdocname, docname,
                                 labelid, contnode)
         else:
diff --git a/sphinx/environment.py b/sphinx/environment.py
index da92f2e..355901c 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -23,8 +23,8 @@ from os import path
 from glob import glob
 from itertools import groupby
 
-from six import iteritems, itervalues, text_type, class_types, string_types
-from six.moves import cPickle as pickle, zip
+from six import iteritems, itervalues, text_type, class_types, string_types, next
+from six.moves import cPickle as pickle
 from docutils import nodes
 from docutils.io import FileInput, NullOutput
 from docutils.core import Publisher
@@ -618,8 +618,8 @@ class BuildEnvironment:
             self._read_serial(docnames, app)
 
         if config.master_doc not in self.all_docs:
-            self.warn(None, 'master file %s not found' %
-                      self.doc2path(config.master_doc))
+            raise SphinxError('master file %s not found' %
+                              self.doc2path(config.master_doc))
 
         self.app = None
 
@@ -1655,7 +1655,7 @@ class BuildEnvironment:
                 for role in domain.roles:
                     res = domain.resolve_xref(self, refdoc, builder, role, target,
                                               node, contnode)
-                    if res:
+                    if res and isinstance(res[0], nodes.Element):
                         results.append(('%s:%s' % (domain.name, role), res))
         # now, see how many matches we got...
         if not results:
@@ -1950,54 +1950,31 @@ class BuildEnvironment:
                 for (key_, group) in groupby(newlist, keyfunc2)]
 
     def collect_relations(self):
+        traversed = set()
+
+        def traverse_toctree(parent, docname):
+            # traverse toctree by pre-order
+            yield parent, docname
+            traversed.add(docname)
+
+            for child in (self.toctree_includes.get(docname) or []):
+                for subparent, subdocname in traverse_toctree(docname, child):
+                    if subdocname not in traversed:
+                        yield subparent, subdocname
+                        traversed.add(subdocname)
+
         relations = {}
-        getinc = self.toctree_includes.get
... 3126 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