Commits

Georg Brandl committed b7c2609 Merge

merge with main

  • Participants
  • Parent commits 6033307, 3cb7180

Comments (0)

Files changed (49)

     the directive -- this allows you to define your document
     structure, but place the links yourself.
 
+  - Image paths can now be absolute (like ``/images/foo.png``).
+    They are treated as relative to the top source directory.
+
   - #52: There is now a ``hlist`` directive, creating a compact
     list by placing distributing items into multiple columns.
 
   - #23: Added a ``classmethod`` directive along with ``method``
     and ``staticmethod``.
 
-  - Added a toctree variable to the templates, and the ability to
-    include external links in toctrees.
+  - Added a ``toctree`` callable to the templates, and the ability
+    to include external links in toctrees.
 
 * Configuration:
 
+  - The new config value ``rst_epilog`` can contain reST that is
+    appended to each source file that is read.  This is the right
+    place for global substitutions.
+
   - The new ``html_add_permalinks`` config value can be used to
     switch off the generated "paragraph sign" permalinks for each
     heading and definition environment.
   - The new ``html_show_sourcelink`` config value can be used to
     switch off the links to the reST sources in the sidebar.
 
+  - The new ``html_collapse_toctree`` config value can be used to
+    "collapse" the generated toctree given to the templates.
+
   - The default value for ``htmlhelp_basename`` is now the project
     title, cleaned up as a filename.
 
+
   - The new ``modindex_common_prefix`` config value can be used to
     ignore certain package names for module index sorting.
 
+  - The new ``trim_footnote_reference_space`` config value mirrors
+    the docutils config value of the same name and removes the
+    space before a footnote reference that is necessary for reST
+    to recognize the reference.
+
 * Builders:
 
   - New builder for Qt help collections, by Antonio Valentino.
   
   - Italian by Sandro Dentella.
 
+  - Ukrainian by Petro Sasnyk.
+
+  - Finnish by Jukka Inkeri.
+
 * Extensions and API:
 
   - Autodoc now handles documented attributes.
 
   - Autodoc now handles inner classes and their methods.
 
+  - Autodoc can document classes as functions now if explicitly
+    marked with `autofunction`.
+
   - There is now a ``Sphinx.add_lexer()`` method to be able to use
     custom Pygments lexers easily.
 
 Release 0.5.2 (in development)
 ==============================
 
+* Recognize toctree directives that are not on section toplevel,
+  but within block items, such as tables.
+
+* Use a new RFC base URL, since rfc.org seems down.
+
+* Fix a crash in the todolist directive when no todo items are
+  defined.
+
+* Don't call LaTeX or dvipng over and over again if it was not
+  found once, and use text-only latex as a substitute in that case.
+
+* Fix problems with footnotes in the LaTeX output.
+
+* Prevent double hyphens becoming en-dashes in literal code in
+  the LaTeX output.
+
 * Open literalinclude files in universal newline mode to allow
   arbitrary newline conventions.
 
 <http://groups.google.com/group/sphinx-dev>`_.
 
 * APSW: http://apsw.googlecode.com/svn/publish/index.html
+* boostmpi: http://documen.tician.de/boostmpi/
 * Calibre: http://calibre.kovidgoyal.net/user_manual/
 * Chaco: http://code.enthought.com/projects/chaco/docs/html/
+* CodePy: http://documen.tician.de/codepy/
 * Cython: http://docs.cython.org/
 * Director: http://packages.python.org/director/
 * Django: http://docs.djangoproject.com/
 * GeoDjango: http://geodjango.org/docs/
 * Glashammer: http://glashammer.org/
 * Grok: http://grok.zope.org/doc/current/
+* Hedge: http://documen.tician.de/hedge/
 * IFM: http://fluffybunny.memebot.com/ifm-docs/index.html
 * Jinja: http://jinja.pocoo.org/2/documentation/
 * MapServer: http://mapserver.osgeo.org/
 * Matplotlib: http://matplotlib.sourceforge.net/
 * Mayavi: http://code.enthought.com/projects/mayavi/docs/development/html/mayavi
+* MeshPy: http://documen.tician.de/meshpy/
 * Mixin.com: http://dev.mixin.com/
 * mpmath: http://mpmath.googlecode.com/svn/trunk/doc/build/index.html
 * NetworkX: http://networkx.lanl.gov/
 * NumPy: http://docs.scipy.org/doc/numpy/reference/
 * ObjectListView: http://objectlistview.sourceforge.net/python
 * OpenLayers: http://docs.openlayers.org/
+* openWNS: http://docs.openwns.org/
 * Paste: http://pythonpaste.org/script/
 * Paver: http://www.blueskyonmars.com/projects/paver/
 * Py on Windows: http://timgolden.me.uk/python-on-windows/
+* PyCuda: http://documen.tician.de/pycuda/
 * PyEphem: http://rhodesmill.org/pyephem/
+* Pyevolve: http://pyevolve.sourceforge.net/
+* Pylo: http://documen.tician.de/pylo/
+* Pylons: http://docs.pylonshq.com/
 * PyPubSub: http://pubsub.sourceforge.net/
-* PyUblas: http://tiker.net/doc/pyublas/
-* Pylons: http://docs.pylonshq.com/
+* pyrticle: http://documen.tician.de/pyrticle/
 * Pysparse: http://pysparse.sourceforge.net/
 * Python: http://docs.python.org/dev/
 * python-apt: http://people.debian.org/~jak/python-apt-doc/
+* PyUblas: http://documen.tician.de/pyublas/
 * Reteisi: http://docs.argolinux.org/reteisi/
+* Roundup: http://www.roundup-tracker.org/
 * Satchmo: http://www.satchmoproject.com/docs/svn/
 * Self: http://selflanguage.org/
+* SimPy: http://simpy.sourceforge.net/
 * Sphinx: http://sphinx.pocoo.org/
 * SQLAlchemy: http://www.sqlalchemy.org/docs/
 * Sqlkit: http://sqlkit.argolinux.org/
      chapter", "previous chapter" and "parent chapter" links.
 
    Document titles in the :dir:`toctree` will be automatically read from the
-   title of the referenced document. If that isn't what you want, you can give
-   the specify an explicit title and target using a similar syntax to reST
+   title of the referenced document. If that isn't what you want, you can
+   specify an explicit title and target using a similar syntax to reST
    hyperlinks (and Sphinx's :ref:`cross-referencing syntax <xref-syntax>`). This
    looks like::
 

doc/conf.py

File contents unchanged.
    instance is then used to render HTML documents, and possibly the output of
    other builders (currently the changes builder).
 
+.. confval:: rst_epilog
+
+   .. index:: pair: global; substitutions
+
+   A string of reStructuredText that will be included at the end of every source
+   file that is read.  This is the right place to add substitutions that should
+   be available in every file.  An example::
+
+      rst_epilog = """
+      .. |psf| replace:: Python Software Foundation
+      """
+
+   .. versionadded:: 0.6
+   
 .. confval:: default_role
 
+   .. index:: default; role
+
    The name of a reST role (builtin or Sphinx extension) to use as the default
    role, that is, for text marked up ```like this```.  This can be set to
    ``'obj'`` to make ```filter``` a cross-reference to the function "filter".
    * ``de`` -- German
    * ``en`` -- English
    * ``es`` -- Spanish
+   * ``fi`` -- Finnish
    * ``fr`` -- French
    * ``it`` -- Italian
    * ``nl`` -- Dutch
    * ``pl`` -- Polish
    * ``pt_BR`` -- Brazilian Portuguese
    * ``sl`` -- Slovenian
+   * ``uk_UA`` -- Ukrainian
    * ``zh_TW`` -- Traditional Chinese
 
 .. confval:: today
    A boolean that decides whether :dir:`moduleauthor` and :dir:`sectionauthor`
    directives produce any output in the built files.
 
+.. confval:: trim_footnote_reference_space
 
+   Trim spaces before footnote references that are necessary for the reST parser
+   to recognize the footnote, but do not look too nice in the output.
+
+   .. versionadded:: 0.6
+
+   
 .. _html-options:
 
 Options for HTML output
 
    .. versionadded:: 0.4
 
+.. confval:: html_collapse_toctree
+
+   If true, the toctree given to the templates as ``toctree`` will be collapsed,
+   i.e. only the subitems that contain the current page are visible.  Default is
+   ``False``.
+
+   .. versionadded:: 0.6
+
 .. confval:: htmlhelp_basename
 
    Output file base name for HTML help builder.  Default is ``'pydoc'``.
    templating
    extensions
 
+   faq
    glossary
    changes
    examples
 
 .. note::
 
-   :mod:`sphinx.ext.mathbase` does not need to be added to the
-   :confval:`extensions` config value.
+   :mod:`sphinx.ext.mathbase` is not meant to be added to the
+   :confval:`extensions` config value, instead, use either
+   :mod:`sphinx.ext.pngmath` or :mod:`sphinx.ext.jsmath` as described below.
 
 The input language for mathematics is LaTeX markup.  This is the de-facto
 standard for plain-text math notation and has the added advantage that no
+.. _faq:
+
+Sphinx FAQ
+==========
+
+This is a list of Frequently Asked Questions about Sphinx.  Feel free to
+suggest new entries!
+
+How do I...
+-----------
+
+... add global substitutions?
+   Add them in the :confval:`rst_epilog` config value.
+
+... use Sphinx with Epydoc?
+   There's a third-party extension providing an `api role`_ which refers to
+   Epydoc's API docs for a given identifier.
+
+
+.. _api role: http://git.savannah.gnu.org/cgit/kenozooid.git/tree/doc/extapi.py
    .. image:: gnu.png
       (options)
 
-When used within Sphinx, the file name given (here ``gnu.png``) must be relative
-to the source file, and Sphinx will automatically copy image files over to a
-subdirectory of the output directory on building (e.g. the ``_static`` directory
-for HTML output.)
+When used within Sphinx, the file name given (here ``gnu.png``) must either be
+relative to the source file, or absolute which means that they are relative to
+the top source directory.  For example, the file ``sketch/spam.rst`` could refer
+to the image ``images/spam.png`` as ``../images/spam.png`` or
+``/images/spam.png``.
+
+Sphinx will automatically copy image files over to a subdirectory of the output
+directory on building (e.g. the ``_static`` directory for HTML output.)
 
 Interpretation of image size options (``width`` and ``height``) is as follows:
 if the size has no unit or the unit is pixels, the given size will only be
 .. versionchanged:: 0.4
    Added the support for file names ending in an asterisk.
 
+.. versionchanged:: 0.6
+   Image paths can now be absolute.
+
 
 Footnotes
 ---------

sphinx/application.py

 from docutils import nodes
 from docutils.parsers.rst import directives, roles
 
-import sphinx
-from sphinx.roles import xfileref_role, innernodetypes
-from sphinx.config import Config
-from sphinx.builders import BUILTIN_BUILDERS
-from sphinx.directives import desc_directive, target_directive, \
-     additional_xref_types
-from sphinx.environment import SphinxStandaloneReader
-from sphinx.util.console import bold
-
+# create the error classes before importing the rest of Sphinx, so that
+# they can be imported in a circular fashion
 
 class SphinxError(Exception):
     """
         return parent_str
 
 
+import sphinx
+from sphinx.roles import xfileref_role, innernodetypes
+from sphinx.config import Config
+from sphinx.builders import BUILTIN_BUILDERS
+from sphinx.directives import desc_directive, target_directive, \
+     additional_xref_types
+from sphinx.environment import SphinxStandaloneReader
+from sphinx.util.console import bold
+
+
 # List of all known core events. Maps name to arguments description.
 events = {
     'builder-inited': '',

sphinx/builder.py

File contents unchanged.

sphinx/builders/html.py

     movefile, ustrftime
 from sphinx.search import js_index
 from sphinx.builders import Builder, ENV_PICKLE_FILENAME
+from sphinx.application import SphinxError
 from sphinx.highlighting import PygmentsBridge
 from sphinx.util.console import bold
 from sphinx.writers.html import HTMLWriter, HTMLTranslator, \
         )
         self.globalcontext.update(self.config.html_context)
 
+    def _get_local_toctree(self, docname):
+        return self.render_partial(self.env.get_toctree_for(
+            docname, self, self.config.html_collapse_toctree))['fragment']
+
     def get_doc_context(self, docname, body, metatags):
         """Collect items for the template context of a page."""
         # find out relations
                          [path.join(self.confdir, spath)
                           for spath in self.config.html_static_path]
         for staticdirname in staticdirnames:
+            if not path.isdir(staticdirname):
+                self.warn('static directory %r does not exist' % staticdirname)
+                continue
             for filename in os.listdir(staticdirname):
                 if filename.startswith('.'):
                     continue
         ctx['pathto'] = pathto
         ctx['hasdoc'] = lambda name: name in self.env.all_docs
         ctx['customsidebar'] = self.config.html_sidebars.get(pagename)
+        ctx['toctree'] = lambda: self._get_local_toctree(pagename)
         ctx.update(addctx)
 
         self.app.emit('html-page-context', pagename, templatename,
 
     def init(self):
         if json is None:
-            from sphinx.application import SphinxError
             raise SphinxError(
                 'The module simplejson (or json in Python >= 2.6) '
                 'is not available. The JSONHTMLBuilder builder will not work.')

sphinx/builders/latex.py

         else:
             return '%' + docname
 
+    def get_relative_uri(self, from_, to, typ=None):
+        # ignore source path
+        return self.get_target_uri(to, typ)
+
     def init_document_data(self):
         preliminary_document_data = map(list, self.config.latex_documents)
         if not preliminary_document_data:
             self.titles.append((docname, entry[2]))
 
     def write(self, *ignored):
-        # first, assemble the "appendix" docs that are in every PDF
-        appendices = []
-        for fname in self.config.latex_appendices:
-            appendices.append(self.env.get_doctree(fname))
-
         docwriter = LaTeXWriter(self)
         docsettings = OptionParser(
             defaults=self.env.settings,
                 encoding='utf-8')
             self.info("processing " + targetname + "... ", nonl=1)
             doctree = self.assemble_doctree(docname, toctree_only,
-                appendices=(docclass == 'manual') and appendices or [])
+                appendices=((docclass == 'manual') and
+                            self.config.latex_appendices or []))
             self.post_process_images(doctree)
             self.info("writing... ", nonl=1)
             doctree.settings = docsettings
                 new_sect += node
             tree = new_tree
         largetree = process_tree(indexfile, tree)
-        largetree.extend(appendices)
+        largetree['docname'] = indexfile
+        for docname in appendices:
+            appendix = self.env.get_doctree(docname)
+            appendix['docname'] = docname
+            largetree.append(appendix)
         self.info()
         self.info("resolving references...")
         self.env.resolve_references(largetree, indexfile, self)
         default_role = (None, True),
         add_function_parentheses = (True, True),
         add_module_names = (True, True),
+        trim_footnote_reference_space = (False, True),
         show_authors = (False, True),
         pygments_style = (None, False),
         highlight_language = ('python', False),
         template_bridge = (None, False),
         keep_warnings = (False, True),
         modindex_common_prefix = ([], False),
+        rst_epilog = (None, True),
 
         # HTML options
         html_theme = ('default', False),
         html_use_smartypants = (True, False),
         html_translator_class = (None, False),
         html_sidebars = ({}, False),
+        html_collapse_toctree = (False, False),
         html_additional_pages = ({}, False),
         html_use_modindex = (True, False),
         html_add_permalinks = (True, False),

sphinx/directives/desc.py

     env = state.document.settings.env
     inode = addnodes.index(entries=[])
     node = addnodes.desc()
+    node.document = state.document
     node['desctype'] = desctype
 
     noindex = ('noindex' in options)
             inode['entries'].append(('single', indextext, fullname, fullname))
 
     subnode = addnodes.desc_content()
+    node.append(subnode)
     # needed for automatic qualification of members
     clsname_set = False
     if desctype in ('class', 'exception') and names:
     if clsname_set:
         env.currclass = None
     env.currdesc = None
-    node.append(subnode)
     return [inode, node]
 
 desc_directive.content = 1

sphinx/directives/other.py

 
 from sphinx import addnodes
 from sphinx.locale import pairindextypes
-from sphinx.util import patfilter, ws_re, caption_ref_re, docname_join
+from sphinx.util import patfilter, ws_re, caption_ref_re, url_re, docname_join
 from sphinx.util.compat import make_admonition
 
 
                 docname = docname[:-len(suffix)]
             # absolutize filenames
             docname = docname_join(env.docname, docname)
-            if ref.startswith('http://'): # FIXME: generalize to arbitrary xrefs
+            if url_re.match(ref):
                 entries.append((title, ref))
             elif docname not in env.found_docs:
                 ret.append(state.document.reporter.warning(
                     'toctree references unknown document %r' % docname,
                     line=lineno))
             else:
-                entries.append((title, ref))
+                entries.append((title, docname))
                 includefiles.append(docname)
         else:
             patname = docname_join(env.docname, entry)
 def version_directive(name, arguments, options, content, lineno,
                       content_offset, block_text, state, state_machine):
     node = addnodes.versionmodified()
+    node.document = state.document
     node['type'] = name
     node['version'] = arguments[0]
     if len(arguments) == 2:
     """Glossary with cross-reference targets for :term: roles."""
     env = state.document.settings.env
     node = addnodes.glossary()
+    node.document = state.document
     state.nested_parse(content, content_offset, node)
 
     # the content should be definition lists
 def acks_directive(name, arguments, options, content, lineno,
                    content_offset, block_text, state, state_machine):
     node = addnodes.acks()
+    node.document = state.document
     state.nested_parse(content, content_offset, node)
     if len(node.children) != 1 or not isinstance(node.children[0],
                                                  nodes.bullet_list):
                     content_offset, block_text, state, state_machine):
     ncolumns = options.get('columns', 2)
     node = nodes.paragraph()
+    node.document = state.document
     state.nested_parse(content, content_offset, node)
     if len(node.children) != 1 or not isinstance(node.children[0],
                                                  nodes.bullet_list):

sphinx/environment.py

 
 from sphinx import addnodes
 from sphinx.util import movefile, get_matching_docs, SEP, ustrftime, \
-     docname_join, FilenameUniqDict
+     docname_join, FilenameUniqDict, url_re
 from sphinx.directives import additional_xref_types
+from sphinx.application import SphinxError
 
 default_settings = {
     'embed_stylesheet': False,
     'cloak_email_addresses': True,
     'pep_base_url': 'http://www.python.org/dev/peps/',
-    'rfc_base_url': 'http://rfc.net/',
+    'rfc_base_url': 'http://tools.ietf.org/html/',
     'input_encoding': 'utf-8',
     'doctitle_xform': False,
     'sectsubtitle_xform': False,
 
 # This is increased every time an environment attribute is added
 # or changed to properly invalidate pickle files.
-ENV_VERSION = 27
+ENV_VERSION = 28
 
 
 default_substitutions = set([
 
         self.docname = docname
         self.settings['input_encoding'] = self.config.source_encoding
+        self.settings['trim_footnote_reference_space'] = \
+            self.config.trim_footnote_reference_space
 
         class SphinxSourceClass(FileInput):
-            def read(self):
-                data = FileInput.read(self)
+            def read(self_):
+                data = FileInput.read(self_)
                 if app:
                     arg = [data]
                     app.emit('source-read', docname, arg)
                     data = arg[0]
-                return data
+                if self.config.rst_epilog:
+                    return data + '\n' + self.config.rst_epilog + '\n'
+                else:
+                    return data
 
         # publish manually
         pub = Publisher(reader=SphinxStandaloneReader(),
             pub.publish()
             doctree = pub.document
         except UnicodeError, err:
-            from sphinx.application import SphinxError
             raise SphinxError(str(err))
         self.filter_messages(doctree)
         self.process_dependencies(docname, doctree)
                 candidates['?'] = imguri
                 continue
             # imgpath is the image path *from srcdir*
-            imgpath = path.normpath(path.join(docdir, imguri))
+            if imguri.startswith('/') or imguri.startswith(os.sep):
+                # absolute path (= relative to srcdir)
+                imgpath = path.normpath(imguri[1:])
+            else:
+                imgpath = path.normpath(path.join(docdir, imguri))
             # set imgpath as default URI
             node['uri'] = imgpath
             if imgpath.endswith(os.extsep + '*'):
         except ValueError:
             maxdepth = 0
 
+        def traverse_in_section(node, cls):
+            """Like traverse(), but stay within the same section."""
+            result = []
+            if isinstance(node, cls):
+                result.append(node)
+            for child in node.children:
+                if isinstance(child, nodes.section):
+                    continue
+                result.extend(traverse_in_section(child, cls))
+            return result
+
         def build_toc(node, depth=1):
             entries = []
-            for subnode in node:
-                if isinstance(subnode, addnodes.toctree):
-                    # just copy the toctree node which is then resolved
-                    # in self.get_and_resolve_doctree
-                    item = subnode.copy()
-                    entries.append(item)
-                    # do the inventory stuff
-                    self.note_toctree(docname, subnode)
+            for sectionnode in node:
+                # find all toctree nodes in this section and add them
+                # to the toc (just copying the toctree node which is then
+                # resolved in self.get_and_resolve_doctree)
+                if not isinstance(sectionnode, nodes.section):
+                    for toctreenode in traverse_in_section(sectionnode,
+                                                           addnodes.toctree):
+                        item = toctreenode.copy()
+                        entries.append(item)
+                        # important: do the inventory stuff
+                        self.note_toctree(docname, toctreenode)
                     continue
-                if not isinstance(subnode, nodes.section):
-                    continue
-                title = subnode[0]
+                title = sectionnode[0]
                 # copy the contents of the section title, but without references
                 # and unnecessary stuff
                 visitor = SphinxContentsFilter(document)
                     # as it is the file's title anyway
                     anchorname = ''
                 else:
-                    anchorname = '#' + subnode['ids'][0]
+                    anchorname = '#' + sectionnode['ids'][0]
                 numentries[0] += 1
                 reference = nodes.reference('', '', refuri=docname,
                                             anchorname=anchorname,
                 para = addnodes.compact_paragraph('', '', reference)
                 item = nodes.list_item('', para)
                 if maxdepth == 0 or depth < maxdepth:
-                    item += build_toc(subnode, depth+1)
+                    item += build_toc(sectionnode, depth+1)
                 entries.append(item)
             if entries:
                 return nodes.bullet_list('', *entries)
             node['refuri'] = node['anchorname']
         return toc
 
-    def get_toctree_for(self, docname, builder):
+    def get_toctree_for(self, docname, builder, collapse):
         """Return the global TOC nodetree."""
-
-        # XXX why master_doc?
         doctree = self.get_doctree(self.config.master_doc)
         for toctreenode in doctree.traverse(addnodes.toctree):
             result = self.resolve_toctree(docname, builder, toctreenode,
-                                          prune=True)
+                                          prune=True, collapse=collapse)
             if result is not None:
                 return result
 
         return doctree
 
     def resolve_toctree(self, docname, builder, toctree, prune=True, maxdepth=0,
-                        titles_only=False):
+                        titles_only=False, collapse=False):
         """
         Resolve a *toctree* node into individual bullet lists with titles
         as items, returning None (if no containing titles are found) or
         to the value of the *maxdepth* option on the *toctree* node.
         If *titles_only* is True, only toplevel document titles will be in the
         resulting tree.
+        If *collapse* is True, all branches not containing docname will
+        be collapsed.
         """
         if toctree.get('hidden', False):
             return None
                     else:
                         _walk_depth(subnode, depth+1, maxdepth)
 
+                        # cull sub-entries whose parents aren't 'current'
+                        if (collapse and
+                            depth > 1 and
+                            'current' not in subnode.parent['classes']):
+                            subnode.parent.remove(subnode)
+
+                elif isinstance(subnode, nodes.reference):
+                    # Identify the toc entry pointing to the current document.
+                    if subnode['refuri'] == docname and not subnode['anchorname']:
+                        # tag the whole branch as 'current'
+                        # (We can't use traverse here as 'ascend' un-intuitively
+                        # implies 'siblings'.)
+                        p = subnode
+                        while p:
+                            p['classes'].append('current')
+                            p = p.parent
+
         def _entries_from_toctree(toctreenode, separate=False, subtree=False):
             """Return TOC entries for a toctree node."""
             refs = [(e[0], str(e[1])) for e in toctreenode['entries']]
             entries = []
             for (title, ref) in refs:
                 try:
-                    if ref.startswith('http://'): # FIXME: (see directives/other.py)
+                    if url_re.match(ref):
                         reference = nodes.reference('', '', refuri=ref, anchorname='',
                                                     *[nodes.Text(title)])
                         para = addnodes.compact_paragraph('', '', reference)
 
         newnode = addnodes.compact_paragraph('', '', *tocentries)
         newnode['toctree'] = True
+
         # prune the tree to maxdepth and replace titles, also set level classes
         _walk_depth(newnode, 1, prune and maxdepth or 0)
+
         # set the target paths in the toctrees (they are not known at TOC generation time)
         for refnode in newnode.traverse(nodes.reference):
-            if not refnode['refuri'].startswith('http://'):  # FIXME: see above
+            if not url_re.match(refnode['refuri']):
                 refnode['refuri'] = builder.get_relative_uri(
                     docname, refnode['refuri']) + refnode['anchorname']
         return newnode

sphinx/ext/autodoc.py

                     # can never get arguments of a C function or method
                     getargs = False
                 if getargs:
-                    argspec = inspect.getargspec(obj)
+                    try:
+                        argspec = inspect.getargspec(obj)
+                    except TypeError:
+                        # if a class should be documented as function (yay duck
+                        # typing) we try to use the constructor signature as function
+                        # signature without the first argument.
+                        try:
+                            argspec = inspect.getargspec(obj.__new__)
+                        except TypeError:
+                            argspec = inspect.getargspec(obj.__init__)
+                        if argspec[0]:
+                            del argspec[0][0]
                     if what in ('class', 'method', 'staticmethod',
                                 'classmethod') and argspec[0] and \
                            argspec[0][0] in ('cls', 'self'):
             return ''
 
     def generate(self, what, name, members, add_content, indent=u'',
-                 check_module=False, no_docstring=False):
+                 check_module=False, no_docstring=False, real_module=None):
         """
         Generate reST for the object in self.result.
         """
                       (what, str(fullname), err))
             return
 
+        # If there is no real module defined, figure out which to use.
+        # The real module is used in the module analyzer to look up the module
+        # where the attribute documentation would actually be found in.
+        # This is used for situations where you have a module that collects the
+        # functions and classes of internal submodules.
+        if real_module is None:
+            real_module = getattr(todoc, '__module__', None) or mod
+
         # try to also get a source code analyzer for attribute docs
         try:
-            analyzer = ModuleAnalyzer.for_module(mod)
+            analyzer = ModuleAnalyzer.for_module(real_module)
             # parse right now, to get PycodeErrors on parsing
             analyzer.parse()
         except PycodeError, err:
                               sys.getfilesystemencoding(), 'replace')
             sourcename = u'%s:docstring of %s' % (srcname, fullname)
             attr_docs = analyzer.find_attr_docs()
-            if what in ('data', 'attribute'):
+            if objpath:
                 key = ('.'.join(objpath[:-1]), objpath[-1])
                 if key in attr_docs:
                     no_docstring = True
             full_membername = mod + '::' + '.'.join(objpath + [membername])
             self.generate(memberwhat, full_membername, ['__all__'],
                           add_content=content, no_docstring=bool(content),
-                          indent=indent, check_module=members_check_module)
+                          indent=indent, check_module=members_check_module,
+                          real_module=real_module)
 
         self.env.autodoc_current_module = None
         self.env.autodoc_current_class = None
     state.memo.reporter = AutodocReporter(generator.result, state.memo.reporter)
     if dirname == 'automodule':
         node = nodes.section()
+        node.document = state.document  # necessary so that the child nodes
+                                        # get the right source/line set
         nested_parse_with_titles(state, generator.result, node)
     else:
         node = nodes.paragraph()
+        node.document = state.document
         state.nested_parse(generator.result, 0, node)
     state.memo.reporter = old_reporter
     return generator.warnings + node.children

sphinx/ext/pngmath.py

         depth = read_png_depth(outfn)
         return relfn, depth
 
+    # if latex or dvipng has failed once, don't bother to try again
+    if hasattr(self.builder, '_mathpng_warned_latex') or \
+       hasattr(self.builder, '_mathpng_warned_dvipng'):
+        return None, None
+
     latex = DOC_HEAD + self.builder.config.pngmath_latex_preamble
     latex += (use_preview and DOC_BODY_PREVIEW or DOC_BODY) % math
     if isinstance(latex, unicode):
         except OSError, err:
             if err.errno != 2:   # No such file or directory
                 raise
-            if not hasattr(self.builder, '_mathpng_warned_latex'):
-                self.builder.warn('LaTeX command %r cannot be run (needed for '
-                                  'math display), check the pngmath_latex '
-                                  'setting' % self.builder.config.pngmath_latex)
-                self.builder._mathpng_warned_latex = True
-            return relfn, None
+            self.builder.warn('LaTeX command %r cannot be run (needed for math '
+                              'display), check the pngmath_latex setting' %
+                              self.builder.config.pngmath_latex)
+            self.builder._mathpng_warned_latex = True
+            return None, None
     finally:
         chdir(curdir)
 
     except OSError, err:
         if err.errno != 2:   # No such file or directory
             raise
-        if not hasattr(self.builder, '_mathpng_warned_dvipng'):
-            self.builder.warn('dvipng command %r cannot be run (needed for '
-                              'math display), check the pngmath_dvipng setting'
-                              % self.builder.config.pngmath_dvipng)
-            self.builder._mathpng_warned_dvipng = True
-        return relfn, None
+        self.builder.warn('dvipng command %r cannot be run (needed for math '
+                          'display), check the pngmath_dvipng setting' %
+                          self.builder.config.pngmath_dvipng)
+        self.builder._mathpng_warned_dvipng = True
+        return None, None
     stdout, stderr = p.communicate()
     if p.returncode != 0:
         raise MathExtError('dvipng exited with error:\n[stderr]\n%s\n'
         sm.walkabout(self)
         self.builder.warn('display latex %r: ' % node['latex'] + str(exc))
         raise nodes.SkipNode
-    self.body.append('<img class="math" src="%s" alt="%s" %s/>' %
-                     (fname, self.encode(node['latex']).strip(),
-                      depth and 'style="vertical-align: %dpx" ' %
-                      (-depth) or ''))
+    if fname is None:
+        # something failed -- use text-only as a bad substitute
+        self.body.append('<span class="math">%s</span>' %
+                         self.encode(node['latex']).strip())
+    else:
+        self.body.append(
+            '<img class="math" src="%s" alt="%s" %s/>' %
+            (fname, self.encode(node['latex']).strip(),
+             depth and 'style="vertical-align: %dpx" ' % (-depth) or ''))
     raise nodes.SkipNode
 
 def html_visit_displaymath(self, node):
     self.body.append('<p>')
     if node['number']:
         self.body.append('<span class="eqno">(%s)</span>' % node['number'])
-    self.body.append('<img src="%s" alt="%s" />\n</div>' %
-                     (fname, self.encode(node['latex']).strip()))
+    if fname is None:
+        # something failed -- use text-only as a bad substitute
+        self.body.append('<span class="math">%s</span>' %
+                         self.encode(node['latex']).strip())
+    else:
+        self.body.append('<img src="%s" alt="%s" />\n</div>' %
+                         (fname, self.encode(node['latex']).strip()))
     self.body.append('</p>')
     raise nodes.SkipNode
 

sphinx/ext/todo.py

     # Augment each todo with a backlink to the original location.
     env = app.builder.env
 
+    if not hasattr(env, 'todo_all_todos'):
+        env.todo_all_todos = []
+
     for node in doctree.traverse(todolist):
         if not app.config['todo_include_todos']:
             node.replace_self([])

sphinx/locale/cs/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/de/LC_MESSAGES/sphinx.js

-Documentation.addTranslations({"locale": "de", "plural_expr": "(n != 1)", "messages": {"module, in ": "Modul, in ", "Preparing search...": "Suche wird vorbereitet...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Es wurden keine Dokumente gefunden. Haben Sie alle Suchworte richtig geschrieben und gen\u00fcgend Kategorien ausgew\u00e4hlt?", "Search finished, found %s page(s) matching the search query.": "Suche beendet, %s Seite(n) mit Ergebnissen wurden gefunden.", ", in ": "", "Permalink to this headline": "Permalink zu dieser \u00dcberschrift", "Searching": "Suchen...", "Permalink to this definition": "Permalink zu dieser Definition", "Hide Search Matches": "Suchergebnisse ausblenden", "Search Results": "Suchergebnisse"}});
+Documentation.addTranslations({"locale": "de", "plural_expr": "(n != 1)", "messages": {"module, in ": "Modul, in ", "Preparing search...": "Suche wird vorbereitet...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Es wurden keine Dokumente gefunden. Haben Sie alle Suchworte richtig geschrieben und gen\u00fcgend Kategorien ausgew\u00e4hlt?", "Search finished, found %s page(s) matching the search query.": "Suche beendet, %s Seite(n) mit Ergebnissen wurden gefunden.", ", in ": ", in ", "Permalink to this headline": "Permalink zu dieser \u00dcberschrift", "Searching": "Suchen...", "Permalink to this definition": "Permalink zu dieser Definition", "Hide Search Matches": "Suchergebnisse ausblenden", "Search Results": "Suchergebnisse"}});

sphinx/locale/de/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/es/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/fi/LC_MESSAGES/sphinx.js

+Documentation.addTranslations({"locale": "fi", "plural_expr": "(n != 1)", "messages": {"module, in ": "", "Preparing search...": "Valmistellaan etsint\u00e4\u00e4...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "Ei l\u00f6ytynyt yht\u00e4\u00e4n. Tarkista hakuehdot, sanahaku, ei sen osia", "Search finished, found %s page(s) matching the search query.": "Etsint\u00e4 tehty, l\u00f6ydetty %s sivu(a).", ", in ": "", "Permalink to this headline": "", "Searching": "Etsit\u00e4\u00e4n", "Permalink to this definition": "", "Hide Search Matches": "Piilota l\u00f6ydetyt", "Search Results": "Etsinn\u00e4n tulos"}});

sphinx/locale/fi/LC_MESSAGES/sphinx.mo

Binary file added.

sphinx/locale/fi/LC_MESSAGES/sphinx.po

+# Finnish translations for Sphinx.
+# Copyright (C) 2009 ORGANIZATION
+# This file is distributed under the same license as the Sphinx project.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Sphinx 0.6\n"
+"Report-Msgid-Bugs-To: sphinx@awot.fi\n"
+"POT-Creation-Date: 2009-01-24 18:39+0000\n"
+"PO-Revision-Date: 2009-02-11 11:21+0200\n"
+"Last-Translator: Jukka Inkeri <sphinx@awot.fi>\n"
+"Language-Team: fi <sphinx@awot.fi>\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:104 sphinx/writers/latex.py:170
+#, python-format
+msgid "%B %d, %Y"
+msgstr "%d.%m.%Y"
+
+#: sphinx/environment.py:300 sphinx/templates/genindex-single.html:2
+#: sphinx/templates/genindex-split.html:2
+#: sphinx/templates/genindex-split.html:5 sphinx/templates/genindex.html:2
+#: sphinx/templates/genindex.html:5 sphinx/templates/genindex.html:48
+#: sphinx/templates/layout.html:126 sphinx/writers/latex.py:176
+msgid "Index"
+msgstr "Sisällysluettelo"
+
+#: sphinx/environment.py:301 sphinx/writers/latex.py:175
+msgid "Module Index"
+msgstr "Moduuli sisällysluettelo"
+
+#: sphinx/environment.py:302 sphinx/templates/defindex.html:16
+msgid "Search Page"
+msgstr "Etsi sivu"
+
+#: sphinx/roles.py:53 sphinx/directives/desc.py:580
+#, python-format
+msgid "environment variable; %s"
+msgstr ""
+
+#: sphinx/roles.py:60
+#, python-format
+msgid "Python Enhancement Proposals!PEP %s"
+msgstr ""
+
+#: sphinx/builders/changes.py:64
+msgid "Builtins"
+msgstr ""
+
+#: sphinx/builders/changes.py:66
+msgid "Module level"
+msgstr "Moduulitaso"
+
+
+#: sphinx/builders/html.py:118
+#, python-format
+msgid "%b %d, %Y"
+msgstr "%d.%m.%Y"
+
+#: sphinx/builders/html.py:137 sphinx/templates/defindex.html:21
+msgid "General Index"
+msgstr "Yleinen sisällysluettelo"
+
+#: sphinx/builders/html.py:137
+msgid "index"
+msgstr "hakemisto"
+
+#: sphinx/builders/html.py:139 sphinx/builders/htmlhelp.py:182
+#: sphinx/builders/qthelp.py:131 sphinx/templates/defindex.html:19
+#: sphinx/templates/modindex.html:2 sphinx/templates/modindex.html:13
+msgid "Global Module Index"
+msgstr "Yleinen moduulien sisällysluettelo"
+
+#: sphinx/builders/html.py:139
+msgid "modules"
+msgstr "moduulit"
+#msgstr "osat"
+
+#: sphinx/builders/html.py:179
+msgid "next"
+msgstr ">"
+
+#: sphinx/builders/html.py:186
+msgid "previous"
+msgstr "<"
+
+#: sphinx/builders/latex.py:155 sphinx/builders/pdf.py:162
+msgid " (in "
+msgstr ""
+
+#: sphinx/directives/desc.py:25
+#, python-format
+msgid "%s() (built-in function)"
+msgstr ""
+
+#: sphinx/directives/desc.py:26 sphinx/directives/desc.py:42
+#: sphinx/directives/desc.py:54
+#, python-format
+msgid "%s() (in module %s)"
+msgstr ""
+
+#: sphinx/directives/desc.py:29
+#, python-format
+msgid "%s (built-in variable)"
+msgstr ""
+
+#: sphinx/directives/desc.py:30 sphinx/directives/desc.py:78
+#, python-format
+msgid "%s (in module %s)"
+msgstr ""
+
+#: sphinx/directives/desc.py:33
+#, python-format
+msgid "%s (built-in class)"
+msgstr ""
+
+#: sphinx/directives/desc.py:34
+#, python-format
+msgid "%s (class in %s)"
+msgstr ""
+
+#: sphinx/directives/desc.py:46
+#, python-format
+msgid "%s() (%s.%s method)"
+msgstr ""
+
+#: sphinx/directives/desc.py:48
+#, python-format
+msgid "%s() (%s method)"
+msgstr ""
+
+#: sphinx/directives/desc.py:58
+#, python-format
+msgid "%s() (%s.%s static method)"
+msgstr ""
+
+#: sphinx/directives/desc.py:60
+#, python-format
+msgid "%s() (%s static method)"
+msgstr ""
+
+#: sphinx/directives/desc.py:82
+#, python-format
+msgid "%s (%s.%s attribute)"
+msgstr ""
+
+#: sphinx/directives/desc.py:84
+#, python-format
+msgid "%s (%s attribute)"
+msgstr ""
+
+#: sphinx/directives/desc.py:86
+#, python-format
+msgid "%s (C function)"
+msgstr ""
+
+#: sphinx/directives/desc.py:88
+#, python-format
+msgid "%s (C member)"
+msgstr ""
+
+#: sphinx/directives/desc.py:90
+#, python-format
+msgid "%s (C macro)"
+msgstr ""
+
+#: sphinx/directives/desc.py:92
+#, python-format
+msgid "%s (C type)"
+msgstr ""
+
+#: sphinx/directives/desc.py:94
+#, python-format
+msgid "%s (C variable)"
+msgstr ""
+
+#: sphinx/directives/desc.py:112
+msgid "Raises"
+msgstr ""
+
+#: sphinx/directives/desc.py:116
+msgid "Variable"
+msgstr ""
+
+#: sphinx/directives/desc.py:119
+msgid "Returns"
+msgstr ""
+
+#: sphinx/directives/desc.py:128
+msgid "Return type"
+msgstr ""
+
+#: sphinx/directives/desc.py:213
+msgid "Parameter"
+msgstr ""
+
+#: sphinx/directives/desc.py:217
+msgid "Parameters"
+msgstr ""
+
+#: sphinx/directives/desc.py:465
+#, python-format
+msgid "%scommand line option; %s"
+msgstr ""
+
+#: sphinx/directives/other.py:101
+msgid "Platforms: "
+msgstr "Ympäristö"
+
+#: sphinx/directives/other.py:106
+#, python-format
+msgid "%s (module)"
+msgstr "%s (moduuli)"
+
+#: sphinx/directives/other.py:146
+msgid "Section author: "
+msgstr "Luvun kirjoittaja: "
+
+#: sphinx/directives/other.py:148
+msgid "Module author: "
+msgstr "Moduulin kirjoittaja: "
+
+#: sphinx/directives/other.py:150
+msgid "Author: "
+msgstr "Tekijä: "
+
+#: sphinx/directives/other.py:249
+msgid "See also"
+msgstr "Katso myös"
+
+#: sphinx/ext/autodoc.py:442
+#, python-format
+msgid "   Bases: %s"
+msgstr ""
+
+#: sphinx/ext/autodoc.py:566 sphinx/ext/autodoc.py:583
+#, python-format
+msgid "alias of :class:`%s`"
+msgstr ""
+
+#: sphinx/ext/todo.py:31
+msgid "Todo"
+msgstr "Tehtävä vielä"
+
+#: sphinx/ext/todo.py:75
+#, python-format
+msgid "(The original entry is located in %s, line %d and can be found "
+msgstr ""
+
+#: sphinx/ext/todo.py:81
+msgid "here"
+msgstr "tässä"
+
+#: sphinx/locale/__init__.py:15
+msgid "Attention"
+msgstr "Huom"
+
+#: sphinx/locale/__init__.py:16
+msgid "Caution"
+msgstr "Varoitus"
+
+#: sphinx/locale/__init__.py:17
+msgid "Danger"
+msgstr "Vaara"
+
+#: sphinx/locale/__init__.py:18
+msgid "Error"
+msgstr "Virhe"
+
+#: sphinx/locale/__init__.py:19
+msgid "Hint"
+msgstr "Vihje"
+
+#: sphinx/locale/__init__.py:20
+msgid "Important"
+msgstr "Tärkeä"
+
+#: sphinx/locale/__init__.py:21
+msgid "Note"
+msgstr "Muista"
+
+#: sphinx/locale/__init__.py:22
+msgid "See Also"
+msgstr "Katso myös"
+
+#: sphinx/locale/__init__.py:23
+msgid "Tip"
+msgstr "Vihje"
+
+#: sphinx/locale/__init__.py:24
+msgid "Warning"
+msgstr "Varoitus"
+
+#: sphinx/locale/__init__.py:28
+#, python-format
+msgid "New in version %s"
+msgstr "Uusi versiossa %s"
+
+#: sphinx/locale/__init__.py:29
+#, python-format
+msgid "Changed in version %s"
+msgstr "Muutettu versiossa %s"
+
+#: sphinx/locale/__init__.py:30
+#, python-format
+msgid "Deprecated since version %s"
+msgstr "Poistettu versiosta %s alkaen"
+
+#: sphinx/locale/__init__.py:34
+msgid "module"
+msgstr "moduuli"
+#msgstr "osa"
+
+#: sphinx/locale/__init__.py:35
+msgid "keyword"
+msgstr ""
+#msgstr "avainsana"
+
+#: sphinx/locale/__init__.py:36
+msgid "operator"
+msgstr ""
+#msgstr "operaattori"
+
+
+#: sphinx/locale/__init__.py:37
+msgid "object"
+msgstr ""
+#msgstr "objekti"
+
+#: sphinx/locale/__init__.py:38
+msgid "exception"
+msgstr ""
+#msgstr "poikkeus"
+
+#: sphinx/locale/__init__.py:39
+msgid "statement"
+msgstr ""
+
+#: sphinx/locale/__init__.py:40
+msgid "built-in function"
+msgstr ""
+
+#: sphinx/static/doctools.js:139 sphinx/writers/html.py:425
+msgid "Permalink to this headline"
+msgstr ""
+
+#: sphinx/static/doctools.js:145 sphinx/writers/html.py:80
+msgid "Permalink to this definition"
+msgstr ""
+
+#: sphinx/static/doctools.js:174
+msgid "Hide Search Matches"
+msgstr "Piilota löydetyt"
+
+#: sphinx/static/searchtools.js:274
+msgid "Searching"
+msgstr "Etsitään"
+
+#: sphinx/static/searchtools.js:279
+msgid "Preparing search..."
+msgstr "Valmistellaan etsintää..."
+
+#: sphinx/static/searchtools.js:338
+msgid "module, in "
+msgstr ""
+
+#: sphinx/static/searchtools.js:347
+msgid ", in "
+msgstr ""
+
+#: sphinx/static/searchtools.js:453 sphinx/templates/search.html:25
+msgid "Search Results"
+msgstr "Etsinnän tulos"
+
+#: sphinx/static/searchtools.js:455
+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 "Ei löytynyt yhtään. Tarkista hakuehdot, sanahaku, ei sen osia"
+
+#: sphinx/static/searchtools.js:457
+#, python-format
+msgid "Search finished, found %s page(s) matching the search query."
+msgstr "Etsintä tehty, löydetty %s sivu(a)."
+
+#: sphinx/templates/defindex.html:2
+msgid "Overview"
+msgstr "Yhteenveto"
+
+#: sphinx/templates/defindex.html:11
+msgid "Indices and tables:"
+msgstr ""
+
+#: sphinx/templates/defindex.html:14
+msgid "Complete Table of Contents"
+msgstr ""
+
+#: sphinx/templates/defindex.html:15
+msgid "lists all sections and subsections"
+msgstr ""
+
+#: sphinx/templates/defindex.html:17
+msgid "search this documentation"
+msgstr ""
+
+#: sphinx/templates/defindex.html:20
+msgid "quick access to all modules"
+msgstr ""
+
+#: sphinx/templates/defindex.html:22
+msgid "all functions, classes, terms"
+msgstr ""
+
+#: sphinx/templates/genindex-single.html:5
+#, python-format
+msgid "Index &ndash; %(key)s"
+msgstr ""
+
+#: sphinx/templates/genindex-single.html:44
+#: sphinx/templates/genindex-split.html:14
+#: sphinx/templates/genindex-split.html:27 sphinx/templates/genindex.html:54
+msgid "Full index on one page"
+msgstr "Hakemisto yhtenä luettelona"
+
+#: sphinx/templates/genindex-split.html:7
+msgid "Index pages by letter"
+msgstr "Hakemisto aakkostus sivuttain"
+
+#: sphinx/templates/genindex-split.html:15
+msgid "can be huge"
+msgstr "voi olla iso"
+
+#: sphinx/templates/layout.html:9
+msgid "Navigation"
+msgstr "Navikointi"
+
+#: sphinx/templates/layout.html:40
+msgid "Table Of Contents"
+msgstr "Sisällysluettelo"
+
+#: sphinx/templates/layout.html:46
+msgid "Previous topic"
+msgstr "<<"
+
+#: sphinx/templates/layout.html:48
+msgid "previous chapter"
+msgstr "<<"
+
+#: sphinx/templates/layout.html:51
+msgid "Next topic"
+msgstr ">>"
+
+#: sphinx/templates/layout.html:53
+msgid "next chapter"
+msgstr ">>"
+
+#: sphinx/templates/layout.html:58
+msgid "This Page"
+msgstr "Tämä sivu"
+
+#: sphinx/templates/layout.html:61
+msgid "Show Source"
+msgstr "Näytä lähdekoodina"
+
+#: sphinx/templates/layout.html:71
+msgid "Quick search"
+msgstr "Pikahaku"
+
+#: sphinx/templates/layout.html:74
+msgid "Go"
+msgstr "Siirry"
+
+#: sphinx/templates/layout.html:78
+msgid "Enter search terms or a module, class or function name."
+msgstr "Anna etsittävä termi tai moduuli, luokka tai funktio"
+
+#: sphinx/templates/layout.html:115
+#, python-format
+msgid "Search within %(docstitle)s"
+msgstr ""
+
+#: sphinx/templates/layout.html:124
+msgid "About these documents"
+msgstr "Tietoja tästä documentistä"
+
+#: sphinx/templates/layout.html:127 sphinx/templates/search.html:2
+#: sphinx/templates/search.html:5
+msgid "Search"
+msgstr "Etsi"
+
+#: sphinx/templates/layout.html:129
+msgid "Copyright"
+msgstr ""
+#msgstr "(c)"
+
+#: sphinx/templates/layout.html:174
+#, python-format
+msgid "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
+msgstr ""
+#msgstr "&copy; <a href=\"%(path)s\">Copyright</a> %(copyright)s."
+#msgstr "&copy; <a href=\"%(path)s\">kaikki pidätetään</A> %(copyright)."
+
+#: sphinx/templates/layout.html:176
+#, python-format
+msgid "&copy; Copyright %(copyright)s."
+msgstr ""
+##msgstr "&copy; Copyright %(copyright)s."
+#msgstr "&copy; %(copyright)."
+
+#: sphinx/templates/layout.html:179
+#, python-format
+msgid "Last updated on %(last_updated)s."
+msgstr ""
+#msgstr "Viimeksi muutettu %(last_updated)."
+
+#: sphinx/templates/layout.html:182
+#, python-format
+msgid ""
+"Created using <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> "
+"%(sphinx_version)s."
+msgstr """
+#msgstr "Tehty <a href=\"http://sphinx.pocoo.org/\">Sphinx</a> %(sphinx_version)"
+
+#: sphinx/templates/modindex.html:36
+msgid "Deprecated"
+msgstr "Poistettu"
+
+#: sphinx/templates/opensearch.xml:4
+#, python-format
+msgid "Search %(docstitle)s"
+msgstr ""
+
+#: sphinx/templates/search.html:9
+msgid ""
+"Please activate JavaScript to enable the search\n"
+"    functionality."
+msgstr "Javascript pitää olla sallittu, jotta etsintä toimii."
+
+#: sphinx/templates/search.html:14
+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"
+"    function will automatically search for all of the words. Pages\n"
+"    containing fewer words won't appear in the result list."
+msgstr "Anna hakusanat kokonaan, osasanoilla ei haeta."
+
+#: sphinx/templates/search.html:21
+msgid "search"
+msgstr "etsi"
+
+#: sphinx/templates/search.html:27
+msgid "Your search did not match any results."
+msgstr "Ei löytynyt ko. ehdoilla yhtään."
+
+#: sphinx/templates/changes/frameset.html:5
+#: sphinx/templates/changes/versionchanges.html:12
+#, python-format
+msgid "Changes in Version %(version)s &mdash; %(docstitle)s"
+msgstr "Muutos versiosta %(version) &mdash; %(docstitle)"
+
+#: sphinx/templates/changes/rstsource.html:5
+#, python-format
+msgid "%(filename)s &mdash; %(docstitle)s"
+msgstr ""
+
+#: sphinx/templates/changes/versionchanges.html:17
+#, python-format
+msgid "Automatically generated list of changes in version %(version)s"
+msgstr "Automaattisesti luotu muutoshistoria alkaen versiosta %(version)"
+
+#: sphinx/templates/changes/versionchanges.html:18
+msgid "Library changes"
+msgstr ""
+
+#: sphinx/templates/changes/versionchanges.html:23
+msgid "C API changes"
+msgstr ""
+
+#: sphinx/templates/changes/versionchanges.html:25
+msgid "Other changes"
+msgstr ""
+
+#: sphinx/writers/latex.py:173
+msgid "Release"
+msgstr ""
+
+#: sphinx/writers/text.py:166
+#, python-format
+msgid "Ympäristö: %s"
+msgstr ""
+
+#: sphinx/writers/text.py:427
+msgid "[image]"
+msgstr ""
+

sphinx/locale/fr/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/it/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/ja/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/nl/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/pl/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/sl/LC_MESSAGES/sphinx.mo

Binary file modified.

sphinx/locale/uk_UA/LC_MESSAGES/sphinx.js

+Documentation.addTranslations({"locale": "uk_UA", "plural_expr": "(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)", "messages": {"module, in ": "\u043c\u043e\u0434\u0443\u043b\u044c, \u0432 ", "Preparing search...": "\u041f\u0456\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u043e \u043f\u043e\u0448\u0443\u043a\u0443...", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "\u0412\u0430\u0448 \u043f\u043e\u0448\u0443\u043a \u043d\u0435 \u0432\u0438\u044f\u0432\u0438\u0432 \u0436\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043f\u0456\u0432\u043f\u0430\u0434\u0456\u043d\u043d\u044f. \u0411\u0443\u0434\u044c-\u043b\u0430\u0441\u043a\u0430 \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0430\u0439\u0442\u0435\u0441\u044f \u0449\u043e \u0432\u0441\u0456 \u0441\u043b\u043e\u0432\u0430 \u043d\u0430\u0431\u0440\u0430\u043d\u0456 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0456 \u0432\u0438 \u043e\u0431\u0440\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043d\u044c\u043e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u0439.", "Search finished, found %s page(s) matching the search query.": "\u041f\u043e\u0448\u0443\u043a \u0437\u0430\u043a\u0456\u043d\u0447\u0435\u043d\u043e, \u0437\u043d\u0430\u0439\u0434\u0435\u043d\u043e %s \u0441\u0442\u043e\u0440\u0456\u043d\u043e\u043a \u044f\u043a\u0456 \u0441\u043f\u0456\u0432\u043f\u0430\u043b\u0438 \u0437 \u043f\u043e\u0448\u0443\u043a\u043e\u0432\u0438\u043c \u0437\u0430\u043f\u0438\u0442\u043e\u043c.", ", in ": ", \u0432 ", "Permalink to this headline": "\u041f\u043e\u0441\u0442\u0456\u0439\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0446\u0435\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a", "Searching": "\u0428\u0443\u043a\u0430\u044e", "Permalink to this definition": "\u041f\u043e\u0441\u0442\u0456\u0439\u043d\u0435 \u043f\u043e\u0441\u0438\u043b\u0430\u043d\u043d\u044f \u043d\u0430 \u0446\u0435 \u0432\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f", "Hide Search Matches": "\u041f\u0440\u0438\u0445\u043e\u0432\u0430\u0442\u0438 \u0441\u043f\u0456\u0432\u043f\u0430\u0434\u0456\u043d\u043d\u044f \u043f\u043e\u0448\u0443\u043a\u0443", "Search Results": "\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438 \u043f\u043e\u0448\u0443\u043a\u0443"}});

sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo

Binary file added.

sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po

+# Ukrainian (Ukraine) translations for Sphinx.
+# Copyright (C) 2009 ORGANIZATION
+# This file is distributed under the same license as the Sphinx project.
+# Petro Sasnyk <petro@sasnyk.name>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Sphinx 0.6\n"
+"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
+"POT-Creation-Date: 2008-12-28 23:40+0100\n"
+"PO-Revision-Date: 2009-01-14 17:34+0200\n"
+"Last-Translator: Petro Sasnyk <petro@sasnyk.name>\n"
+"Language-Team: uk_UA <LL@li.org>\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
+"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\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:104 sphinx/writers/latex.py:170
+#, python-format
+msgid "%B %d, %Y"
+msgstr ""
+
+#: sphinx/environment.py:300 sphinx/templates/genindex-single.html:2
+#: sphinx/templates/genindex-split.html:2
+#: sphinx/templates/genindex-split.html:5 sphinx/templates/genindex.html:2
+#: sphinx/templates/genindex.html:5 sphinx/templates/genindex.html:48
+#: sphinx/templates/layout.html:126 sphinx/writers/latex.py:176
+msgid "Index"
+msgstr "Індекс"
+
+#: sphinx/environment.py:301 sphinx/writers/latex.py:175
+msgid "Module Index"
+msgstr "Індекс модулів"
+
+#: sphinx/environment.py:302 sphinx/templates/defindex.html:16
+msgid "Search Page"
+msgstr "Сторінка пошуку"
+
+#: sphinx/roles.py:53 sphinx/directives/desc.py:580
+#, python-format
+msgid "environment variable; %s"
+msgstr "змінна оточення; %s"
+
+#: sphinx/roles.py:60
+#, python-format
+msgid "Python Enhancement Proposals!PEP %s"
+msgstr "Python Enhancement Proposals!PEP %s"
+
+#: sphinx/builders/changes.py:64
+msgid "Builtins"
+msgstr "Вбудовані елементи"
+
+#: sphinx/builders/changes.py:66
+msgid "Module level"
+msgstr "Рівень модуля"
+
+#: sphinx/builders/html.py:118
+#, python-format
+msgid "%b %d, %Y"
+msgstr "%b %d, %Y"
+
+#: sphinx/builders/html.py:137 sphinx/templates/defindex.html:21
+msgid "General Index"
+msgstr "Загальний індекс"
+
+#: sphinx/builders/html.py:137
+msgid "index"
+msgstr "індекс"
+
+#: sphinx/builders/html.py:139 sphinx/builders/htmlhelp.py:182
+#: sphinx/builders/qthelp.py:131 sphinx/templates/defindex.html:19
+#: sphinx/templates/modindex.html:2 sphinx/templates/modindex.html:13
+msgid "Global Module Index"
+msgstr "Загальний індекс модулів"
+
+#: sphinx/builders/html.py:139
+msgid "modules"
+msgstr "модулі"
+
+#: sphinx/builders/html.py:179
+msgid "next"
+msgstr "наступний"
+
+#: sphinx/builders/html.py:186
+msgid "previous"
+msgstr "попередній"
+
+#: sphinx/builders/latex.py:155
+msgid " (in "
+msgstr " (в "
+
+#: sphinx/directives/desc.py:25
+#, python-format
+msgid "%s() (built-in function)"
+msgstr "%s() (вбудована функція)"
+
+#: sphinx/directives/desc.py:26 sphinx/directives/desc.py:42
+#: sphinx/directives/desc.py:54
+#, python-format
+msgid "%s() (in module %s)"
+msgstr "%s() (в модулі %s)"
+
+#: sphinx/directives/desc.py:29
+#, python-format
+msgid "%s (built-in variable)"
+msgstr "%s (вбудована змінна)"
+
+#: sphinx/directives/desc.py:30 sphinx/directives/desc.py:78
+#, python-format
+msgid "%s (in module %s)"
+msgstr "%s (в модулі %s)"
+
+#: sphinx/directives/desc.py:33
+#, python-format
+msgid "%s (built-in class)"
+msgstr "%s (вбудований клас)"
+
+#: sphinx/directives/desc.py:34
+#, python-format
+msgid "%s (class in %s)"
+msgstr "%s (клас в %s)"
+
+#: sphinx/directives/desc.py:46
+#, python-format
+msgid "%s() (%s.%s method)"
+msgstr "%s() (%s.%s метод)"
+
+#: sphinx/directives/desc.py:48
+#, python-format
+msgid "%s() (%s method)"
+msgstr "%s() (%s метод)"
+
+#: sphinx/directives/desc.py:58
+#, python-format
+msgid "%s() (%s.%s static method)"
+msgstr "%s() (%s.%s статичний метод)"
+
+#: sphinx/directives/desc.py:60
+#, python-format
+msgid "%s() (%s static method)"
+msgstr "%s() (%s статичний метод)"
+
+#: sphinx/directives/desc.py:82
+#, python-format
+msgid "%s (%s.%s attribute)"
+msgstr "%s (%s.%s атрибут)"
+
+#: sphinx/directives/desc.py:84
+#, python-format
+msgid "%s (%s attribute)"
+msgstr "%s (%s атрибут)"
+
+#: sphinx/directives/desc.py:86
+#, python-format
+msgid "%s (C function)"
+msgstr "%s (С функція)"
+
+#: sphinx/directives/desc.py:88
+#, python-format
+msgid "%s (C member)"
+msgstr "%s (C член)"
+
+#: sphinx/directives/desc.py:90
+#, python-format
+msgid "%s (C macro)"
+msgstr "%s (C макрос)"
+
+#: sphinx/directives/desc.py:92
+#, python-format
+msgid "%s (C type)"
+msgstr "%s (C тип)"
+
+#: sphinx/directives/desc.py:94
+#, python-format
+msgid "%s (C variable)"
+msgstr "%s (C змінна)"
+
+#: sphinx/directives/desc.py:112
+msgid "Raises"
+msgstr "Викликає"
+
+#: sphinx/directives/desc.py:116
+msgid "Variable"
+msgstr "Змінна"
+
+#: sphinx/directives/desc.py:119
+msgid "Returns"
+msgstr "Повертає"
+
+#: sphinx/directives/desc.py:128
+msgid "Return type"
+msgstr "Тип повернення"
+
+#: sphinx/directives/desc.py:213
+msgid "Parameter"
+msgstr "Параметр"
+
+#: sphinx/directives/desc.py:217
+msgid "Parameters"
+msgstr "Параметри"
+
+#: sphinx/directives/desc.py:465
+#, python-format
+msgid "%scommand line option; %s"
+msgstr "%sопція командного рядка; %s"
+
+#: sphinx/directives/other.py:101
+msgid "Platforms: "
+msgstr "Платформи: "
+
+#: sphinx/directives/other.py:106
+#, python-format
+msgid "%s (module)"
+msgstr "%s (модуль)"
+
+#: sphinx/directives/other.py:146
+msgid "Section author: "
+msgstr "Автор секції: "
+
+#: sphinx/directives/other.py:148
+msgid "Module author: "
+msgstr "Автор модуля: "
+
+#: sphinx/directives/other.py:150
+msgid "Author: "
+msgstr "Автор: "
+
+#: sphinx/directives/other.py:249
+msgid "See also"
+msgstr "Дивись також"
+
+#: sphinx/ext/autodoc.py:442
+#, python-format
+msgid "   Bases: %s"
+msgstr "   Базовий: %s"
+
+#: sphinx/ext/autodoc.py:563 sphinx/ext/autodoc.py:580
+#, python-format
+msgid "alias of :class:`%s`"
+msgstr "синонім :class:`%s`"
+
+#: sphinx/ext/todo.py:31
+msgid "Todo"
+msgstr "Доробити"
+
+#: sphinx/ext/todo.py:75
+#, python-format
+msgid "(The original entry is located in %s, line %d and can be found "
+msgstr "(Початкове входження знаходиться в %s, рядок %d і може бути знайдений "
+
+#: sphinx/ext/todo.py:81
+msgid "here"
+msgstr "тут"
+
+#: sphinx/locale/__init__.py:15
+msgid "Attention"
+msgstr "Увага"
+
+#: sphinx/locale/__init__.py:16
+msgid "Caution"
+msgstr "Застереження"
+
+#: sphinx/locale/__init__.py:17
+msgid "Danger"
+msgstr "Небезпека"
+
+#: sphinx/locale/__init__.py:18
+msgid "Error"
+msgstr "Помилка"
+
+#: sphinx/locale/__init__.py:19
+msgid "Hint"
+msgstr "Підказка"
+
+#: sphinx/locale/__init__.py:20
+msgid "Important"
+msgstr "Важливо"
+
+#: sphinx/locale/__init__.py:21
+msgid "Note"
+msgstr "Примітка"
+
+#: sphinx/locale/__init__.py:22
+msgid "See Also"
+msgstr "Дивись також"
+
+#: sphinx/locale/__init__.py:23
+msgid "Tip"
+msgstr "Порада"
+
+#: sphinx/locale/__init__.py:24
+msgid "Warning"
+msgstr "Попередження"
+
+#: sphinx/locale/__init__.py:28
+#, python-format
+msgid "New in version %s"
+msgstr "Нове в версії %s"
+
+#: sphinx/locale/__init__.py:29
+#, python-format
+msgid "Changed in version %s"
+msgstr "Змінено в версії %s"
+
+#: sphinx/locale/__init__.py:30
+#, python-format
+msgid "Deprecated since version %s"
+msgstr "Застаріло починаючи з версії %s"
+
+#: sphinx/locale/__init__.py:34
+msgid "module"
+msgstr "модуль"
+
+#: sphinx/locale/__init__.py:35
+msgid "keyword"
+msgstr "ключове слово"
+
+#: sphinx/locale/__init__.py:36
+msgid "operator"
+msgstr "оператор"
+
+#: sphinx/locale/__init__.py:37
+msgid "object"
+msgstr "об'єкт"
+
+#: sphinx/locale/__init__.py:38
+msgid "exception"
+msgstr "виняткова ситуація"
+
+#: sphinx/locale/__init__.py:39
+msgid "statement"
+msgstr "вираз"
+
+#: sphinx/locale/__init__.py:40
+msgid "built-in function"
+msgstr "вбудована функція"
+
+#: sphinx/static/doctools.js:139 sphinx/writers/html.py:425
+msgid "Permalink to this headline"
+msgstr "Постійне посилання на цей заголовок"
+
+#: sphinx/static/doctools.js:145 sphinx/writers/html.py:80
+msgid "Permalink to this definition"
+msgstr "Постійне посилання на це визначення"
+
+#: sphinx/static/doctools.js:174
+msgid "Hide Search Matches"
+msgstr "Приховати співпадіння пошуку"
+
+#: sphinx/static/searchtools.js:274
+msgid "Searching"
+msgstr "Шукаю"
+
+#: sphinx/static/searchtools.js:279