Commits

Georg Brandl committed 521df96 Merge

merge with 0.6

  • Participants
  • Parent commits 896888a, 23d4cf5

Comments (0)

Files changed (16)

 Release 0.6.4 (in development)
 ==============================
 
+* #238: In autodoc, catch all errors that occur on module import,
+  not just ``ImportError``.
+
 * Fix the handling of non-data, but non-method descriptors in autodoc.
 
+* When copying file times, ignore OSErrors raised by ``os.utime()``.
+
 
 Release 0.6.3 (Sep 03, 2009)
 ============================
 included, please mail to `the Google group
 <http://groups.google.com/group/sphinx-dev>`_.
 
+* Applied Mathematics at the Stellenbosch University: http://dip.sun.ac.za/
 * APSW: http://apsw.googlecode.com/svn/publish/index.html
+* ASE: https://wiki.fysik.dtu.dk/ase/
 * boostmpi: http://documen.tician.de/boostmpi/
 * Calibre: http://calibre.kovidgoyal.net/user_manual/
 * Chaco: http://code.enthought.com/projects/chaco/docs/html/
 * Djagios: http://djagios.org/
 * Django: http://docs.djangoproject.com/
 * F2py: http://www.f2py.org/html/
+* Fityk: http://www.unipress.waw.pl/fityk/
 * GeoDjango: http://geodjango.org/docs/
 * GeoServer: http://docs.geoserver.org/
 * Glashammer: http://glashammer.org/
+* GPAW: https://wiki.fysik.dtu.dk/gpaw/
 * Grok: http://grok.zope.org/doc/current/
+* GSL Shell: http://www.nongnu.org/gsl-shell/
 * Hedge: http://documen.tician.de/hedge/
 * IFM: http://fluffybunny.memebot.com/ifm-docs/index.html
 * Jinja: http://jinja.pocoo.org/2/documentation/
+* Kaa: http://doc.freevo.org/api/kaa/
 * LEPL: http://www.acooke.org/lepl/
 * MapServer: http://mapserver.org/
 * Matplotlib: http://matplotlib.sourceforge.net/

File doc/_templates/index.html

   </p>
 
   <h2>Documentation</h2>
+
   <table class="contentstable" align="center" style="margin-left: 30px"><tr>
     <td width="50%">
       <p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">Contents</a><br/>
     </td></tr>
   </table>
 
+  <p>You may also be interested in the very nice
+    <a href="http://matplotlib.sourceforge.net/sampledoc/">tutorial</a> on how to
+    create a customized documentation using Sphinx written by the matplotlib
+    developers.</p>
+
+  <p>There is a <a href="http://sphinx.shibu.jp/">Japanese translation</a>
+    of this documentation, thanks to Yoshiki Shibukawa.</p>
+
   <h2>Get Sphinx</h2>
   <p>
     Sphinx is available as an <a

File doc/builders.rst

 
    Its name is ``latex``.
 
+Note that a direct PDF builder using ReportLab is available in `rst2pdf
+<http://rst2pdf.googlecode.com>`_ version 0.12 or greater.  You need to add
+``'rst2pdf.pdfbuilder'`` to your :confval:`extensions` to enable it, its name is
+``pdf``.
+
 .. module:: sphinx.builders.text
 .. class:: TextBuilder
 

File doc/ext/inheritance.rst

 
    A dictionary of graphviz graph attributes for inheritance diagrams.
 
+   For example::
+
+      inheritance_graph_attrs = dict(rankdir="LR", size='"6.0, 8.0"',
+                                     fontsize=14, ratio='compress')
+
 .. confval:: inheritance_node_attrs
 
    A dictionary of graphviz node attributes for inheritance diagrams.
 
+   For example::
+
+      inheritance_node_attrs = dict(shape='ellipse', fontsize=14, height=0.75,
+                                    color='dodgerblue1', style='filled')
+
 .. confval:: inheritance_edge_attrs
 
    A dictionary of graphviz edge attributes for inheritance diagrams.
 How do I...
 -----------
 
+... create PDF files without LaTeX?
+   You can use `rst2pdf <http://rst2pdf.googlecode.com>`_ version 0.12 or greater
+   which comes with built-in Sphinx integration.  See the :ref:`builders`
+   section for details.
+
 ... get section numbers?
    They are automatic in LaTeX output; for HTML, give a ``:numbered:`` option to
    the :dir:`toctree` directive where you want to start numbering.

File sphinx/ext/autodoc.py

                 obj = self.get_attr(obj, part)
             self.object = obj
             return True
-        except (SyntaxError, ImportError, AttributeError), err:
+        # this used to only catch SyntaxError, ImportError and AttributeError,
+        # but importing modules with side effects can raise all kinds of errors
+        except Exception, err:
             self.directive.warn(
                 'autodoc can\'t import/find %s %r, it reported error: '
                 '"%s", please check your spelling and sys.path' %

File sphinx/ext/jsmath.py

 from docutils import nodes
 
 from sphinx.application import ExtensionError
-from sphinx.ext.mathbase import setup as mathbase_setup
+from sphinx.ext.mathbase import setup_math as mathbase_setup
 
 
 def html_visit_math(self, node):

File sphinx/ext/mathbase.py

         node[0] = nodes.Text(num, num)
 
 
-def setup(app, htmlinlinevisitors, htmldisplayvisitors):
+def setup_math(app, htmlinlinevisitors, htmldisplayvisitors):
     app.add_node(math,
                  latex=(latex_visit_math, None),
                  text=(text_visit_math, None),

File sphinx/ext/pngmath.py

 from sphinx.errors import SphinxError
 from sphinx.util import ensuredir
 from sphinx.util.png import read_png_depth, write_png_depth
-from sphinx.ext.mathbase import setup as mathbase_setup, wrap_displaymath
+from sphinx.ext.mathbase import setup_math as mathbase_setup, wrap_displaymath
 
 class MathExtError(SphinxError):
     category = 'Math extension error'

File sphinx/highlighting.py

 import sys
 import cgi
 import re
-import parser
 import textwrap
 
+try:
+    import parser
+except ImportError:
+    # parser is not available on Jython
+    parser = None
+
 from sphinx.util.texescape import tex_hl_escape_map
 
 try:
             # just replace all non-ASCII characters.
             src = src.encode('ascii', 'replace')
 
+        if parser is None:
+            return True
+
         try:
             parser.suite(src)
         except parsing_exceptions:

File sphinx/locale/nl/LC_MESSAGES/sphinx.js

-Documentation.addTranslations({"locale": "nl", "plural_expr": "(n != 1)", "messages": {"Search Results": "Zoekresultaten", "Preparing search...": "Het zoeken wordt voorbereid", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Uw zoekopdracht leverde geen resultaten op.  Controleer of alle woordencorrect gespeld zijn en dat u genoeg categori\u00ebn hebt geselecteerd.", "Search finished, found %s page(s) matching the search query.": "Zoeken voltooid, %s pagina(s) gevonden.", ", in ": "", "Permalink to this headline": "Permanente link naar deze titel", "Searching": "Zoeken", "Permalink to this definition": "Permanente link naar deze definitie", "module, in ": "module", "Hide Search Matches": "Zoekresultaten verbergen"}});
+<<<<<<< local
+Documentation.addTranslations({"locale": "nl", "plural_expr": "(n != 1)", "messages": {"Search Results": "Zoekresultaten", "Preparing search...": "Het zoeken wordt voorbereid", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Uw zoekopdracht leverde geen resultaten op.  Controleer of alle woordencorrect gespeld zijn en dat u genoeg categori\u00ebn hebt geselecteerd.", "Search finished, found %s page(s) matching the search query.": "Zoeken voltooid, %s pagina(s) gevonden.", ", in ": "", "Permalink to this headline": "Permanente link naar deze titel", "Searching": "Zoeken", "Permalink to this definition": "Permanente link naar deze definitie", "module, in ": "module", "Hide Search Matches": "Zoekresultaten verbergen"}});=======
+Documentation.addTranslations({"locale": "nl", "plural_expr": "(n != 1)", "messages": {"Search Results": "Zoekresultaten", "Preparing search...": "Het zoeken wordt voorbereid...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Uw zoekopdracht leverde geen resultaten op.  Controleer of alle woorden correct gespeld zijn en dat u genoeg categori\u00ebn hebt geselecteerd.", "Search finished, found %s page(s) matching the search query.": "Zoeken voltooid, %s pagina(s) gevonden.", ", in ": ", in ", "Permalink to this headline": "Permanente link naar deze titel", "Searching": "Zoeken", "Permalink to this definition": "Permanente link naar deze definitie", "module, in ": "module, in", "Hide Search Matches": "Zoekresultaten verbergen"}});>>>>>>> other

File sphinx/locale/nl/LC_MESSAGES/sphinx.mo

Binary file modified.

File sphinx/locale/nl/LC_MESSAGES/sphinx.po

 msgstr ""
 "Project-Id-Version: Sphinx 0.5\n"
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2008-09-11 23:58+0200\n"
-"PO-Revision-Date: 2009-08-06 23:04+0200\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2009-08-06 23:04+0200\n"
+"PO-Revision-Date: 2009-11-03 15:55+0100\n"
+"Last-Translator: Marijn van der Zee <marijn.vanderzee@gmail.com>\n"
 "Language-Team: nl <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
 "Generated-By: Babel 0.9.4\n"
 
-#: sphinx/environment.py:103 sphinx/writers/latex.py:184
+#: sphinx/environment.py:103
+#: sphinx/writers/latex.py:184
 #, python-format
 msgid "%B %d, %Y"
 msgstr "%d. %B %Y"
 
-#: sphinx/environment.py:324 sphinx/themes/basic/genindex-single.html:2
+#: sphinx/environment.py:324
+#: sphinx/themes/basic/genindex-single.html:2
 #: sphinx/themes/basic/genindex-split.html:2
 #: sphinx/themes/basic/genindex-split.html:5
-#: sphinx/themes/basic/genindex.html:2 sphinx/themes/basic/genindex.html:5
-#: sphinx/themes/basic/genindex.html:48 sphinx/themes/basic/layout.html:134
+#: sphinx/themes/basic/genindex.html:2
+#: sphinx/themes/basic/genindex.html:5
+#: sphinx/themes/basic/genindex.html:48
+#: sphinx/themes/basic/layout.html:134
 #: sphinx/writers/latex.py:190
 msgid "Index"
 msgstr "Index"
 
-#: sphinx/environment.py:325 sphinx/writers/latex.py:189
+#: sphinx/environment.py:325
+#: sphinx/writers/latex.py:189
 msgid "Module Index"
 msgstr "Module-index"
 
-#: sphinx/environment.py:326 sphinx/themes/basic/defindex.html:16
+#: sphinx/environment.py:326
+#: sphinx/themes/basic/defindex.html:16
 msgid "Search Page"
 msgstr "Zoekpagina"
 
-#: sphinx/roles.py:55 sphinx/directives/desc.py:747
+#: sphinx/roles.py:55
+#: sphinx/directives/desc.py:747
 #, python-format
 msgid "environment variable; %s"
-msgstr "Omgevingsvariabele; %s"
+msgstr "omgevingsvariabele; %s"
 
 #: sphinx/roles.py:62
 #, python-format
 msgid "%b %d, %Y"
 msgstr "%d.%b.%Y"
 
-#: sphinx/builders/html.py:241 sphinx/themes/basic/defindex.html:21
+#: sphinx/builders/html.py:241
+#: sphinx/themes/basic/defindex.html:21
 msgid "General Index"
 msgstr "Algemene index"
 
 msgid "index"
 msgstr "Index"
 
-#: sphinx/builders/html.py:243 sphinx/builders/htmlhelp.py:219
-#: sphinx/builders/qthelp.py:133 sphinx/themes/basic/defindex.html:19
-#: sphinx/themes/basic/modindex.html:2 sphinx/themes/basic/modindex.html:13
+#: sphinx/builders/html.py:243
+#: sphinx/builders/htmlhelp.py:219
+#: sphinx/builders/qthelp.py:133
+#: sphinx/themes/basic/defindex.html:19
+#: sphinx/themes/basic/modindex.html:2
+#: sphinx/themes/basic/modindex.html:13
 msgid "Global Module Index"
 msgstr "Globale Module-index"
 
 msgstr "Return type"
 
 #: sphinx/directives/desc.py:186
-#, fuzzy
 msgid "Parameter"
-msgstr "Parameters"
+msgstr "Parameter"
 
 #: sphinx/directives/desc.py:190
 msgid "Parameters"
 msgid "%s() (built-in function)"
 msgstr "%s() (geïntegreerde functie)"
 
-#: sphinx/directives/desc.py:419 sphinx/directives/desc.py:476
+#: sphinx/directives/desc.py:419
+#: sphinx/directives/desc.py:476
 #: sphinx/directives/desc.py:488
 #, python-format
 msgid "%s() (in module %s)"
 msgid "%s (built-in variable)"
 msgstr "%s (geïntegreerde variabele)"
 
-#: sphinx/directives/desc.py:423 sphinx/directives/desc.py:514
+#: sphinx/directives/desc.py:423
+#: sphinx/directives/desc.py:514
 #, python-format
 msgid "%s (in module %s)"
 msgstr "%s (in module %s)"
 
 #: sphinx/directives/desc.py:439
-#, fuzzy, python-format
+#, python-format
 msgid "%s (built-in class)"
-msgstr "%s (geïntegreerde variabele)"
+msgstr "%s (geïntegreerde klasse)"
 
 #: sphinx/directives/desc.py:440
 #, python-format
 msgstr "%s (C-variabele)"
 
 #: sphinx/directives/desc.py:665
-#, fuzzy, python-format
+#, python-format
 msgid "%scommand line option; %s"
-msgstr "%scommandolijn optie; %s"
+msgstr "%sopdrachtregel optie; %s"
 
 #: sphinx/directives/other.py:140
 msgid "Platforms: "
 
 #: sphinx/ext/todo.py:41
 msgid "Todo"
-msgstr ""
+msgstr "Te doen"
 
 #: sphinx/ext/todo.py:99
 #, python-format
 msgid "(The original entry is located in %s, line %d and can be found "
-msgstr ""
+msgstr "(Het originele item is te vinden in %s, regel %d en kan gevonden worden hier"
 
 #: sphinx/ext/todo.py:105
 msgid "here"
-msgstr ""
+msgstr "hier"
 
 #: sphinx/locale/__init__.py:15
 msgid "Attention"
 
 #: sphinx/locale/__init__.py:22
 msgid "See Also"
-msgstr "Zie Ook"
+msgstr "Zie ook"
 
 #: sphinx/locale/__init__.py:23
 msgid "Tip"
 
 #: sphinx/themes/basic/defindex.html:14
 msgid "Complete Table of Contents"
-msgstr "Volledige inhoudstafel"
+msgstr "Volledige inhoudsopgave"
 
 #: sphinx/themes/basic/defindex.html:15
 msgid "lists all sections and subsections"
 
 #: sphinx/themes/basic/layout.html:42
 msgid "Table Of Contents"
-msgstr "Inhoudstafel"
+msgstr "Inhoudsopgave"
 
 #: sphinx/themes/basic/layout.html:48
 msgid "Previous topic"
 
 #: sphinx/themes/basic/layout.html:60
 msgid "This Page"
-msgstr "Deze Pagina"
+msgstr "Deze pagina"
 
 #: sphinx/themes/basic/layout.html:63
 msgid "Show Source"
 
 #: sphinx/themes/basic/layout.html:76
 msgid "Go"
-msgstr "Go"
+msgstr "Ga"
 
 #: sphinx/themes/basic/layout.html:81
-#, fuzzy
 msgid "Enter search terms or a module, class or function name."
-msgstr "Geef de naam van een module, klasse of functie."
+msgstr "Geef zoekterm of de naam van een module, klasse of functie."
 
 #: sphinx/themes/basic/layout.html:122
 #, python-format
 msgid "About these documents"
 msgstr "Over deze documenten"
 
-#: sphinx/themes/basic/layout.html:137 sphinx/themes/basic/search.html:2
+#: sphinx/themes/basic/layout.html:137
+#: sphinx/themes/basic/search.html:2
 #: sphinx/themes/basic/search.html:5
 msgid "Search"
 msgstr "Zoeken"
 
 #: sphinx/themes/basic/layout.html:196
 #, python-format
-msgid ""
-"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
-"%(sphinx_version)s."
-msgstr ""
-"Aangemaakt met <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
-"%(sphinx_version)s."
+msgid "Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
+msgstr "Aangemaakt met <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)s."
 
 #: sphinx/themes/basic/modindex.html:36
 msgid "Deprecated"
 msgid ""
 "Please activate JavaScript to enable the search\n"
 "    functionality."
-msgstr ""
+msgstr "Activeer JavaSscript om de zoekfunctionaliteit in te schakelen."
 
 #: sphinx/themes/basic/search.html:14
-#, fuzzy
 msgid ""
 "From here you can search these documents. Enter your search\n"
 "    words into the box below and click \"search\". Note that the search\n"
 "    containing fewer words won't appear in the result list."
 msgstr ""
 "Hier kan u de documenten doorzoeken.  Geef enkele trefwoorden\n"
-"    in het veld hieronder en klik \"zoeken\".  Merk op dat de zoekfunctie"
-"\n"
-"    steeds naar alle woorden zoekt.  Pagina's die minder woorden bevatten"
-"\n"
+"    in het veld hieronder en klik \"zoeken\".  Merk op dat de zoekfunctie\n"
+"    steeds naar alle woorden zoekt.  Pagina's die minder woorden bevatten\n"
 "    zullen niet tussen de resultaten verschijnen."
 
 #: sphinx/themes/basic/search.html:21
 msgid "Other changes"
 msgstr "Andere veranderingen"
 
-#: sphinx/themes/basic/static/doctools.js:139 sphinx/writers/html.py:473
+#: sphinx/themes/basic/static/doctools.js:139
+#: sphinx/writers/html.py:473
 #: sphinx/writers/html.py:478
 msgid "Permalink to this headline"
 msgstr "Permanente link naar deze titel"
 
-#: sphinx/themes/basic/static/doctools.js:145 sphinx/writers/html.py:80
+#: sphinx/themes/basic/static/doctools.js:145
+#: sphinx/writers/html.py:80
 msgid "Permalink to this definition"
 msgstr "Permanente link naar deze definitie"
 
 
 #: sphinx/themes/basic/static/searchtools.js:279
 msgid "Preparing search..."
-msgstr "Het zoeken wordt voorbereid"
+msgstr "Het zoeken wordt voorbereid..."
 
 #: sphinx/themes/basic/static/searchtools.js:347
-#, fuzzy
 msgid "module, in "
-msgstr "module"
+msgstr "module, in"
 
 #: sphinx/themes/basic/static/searchtools.js:356
 msgid ", in "
-msgstr ""
+msgstr ", in "
 
 #: sphinx/themes/basic/static/searchtools.js:464
-msgid ""
-"Your search did not match any documents. Please make sure that all words "
-"are spelled correctly and that you've selected enough categories."
-msgstr ""
-"Uw zoekopdracht leverde geen resultaten op.  Controleer of alle "
-"woordencorrect gespeld zijn en dat u genoeg categoriën hebt geselecteerd."
+msgid "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
+msgstr "Uw zoekopdracht leverde geen resultaten op.  Controleer of alle woorden correct gespeld zijn en dat u genoeg categoriën hebt geselecteerd."
 
 #: sphinx/themes/basic/static/searchtools.js:466
 #, python-format
 
 #: sphinx/writers/latex.py:578
 msgid "Footnotes"
-msgstr ""
+msgstr "Voetnoten"
 
 #: sphinx/writers/latex.py:646
 msgid "continued from previous page"
-msgstr ""
+msgstr "Vervolgd van vorige pagina"
 
 #: sphinx/writers/latex.py:651
-#, fuzzy
 msgid "Continued on next page"
-msgstr "Volledige index op een pagina"
+msgstr "Vervolgd op volgende pagina"
 
 #: sphinx/writers/text.py:166
 #, python-format

File sphinx/themes/basic/layout.html

   <head>
     <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" />
     {{ metatags }}
-    {%- if not embedded %}
+    {%- if not embedded and docstitle %}
       {%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
     {%- else %}
       {%- set titlesuffix = "" %}

File sphinx/util/__init__.py

 import sys
 import stat
 import time
+import errno
 import types
 import shutil
 import fnmatch
     try:
         os.makedirs(path)
     except OSError, err:
-        if not err.errno == 17:
+        # 0 for Jython/Win32
+        if err.errno not in [0, getattr(errno, 'EEXIST', 0)]:
             raise
 
 
     try:
         # don't do full copystat because the source may be read-only
         copytimes(source, dest)
-    except shutil.Error:
+    except OSError:
         pass