diff --git a/AUTHORS b/AUTHORS index 382b8c3f2..44050d48a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,7 +8,7 @@ Other co-maintainers: * Takayuki Shimizukawa * Daniel Neuhäuser <@DasIch> * Jon Waltman <@jonwaltman> -* Rob Ruana <@RelentlessIdiot> +* Rob Ruana <@RobRuana> * Robert Lehmann <@lehmannro> * Roland Meister <@rolmei> diff --git a/CHANGES b/CHANGES index d84f2ff94..1e00780b4 100644 --- a/CHANGES +++ b/CHANGES @@ -9,9 +9,23 @@ Incompatible changes Features added -------------- +* Added ``highlight_options`` configuration value. +* The ``language`` config value is now available in the HTML templates. +* The ``env-updated`` event can now return a value, which is interpreted + as an iterable of additional docnames that need to be rewritten. + Bugs fixed ---------- +* LaTeX writer now generates correct markup for cells spanning multiple rows. +* #1674: Do not crash if a module's ``__all__`` is not a list of strings. +* #1629: Use VerbatimBorderColor to add frame to code-block in LaTeX +* On windows, make-mode didn't work on Win32 platform if sphinx was invoked as + ``python sphinx-build.py``. +* #1687: linkcheck now treats 401 Unauthorized responses as "working". +* #1690: toctrees with ``glob`` option now can also contain entries for single + documents with explicit title. + Release 1.3b2 (released Dec 5, 2014) ==================================== @@ -224,6 +238,10 @@ Bugs fixed * #1585: Autosummary of modules broken in Sphinx-1.2.3. * #1610: Sphinx cause AttributeError when MeCab search option is enabled and python-mecab is not installed. +* #1674: Do not crash if a module's ``__all__`` is not a list of strings. +* #1673: Fix crashes with :confval:`nitpick_ignore` and ``:doc:`` references. +* #1686: ifconfig directive doesn't care about default config values. +* #1642: Fix only one search result appearing in Chrome. Documentation ------------- diff --git a/LICENSE b/LICENSE index 9b74ff536..4944ef5a1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ License for Sphinx ================== -Copyright (c) 2007-2014 by the Sphinx team (see AUTHORS file). +Copyright (c) 2007-2015 by the Sphinx team (see AUTHORS file). All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.rst b/README.rst index 10e2a9ee6..94567ecf6 100644 --- a/README.rst +++ b/README.rst @@ -51,8 +51,8 @@ Contributing feature idea or a bug. #. If you feel uncomfortable or uncertain about an issue or your changes, feel free to email sphinx-dev@googlegroups.com. -#. Fork the repository on Bitbucket https://github.com/sphinx-doc/sphinx - to start making your changes to the **default** branch for next major +#. Fork the repository on GitHub https://github.com/sphinx-doc/sphinx + to start making your changes to the **master** branch for next major version, or **stable** branch for next minor version. #. Write a test which shows that the bug was fixed or that the feature works as expected. diff --git a/doc/_themes/sphinx13/layout.html b/doc/_themes/sphinx13/layout.html index 57378c1ab..0e6294cc4 100644 --- a/doc/_themes/sphinx13/layout.html +++ b/doc/_themes/sphinx13/layout.html @@ -4,7 +4,7 @@ Sphinx layout template for the sphinxdoc theme. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} diff --git a/doc/_themes/sphinx13/static/sphinx13.css b/doc/_themes/sphinx13/static/sphinx13.css index 0b31c6b15..222432d5c 100644 --- a/doc/_themes/sphinx13/static/sphinx13.css +++ b/doc/_themes/sphinx13/static/sphinx13.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- sphinx13 theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/doc/conf.py b/doc/conf.py index 4bb4f4c51..f391cb5bd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -15,7 +15,7 @@ templates_path = ['_templates'] exclude_patterns = ['_build'] project = 'Sphinx' -copyright = '2007-2014, Georg Brandl and the Sphinx team' +copyright = '2007-2015, Georg Brandl and the Sphinx team' version = sphinx.__released__ release = version show_authors = True diff --git a/doc/config.rst b/doc/config.rst index 5b72f2722..e733fa62b 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -303,10 +303,19 @@ Project information .. versionadded:: 0.5 +.. confval:: highlight_options + + A dictionary of options that modify how the lexer specified by + :confval:`highlight_language` generates highlighted source code. These are + lexer-specific; for the options understood by each, see the + `Pygments documentation `_. + + .. versionadded:: 1.3 + .. confval:: pygments_style - The style name to use for Pygments highlighting of source code. The default - style is selected by the theme for HTML output, and ``'sphinx'`` otherwise. + The style name to use for Pygments highlighting of source code. If not set, + either the theme's default style or ``'sphinx'`` is selected for HTML output. .. versionchanged:: 0.3 If the value is a fully-qualified name of a custom Pygments style class, diff --git a/doc/extdev/appapi.rst b/doc/extdev/appapi.rst index 475848065..c2ee4cc86 100644 --- a/doc/extdev/appapi.rst +++ b/doc/extdev/appapi.rst @@ -530,8 +530,15 @@ handlers to the events. Example: Emitted when the :meth:`update` method of the build environment has completed, that is, the environment and all doctrees are now up-to-date. + You can return an iterable of docnames from the handler. These documents + will then be considered updated, and will be (re-)written during the writing + phase. + .. versionadded:: 0.5 + .. versionchanged:: 1.3 + The handlers' return value is now used. + .. event:: html-collect-pages (app) Emitted when the HTML builder is starting to write non-document pages. You diff --git a/setup.py b/setup.py index 9c3c0bf4f..705276a01 100644 --- a/setup.py +++ b/setup.py @@ -190,7 +190,7 @@ setup( 'Topic :: Utilities', ], platforms='any', - packages=find_packages(exclude=['test']), + packages=find_packages(exclude=['tests']), include_package_data=True, entry_points={ 'console_scripts': [ diff --git a/sphinx-apidoc.py b/sphinx-apidoc.py index 02bf8b888..7752fc0d1 100755 --- a/sphinx-apidoc.py +++ b/sphinx-apidoc.py @@ -4,7 +4,7 @@ Sphinx - Python documentation toolchain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx-autogen.py b/sphinx-autogen.py index ba3f0f454..ea085573f 100755 --- a/sphinx-autogen.py +++ b/sphinx-autogen.py @@ -4,7 +4,7 @@ Sphinx - Python documentation toolchain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx-build.py b/sphinx-build.py index 8dd21a7ed..7c539d643 100755 --- a/sphinx-build.py +++ b/sphinx-build.py @@ -4,7 +4,7 @@ Sphinx - Python documentation toolchain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx-quickstart.py b/sphinx-quickstart.py index 5d2b01df2..89ad8f891 100755 --- a/sphinx-quickstart.py +++ b/sphinx-quickstart.py @@ -4,7 +4,7 @@ Sphinx - Python documentation toolchain ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/__init__.py b/sphinx/__init__.py index a86e14b14..9e96e943c 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -5,7 +5,7 @@ The Sphinx documentation toolchain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/__main__.py b/sphinx/__main__.py index 270bc4ebd..cd19db393 100644 --- a/sphinx/__main__.py +++ b/sphinx/__main__.py @@ -5,7 +5,7 @@ The Sphinx documentation toolchain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py index 362abd5a4..b30bd40ae 100644 --- a/sphinx/addnodes.py +++ b/sphinx/addnodes.py @@ -5,7 +5,7 @@ Additional docutils nodes. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/apidoc.py b/sphinx/apidoc.py index 3857e7566..a2862fcc5 100644 --- a/sphinx/apidoc.py +++ b/sphinx/apidoc.py @@ -11,7 +11,7 @@ Copyright 2008 Société des arts technologiques (SAT), http://www.sat.qc.ca/ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/sphinx/application.py b/sphinx/application.py index 5f6b92f50..984b28e64 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -7,7 +7,7 @@ Gracefully adapted from the TextPress system by Armin. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function @@ -218,7 +218,7 @@ class Sphinx(object): self.env.domains[domain] = self.domains[domain](self.env) self.info('done') except Exception as err: - if type(err) is IOError and err.errno == ENOENT: + if isinstance(err, IOError) and err.errno == ENOENT: self.info('not yet created') else: self.info('failed: %s' % err) diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py index bbb9b3117..28b0706ca 100644 --- a/sphinx/builders/__init__.py +++ b/sphinx/builders/__init__.py @@ -5,7 +5,7 @@ Builder superclass for all builders. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -388,6 +388,9 @@ class Builder(object): self.info(bold('waiting for workers...')) tasks.join() + for warning in warnings: + self.warn(*warning) + def prepare_writing(self, docnames): """A place where you can add logic before :meth:`write_doc` is run""" raise NotImplementedError diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py index 069d0ce6a..4fb98ba12 100644 --- a/sphinx/builders/changes.py +++ b/sphinx/builders/changes.py @@ -5,7 +5,7 @@ Changelog builder. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/devhelp.py b/sphinx/builders/devhelp.py index afe4b4040..8e334b3f6 100644 --- a/sphinx/builders/devhelp.py +++ b/sphinx/builders/devhelp.py @@ -7,7 +7,7 @@ .. _Devhelp: http://live.gnome.org/devhelp - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import absolute_import diff --git a/sphinx/builders/epub.py b/sphinx/builders/epub.py index 848dfaa43..ae64dbe04 100644 --- a/sphinx/builders/epub.py +++ b/sphinx/builders/epub.py @@ -6,7 +6,7 @@ Build epub files. Originally derived from qthelp.py. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/gettext.py b/sphinx/builders/gettext.py index 1962545d0..1a2f5fceb 100644 --- a/sphinx/builders/gettext.py +++ b/sphinx/builders/gettext.py @@ -5,7 +5,7 @@ The MessageCatalogBuilder class. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index 21539c2a7..093d2b416 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -5,7 +5,7 @@ Several HTML builders. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -17,7 +17,7 @@ import posixpath from os import path from hashlib import md5 -from six import iteritems, itervalues, text_type, string_types +from six import iteritems, text_type, string_types from six.moves import cPickle as pickle from docutils import nodes from docutils.io import DocTreeInput, StringOutput @@ -268,7 +268,8 @@ class StandaloneHTMLBuilder(Builder): # html_domain_indices can be False/True or a list of index names indices_config = self.config.html_domain_indices if indices_config: - for domain in itervalues(self.env.domains): + for domain_name in sorted(self.env.domains): + domain = self.env.domains[domain_name] for indexcls in domain.indices: indexname = '%s-%s' % (domain.name, indexcls.name) if isinstance(indices_config, list): @@ -337,6 +338,7 @@ class StandaloneHTMLBuilder(Builder): show_source = self.config.html_show_sourcelink, file_suffix = self.out_suffix, script_files = self.script_files, + language = self.config.language, css_files = self.css_files, sphinx_version = __version__, style = stylename, @@ -816,7 +818,7 @@ class StandaloneHTMLBuilder(Builder): compressor = zlib.compressobj(9) for domainname, domain in iteritems(self.env.domains): for name, dispname, type, docname, anchor, prio in \ - domain.get_objects(): + sorted(domain.get_objects()): if anchor.endswith(name): # this can shorten the inventory by as much as 25% anchor = anchor[:-len(name)] + '$' diff --git a/sphinx/builders/htmlhelp.py b/sphinx/builders/htmlhelp.py index 400fbdc11..c93f8c6c8 100644 --- a/sphinx/builders/htmlhelp.py +++ b/sphinx/builders/htmlhelp.py @@ -6,7 +6,7 @@ Build HTML help support files. Parts adapted from Python's Doc/tools/prechm.py. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/sphinx/builders/latex.py b/sphinx/builders/latex.py index 5683ade25..ee3f0bb7e 100644 --- a/sphinx/builders/latex.py +++ b/sphinx/builders/latex.py @@ -5,7 +5,7 @@ LaTeX builder. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index bf50e643c..9da7818dc 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -5,7 +5,7 @@ The CheckExternalLinksBuilder class. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -122,7 +122,7 @@ class CheckExternalLinksBuilder(Builder): elif not (uri[0:5] == 'http:' or uri[0:6] == 'https:'): return 'local', '', 0 elif uri in self.good: - return 'working', '', 0 + return 'working', 'old', 0 elif uri in self.broken: return 'broken', self.broken[uri], 0 elif uri in self.redirected: @@ -166,13 +166,20 @@ class CheckExternalLinksBuilder(Builder): req = Request(req_url) f = opener.open(req, **kwargs) f.close() - + except HTTPError as err: + if err.code == 401: + # We'll take "Unauthorized" as working. + self.good.add(uri) + return 'working', ' - unauthorized', 0 + else: + self.broken[uri] = str(err) + return 'broken', str(err), 0 except Exception as err: self.broken[uri] = str(err) return 'broken', str(err), 0 if f.url.rstrip('/') == req_url.rstrip('/'): self.good.add(uri) - return 'working', 'new', 0 + return 'working', '', 0 else: new_url = f.url if hash: @@ -192,7 +199,7 @@ class CheckExternalLinksBuilder(Builder): uri, docname, lineno, status, info, code = result if status == 'unchecked': return - if status == 'working' and info != 'new': + if status == 'working' and info == 'old': return if lineno: self.info('(line %4d) ' % lineno, nonl=1) @@ -202,7 +209,7 @@ class CheckExternalLinksBuilder(Builder): self.info(darkgray('-local- ') + uri) self.write_entry('local', docname, lineno, uri) elif status == 'working': - self.info(darkgreen('ok ') + uri) + self.info(darkgreen('ok ') + uri + info) elif status == 'broken': self.info(red('broken ') + uri + red(' - ' + info)) self.write_entry('broken', docname, lineno, uri + ': ' + info) diff --git a/sphinx/builders/manpage.py b/sphinx/builders/manpage.py index dfbf89862..0745f6e60 100644 --- a/sphinx/builders/manpage.py +++ b/sphinx/builders/manpage.py @@ -5,7 +5,7 @@ Manual pages builder. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/qthelp.py b/sphinx/builders/qthelp.py index 8e2558e72..4d13dd4fa 100644 --- a/sphinx/builders/qthelp.py +++ b/sphinx/builders/qthelp.py @@ -5,7 +5,7 @@ Build input files for the Qt collection generator. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/texinfo.py b/sphinx/builders/texinfo.py index 53463f3c7..cdabeb3a8 100644 --- a/sphinx/builders/texinfo.py +++ b/sphinx/builders/texinfo.py @@ -5,7 +5,7 @@ Texinfo builder. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/text.py b/sphinx/builders/text.py index 46b4d72c4..9e624d0d5 100644 --- a/sphinx/builders/text.py +++ b/sphinx/builders/text.py @@ -5,7 +5,7 @@ Plain-text Sphinx builder. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/websupport.py b/sphinx/builders/websupport.py index fb45fda9b..4a33667c6 100644 --- a/sphinx/builders/websupport.py +++ b/sphinx/builders/websupport.py @@ -5,7 +5,7 @@ Builder for the web support package. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/builders/xml.py b/sphinx/builders/xml.py index b0fcd2f74..44ced5419 100644 --- a/sphinx/builders/xml.py +++ b/sphinx/builders/xml.py @@ -5,7 +5,7 @@ Docutils-native XML and pseudo-XML builders. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py index 06004a193..d05d8157f 100644 --- a/sphinx/cmdline.py +++ b/sphinx/cmdline.py @@ -5,7 +5,7 @@ sphinx-build command-line handling. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/sphinx/config.py b/sphinx/config.py index b8a3d6648..145e60675 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -5,7 +5,7 @@ Build configuration file handling. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -61,6 +61,7 @@ class Config(object): show_authors = (False, 'env'), pygments_style = (None, 'html'), highlight_language = ('python', 'env'), + highlight_options = ({}, 'env'), templates_path = ([], 'html'), template_bridge = (None, 'html'), keep_warnings = (False, 'env'), diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py index 969426bc1..8ce37b025 100644 --- a/sphinx/directives/__init__.py +++ b/sphinx/directives/__init__.py @@ -5,7 +5,7 @@ Handlers for additional ReST directives. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index aee32fe3b..204adbfb7 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -3,7 +3,7 @@ sphinx.directives.code ~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index 01c8c012a..74938ba09 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -3,7 +3,7 @@ sphinx.directives.other ~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -62,7 +62,18 @@ class TocTree(Directive): for entry in self.content: if not entry: continue - if not glob: + if glob and ('*' in entry or '?' in entry or '[' in entry): + patname = docname_join(env.docname, entry) + docnames = sorted(patfilter(all_docnames, patname)) + for docname in docnames: + all_docnames.remove(docname) # don't include it again + entries.append((None, docname)) + includefiles.append(docname) + if not docnames: + ret.append(self.state.document.reporter.warning( + 'toctree glob pattern %r didn\'t match any documents' + % entry, line=self.lineno)) + else: # look for explicit titles ("Some Title ") m = explicit_title_re.match(entry) if m: @@ -85,19 +96,9 @@ class TocTree(Directive): 'document %r' % docname, line=self.lineno)) env.note_reread() else: + all_docnames.discard(docname) entries.append((title, docname)) includefiles.append(docname) - else: - patname = docname_join(env.docname, entry) - docnames = sorted(patfilter(all_docnames, patname)) - for docname in docnames: - all_docnames.remove(docname) # don't include it again - entries.append((None, docname)) - includefiles.append(docname) - if not docnames: - ret.append(self.state.document.reporter.warning( - 'toctree glob pattern %r didn\'t match any documents' - % entry, line=self.lineno)) subnode = addnodes.toctree() subnode['parent'] = env.docname # entries contains all entries (self references, external links etc.) diff --git a/sphinx/domains/__init__.py b/sphinx/domains/__init__.py index 66d4c677d..b32007cd3 100644 --- a/sphinx/domains/__init__.py +++ b/sphinx/domains/__init__.py @@ -6,7 +6,7 @@ Support for domains, which are groupings of description directives and roles describing e.g. constructs of one programming language. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index 0754e3172..ab101686d 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -5,7 +5,7 @@ The C language domain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index a7282b70c..25f482a06 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -5,7 +5,7 @@ The C++ language domain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -858,11 +858,8 @@ class ASTParametersQualifiers(ASTBase): _add_text(signode, '= ' + text_type(self.initializer)) -class ASTDeclSpecs(ASTBase): - def __init__(self, outer, visibility, storage, inline, virtual, explicit, - constexpr, volatile, const, trailing): - self.outer = outer - self.visibility = visibility +class ASTDeclSpecsSimple(ASTBase): + def __init__(self, storage, inline, virtual, explicit, constexpr, volatile, const): self.storage = storage self.inline = inline self.virtual = virtual @@ -870,40 +867,9 @@ class ASTDeclSpecs(ASTBase): self.constexpr = constexpr self.volatile = volatile self.const = const - self.trailingTypeSpec = trailing - - @property - def name(self): - return self.trailingTypeSpec.name - - def get_id_v1(self): - res = [] - res.append(self.trailingTypeSpec.get_id_v1()) - if self.volatile: - res.append('V') - if self.const: - res.append('C') - return u''.join(res) - - def get_id_v2(self): - res = [] - if self.volatile: - res.append('V') - if self.const: - res.append('K') - res.append(self.trailingTypeSpec.get_id_v2()) - return u''.join(res) - - def _print_visibility(self): - return (self.visibility and - not ( - self.outer in ('type', 'member', 'function') and - self.visibility == 'public')) def __unicode__(self): res = [] - if self._print_visibility(): - res.append(self.visibility) if self.storage: res.append(self.storage) if self.inline: @@ -918,21 +884,13 @@ class ASTDeclSpecs(ASTBase): res.append('volatile') if self.const: res.append('const') - if self.trailingTypeSpec: - res.append(text_type(self.trailingTypeSpec)) return u' '.join(res) - def describe_signature(self, signode, mode, env): - _verify_description_mode(mode) - modifiers = [] - + def describe_signature(self, modifiers): def _add(modifiers, text): if len(modifiers) > 0: modifiers.append(nodes.Text(' ')) modifiers.append(addnodes.desc_annotation(text, text)) - - if self._print_visibility(): - _add(modifiers, self.visibility) if self.storage: _add(modifiers, self.storage) if self.inline: @@ -947,13 +905,87 @@ class ASTDeclSpecs(ASTBase): _add(modifiers, 'volatile') if self.const: _add(modifiers, 'const') + +class ASTDeclSpecs(ASTBase): + def __init__(self, outer, visibility, leftSpecs, rightSpecs, trailing): + self.outer = outer + self.visibility = visibility + self.leftSpecs = leftSpecs + self.rightSpecs = rightSpecs + self.trailingTypeSpec = trailing + + @property + def name(self): + return self.trailingTypeSpec.name + + def get_id_v1(self): + res = [] + res.append(self.trailingTypeSpec.get_id_v1()) + if self.leftSpecs.volatile or self.rightSpecs.volatile: + res.append('V') + if self.leftSpecs.const or self.rightSpecs.volatile: + res.append('C') + return u''.join(res) + + def get_id_v2(self): + res = [] + if self.leftSpecs.volatile or self.rightSpecs.volatile: + res.append('V') + if self.leftSpecs.const or self.rightSpecs.volatile: + res.append('K') + res.append(self.trailingTypeSpec.get_id_v2()) + return u''.join(res) + + def _print_visibility(self): + return (self.visibility and + not (self.outer in ('type', 'member', 'function') and + self.visibility == 'public')) + + def __unicode__(self): + res = [] + if self._print_visibility(): + res.append(self.visibility) + l = text_type(self.leftSpecs) + if len(l) > 0: + if len(res) > 0: + res.append(" ") + res.append(l) + if self.trailingTypeSpec: + if len(res) > 0: + res.append(" ") + res.append(text_type(self.trailingTypeSpec)) + r = text_type(self.rightSpecs) + if len(r) > 0: + if len(res) > 0: + res.append(" ") + res.append(r) + return "".join(res) + + def describe_signature(self, signode, mode, env): + _verify_description_mode(mode) + modifiers = [] + + def _add(modifiers, text): + if len(modifiers) > 0: + modifiers.append(nodes.Text(' ')) + modifiers.append(addnodes.desc_annotation(text, text)) + + if self._print_visibility(): + _add(modifiers, self.visibility) + self.leftSpecs.describe_signature(modifiers) + for m in modifiers: signode += m if self.trailingTypeSpec: if len(modifiers) > 0: signode += nodes.Text(' ') self.trailingTypeSpec.describe_signature(signode, mode, env) - + modifiers = [] + self.rightSpecs.describe_signature(modifiers) + if len(modifiers) > 0: + signode += nodes.Text(' ') + for m in modifiers: + signode += m class ASTPtrOpPtr(ASTBase): def __init__(self, volatile, const): @@ -1190,7 +1222,6 @@ class ASTType(ASTBase): signode += nodes.Text(' ') self.decl.describe_signature(signode, mode, env) - class ASTTypeWithInit(ASTBase): def __init__(self, type, init): self.objectType = None @@ -1588,20 +1619,8 @@ class DefinitionParser(object): args, volatile, const, refQual, exceptionSpec, override, final, initializer) - def _parse_decl_specs(self, outer, typed=True): - """ - visibility storage-class-specifier function-specifier "constexpr" - "volatile" "const" trailing-type-specifier - - storage-class-specifier -> "static" (only for member_object and - function_object) - - function-specifier -> "inline" | "virtual" | "explicit" (only for - function_object) - - "constexpr" (only for member_object and function_object) - """ - visibility = None + def _parse_decl_specs_simple(self, outer, typed): + """Just parse the simple ones.""" storage = None inline = None virtual = None @@ -1609,12 +1628,6 @@ class DefinitionParser(object): constexpr = None volatile = None const = None - - if outer: - self.skip_ws() - if self.match(_visibility_re): - visibility = self.matched_text - while 1: # accept any permutation of a subset of some decl-specs self.skip_ws() if not storage: @@ -1660,14 +1673,37 @@ class DefinitionParser(object): if const: continue break + return ASTDeclSpecsSimple(storage, inline, virtual, explicit, constexpr, + volatile, const) + + def _parse_decl_specs(self, outer, typed=True): + """ + visibility storage-class-specifier function-specifier "constexpr" + "volatile" "const" trailing-type-specifier + + storage-class-specifier -> "static" (only for member_object and + function_object) + + function-specifier -> "inline" | "virtual" | "explicit" (only for + function_object) + + "constexpr" (only for member_object and function_object) + """ + visibility = None + leftSepcs = None + rightSpecs = None + if outer: + self.skip_ws() + if self.match(_visibility_re): + visibility = self.matched_text + leftSpecs = self._parse_decl_specs_simple(outer, typed) if typed: trailing = self._parse_trailing_type_spec() + rightSpecs = self._parse_decl_specs_simple(outer, typed) else: trailing = None - return ASTDeclSpecs( - outer, visibility, storage, inline, virtual, explicit, constexpr, - volatile, const, trailing) + return ASTDeclSpecs(outer, visibility, leftSpecs, rightSpecs, trailing) def _parse_declerator(self, named, paramMode=None, typed=True): if paramMode: diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index af215fd6e..2045873b9 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -5,7 +5,7 @@ The JavaScript domain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 692010c16..9a6a6c5c2 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -5,7 +5,7 @@ The Python domain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/domains/rst.py b/sphinx/domains/rst.py index 2c304d0c7..b47961469 100644 --- a/sphinx/domains/rst.py +++ b/sphinx/domains/rst.py @@ -5,7 +5,7 @@ The reStructuredText domain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py index 1cd71c410..d39762fad 100644 --- a/sphinx/domains/std.py +++ b/sphinx/domains/std.py @@ -5,7 +5,7 @@ The standard domain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/environment.py b/sphinx/environment.py index 54ecf2035..e07b5e1c8 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -5,7 +5,7 @@ Global creation environment. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -14,6 +14,7 @@ import os import sys import time import types +import bisect import codecs import imghdr import string @@ -589,8 +590,12 @@ class BuildEnvironment: self.doc2path(config.master_doc)) self.app = None - app.emit('env-updated', self) - return docnames + + for retval in app.emit('env-updated', self): + if retval is not None: + docnames.extend(retval) + + return sorted(docnames) def _read_serial(self, docnames, app): for docname in app.status_iterator(docnames, 'reading sources... ', @@ -1521,7 +1526,8 @@ class BuildEnvironment: if (dtype, target) in self._nitpick_ignore: warn = False # for "std" types also try without domain name - if domain.name == 'std' and (typ, target) in self._nitpick_ignore: + if (not domain or domain.name == 'std') and \ + (typ, target) in self._nitpick_ignore: warn = False if not warn: return @@ -1795,7 +1801,8 @@ class BuildEnvironment: except NoUri: pass else: - entry[0].append((main, uri)) + # maintain links in sorted/deterministic order + bisect.insort(entry[0], (main, uri)) for fn, entries in iteritems(self.indexentries): # new entry types must be listed in directives/other.py! @@ -1833,8 +1840,10 @@ class BuildEnvironment: def keyfunc(entry, lcletters=string.ascii_lowercase + '_'): lckey = unicodedata.normalize('NFD', entry[0].lower()) if lckey[0:1] in lcletters: - return chr(127) + lckey - return lckey + lckey = chr(127) + lckey + # ensure a determinstic order *within* letters by also sorting on + # the entry itself + return (lckey, entry[0]) newlist = sorted(new.items(), key=keyfunc) if group_entries: diff --git a/sphinx/errors.py b/sphinx/errors.py index 3d7a5eb47..6761e87f6 100644 --- a/sphinx/errors.py +++ b/sphinx/errors.py @@ -6,7 +6,7 @@ Contains SphinxError and a few subclasses (in an extra module to avoid circular import problems). - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/__init__.py b/sphinx/ext/__init__.py index 5a807ba7b..62c6416c3 100644 --- a/sphinx/ext/__init__.py +++ b/sphinx/ext/__init__.py @@ -5,6 +5,6 @@ Contains Sphinx features not activated by default. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index c60372242..27cd54f93 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -7,7 +7,7 @@ the doctree, thus avoiding duplication between docstrings and documentation for those who like elaborate docstrings. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -30,7 +30,7 @@ from sphinx.application import ExtensionError from sphinx.util.nodes import nested_parse_with_titles from sphinx.util.compat import Directive from sphinx.util.inspect import getargspec, isdescriptor, safe_getmembers, \ - safe_getattr, safe_repr, is_builtin_class_method + safe_getattr, object_description, is_builtin_class_method from sphinx.util.docstrings import prepare_docstring @@ -243,6 +243,11 @@ def between(marker, what=None, keepempty=False, exclude=False): return process +def formatargspec(*argspec): + return inspect.formatargspec(*argspec, + formatvalue=lambda x: '=' + object_description(x)) + + class Documenter(object): """ A Documenter knows how to autodocument a single object type. When @@ -481,14 +486,15 @@ class Documenter(object): domain = getattr(self, 'domain', 'py') directive = getattr(self, 'directivetype', self.objtype) name = self.format_name() + sourcename = self.get_sourcename() self.add_line(u'.. %s:%s:: %s%s' % (domain, directive, name, sig), - '') + sourcename) if self.options.noindex: - self.add_line(u' :noindex:', '') + self.add_line(u' :noindex:', sourcename) if self.objpath: # Be explicit about the module, this is necessary since .. class:: # etc. don't support a prepended module name - self.add_line(u' :module: %s' % self.modname, '') + self.add_line(u' :module: %s' % self.modname, sourcename) def get_doc(self, encoding=None, ignore=1): """Decode and return lines of the docstring(s) for the object.""" @@ -514,9 +520,7 @@ class Documenter(object): for line in docstringlines: yield line - def add_content(self, more_content, no_docstring=False): - """Add content from docstrings, attribute documentation and user.""" - # set sourcename and add content from attribute documentation + def get_sourcename(self): if self.analyzer: # prevent encoding errors when the file name is non-ASCII if not isinstance(self.analyzer.srcname, text_type): @@ -524,8 +528,14 @@ class Documenter(object): sys.getfilesystemencoding(), 'replace') else: filename = self.analyzer.srcname - sourcename = u'%s:docstring of %s' % (filename, self.fullname) + return u'%s:docstring of %s' % (filename, self.fullname) + return u'docstring of %s' % self.fullname + def add_content(self, more_content, no_docstring=False): + """Add content from docstrings, attribute documentation and user.""" + # set sourcename and add content from attribute documentation + sourcename = self.get_sourcename() + if self.analyzer: attr_docs = self.analyzer.find_attr_docs() if self.objpath: key = ('.'.join(self.objpath[:-1]), self.objpath[-1]) @@ -534,8 +544,6 @@ class Documenter(object): docstrings = [attr_docs[key]] for i, line in enumerate(self.process_doc(docstrings)): self.add_line(line, sourcename, i) - else: - sourcename = u'docstring of %s' % self.fullname # add content from docstrings if not no_docstring: @@ -794,17 +802,19 @@ class Documenter(object): if not self.check_module(): return + sourcename = self.get_sourcename() + # make sure that the result starts with an empty line. This is # necessary for some situations where another directive preprocesses # reST and no starting newline is present - self.add_line(u'', '') + self.add_line(u'', sourcename) # format the object's signature, if any sig = self.format_signature() # generate the directive header and options, if applicable self.add_directive_header(sig) - self.add_line(u'', '') + self.add_line(u'', sourcename) # e.g. the module directive doesn't have content self.indent += self.content_indent @@ -854,15 +864,17 @@ class ModuleDocumenter(Documenter): def add_directive_header(self, sig): Documenter.add_directive_header(self, sig) + sourcename = self.get_sourcename() + # add some module-specific options if self.options.synopsis: self.add_line( - u' :synopsis: ' + self.options.synopsis, '') + u' :synopsis: ' + self.options.synopsis, sourcename) if self.options.platform: self.add_line( - u' :platform: ' + self.options.platform, '') + u' :platform: ' + self.options.platform, sourcename) if self.options.deprecated: - self.add_line(u' :deprecated:', '') + self.add_line(u' :deprecated:', sourcename) def get_object_members(self, want_all): if want_all: @@ -872,6 +884,15 @@ class ModuleDocumenter(Documenter): return True, safe_getmembers(self.object) else: memberlist = self.object.__all__ + # Sometimes __all__ is broken... + if not isinstance(memberlist, (list, tuple)) or not \ + all(isinstance(entry, str) for entry in memberlist): + self.directive.warn( + '__all__ should be a list of strings, not %r ' + '(in module %s) -- ignoring __all__' % + (memberlist, self.fullname)) + # fall back to all members + return True, safe_getmembers(self.object) else: memberlist = self.options.members or [] ret = [] @@ -1038,7 +1059,7 @@ class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): argspec = getargspec(self.object.__init__) if argspec[0]: del argspec[0][0] - args = inspect.formatargspec(*argspec) + args = formatargspec(*argspec) # escape backslashes for reST args = args.replace('\\', '\\\\') return args @@ -1093,7 +1114,7 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): return None if argspec[0] and argspec[0][0] in ('cls', 'self'): del argspec[0][0] - return inspect.formatargspec(*argspec) + return formatargspec(*argspec) def format_signature(self): if self.doc_as_attr: @@ -1108,14 +1129,15 @@ class ClassDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # add inheritance info, if wanted if not self.doc_as_attr and self.options.show_inheritance: - self.add_line(u'', '') + sourcename = self.get_sourcename() + self.add_line(u'', sourcename) if hasattr(self.object, '__bases__') and len(self.object.__bases__): bases = [b.__module__ in ('__builtin__', 'builtins') and u':class:`%s`' % b.__name__ or u':class:`%s.%s`' % (b.__module__, b.__name__) for b in self.object.__bases__] self.add_line(_(u' Bases: %s') % ', '.join(bases), - '') + sourcename) def get_doc(self, encoding=None, ignore=1): lines = getattr(self, '_new_docstrings', None) @@ -1200,18 +1222,19 @@ class DataDocumenter(ModuleLevelDocumenter): def add_directive_header(self, sig): ModuleLevelDocumenter.add_directive_header(self, sig) + sourcename = self.get_sourcename() if not self.options.annotation: try: - objrepr = safe_repr(self.object) + objrepr = object_description(self.object) except ValueError: pass else: - self.add_line(u' :annotation: = ' + objrepr, '') + self.add_line(u' :annotation: = ' + objrepr, sourcename) elif self.options.annotation is SUPPRESS: pass else: self.add_line(u' :annotation: %s' % self.options.annotation, - '') + sourcename) def document_members(self, all_members=False): pass @@ -1258,7 +1281,7 @@ class MethodDocumenter(DocstringSignatureMixin, ClassLevelDocumenter): argspec = getargspec(self.object) if argspec[0] and argspec[0][0] in ('cls', 'self'): del argspec[0][0] - args = inspect.formatargspec(*argspec) + args = formatargspec(*argspec) # escape backslashes for reST args = args.replace('\\', '\\\\') return args @@ -1311,19 +1334,20 @@ class AttributeDocumenter(DocstringStripSignatureMixin, ClassLevelDocumenter): def add_directive_header(self, sig): ClassLevelDocumenter.add_directive_header(self, sig) + sourcename = self.get_sourcename() if not self.options.annotation: if not self._datadescriptor: try: - objrepr = safe_repr(self.object) + objrepr = object_description(self.object) except ValueError: pass else: - self.add_line(u' :annotation: = ' + objrepr, '') + self.add_line(u' :annotation: = ' + objrepr, sourcename) elif self.options.annotation is SUPPRESS: pass else: self.add_line(u' :annotation: %s' % self.options.annotation, - '') + sourcename) def add_content(self, more_content, no_docstring=False): if not self._datadescriptor: diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index 908c96ca0..08a855846 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -49,7 +49,7 @@ resolved to a Python object, and otherwise it becomes simple emphasis. This can be used as the default role to make links 'smart'. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -69,6 +69,7 @@ import sphinx from sphinx import addnodes from sphinx.util.compat import Directive from sphinx.pycode import ModuleAnalyzer, PycodeError +from sphinx.ext.autodoc import Options # -- autosummary_toc node ------------------------------------------------------ @@ -131,7 +132,7 @@ def autosummary_table_visit_html(self, node): class FakeDirective: env = {} - genopt = {} + genopt = Options() def get_documenter(obj, parent): """Get an autodoc.Documenter class suitable for documenting the given @@ -194,7 +195,7 @@ class Autosummary(Directive): def run(self): self.env = env = self.state.document.settings.env - self.genopt = {} + self.genopt = Options() self.warnings = [] self.result = ViewList() @@ -269,6 +270,8 @@ class Autosummary(Directive): self.warn('failed to import object %s' % real_name) items.append((display_name, '', '', real_name)) continue + if not documenter.check_module(): + continue # try to also get a source code analyzer for attribute docs try: diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py index 11b1dfe7d..07629f193 100644 --- a/sphinx/ext/autosummary/generate.py +++ b/sphinx/ext/autosummary/generate.py @@ -14,7 +14,7 @@ generate: sphinx-autogen -o source/generated source/*.rst - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py index 399935cce..5e2cca25e 100644 --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -6,7 +6,7 @@ Check Python modules and C API for coverage. Mostly written by Josip Dzolonga for the Google Highly Open Participation contest. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/doctest.py b/sphinx/ext/doctest.py index 216325cb8..317c34e0b 100644 --- a/sphinx/ext/doctest.py +++ b/sphinx/ext/doctest.py @@ -6,7 +6,7 @@ Mimic doctest by automatically executing code snippets and checking their results. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py index ae65dbb8f..f593dcaae 100644 --- a/sphinx/ext/extlinks.py +++ b/sphinx/ext/extlinks.py @@ -20,7 +20,7 @@ You can also give an explicit caption, e.g. :exmpl:`Foo `. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index 71e7ba651..8553cf6e0 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -6,7 +6,7 @@ Allow graphviz-formatted graphs to be included in Sphinx-generated documents inline. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/ifconfig.py b/sphinx/ext/ifconfig.py index a4e4a02df..02e5db424 100644 --- a/sphinx/ext/ifconfig.py +++ b/sphinx/ext/ifconfig.py @@ -16,7 +16,7 @@ namespace of the project configuration (that is, all variables from ``conf.py`` are available.) - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -49,7 +49,8 @@ class IfConfig(Directive): def process_ifconfig_nodes(app, doctree, docname): - ns = app.config.__dict__.copy() + ns = {k: app.config[k] for k in app.config.values} + ns.update(app.config.__dict__.copy()) ns['builder'] = app.builder.name for node in doctree.traverse(ifconfig): try: diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py index 0b2e5ce3a..05eb15895 100644 --- a/sphinx/ext/inheritance_diagram.py +++ b/sphinx/ext/inheritance_diagram.py @@ -32,7 +32,7 @@ r""" The graph is inserted as a PNG+image map into HTML and a PDF in LaTeX. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -186,7 +186,7 @@ class InheritanceGraph(object): for cls in classes: recurse(cls) - return all_classes.values() + return list(all_classes.values()) def class_name(self, cls, parts=0): """Given a class object, return a fully-qualified name. diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py index 6f3d44eb4..d35d71c52 100644 --- a/sphinx/ext/intersphinx.py +++ b/sphinx/ext/intersphinx.py @@ -20,7 +20,7 @@ also be specified individually, e.g. if the docs should be buildable without Internet access. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/jsmath.py b/sphinx/ext/jsmath.py index 9bf38f62f..64d1b3a2c 100644 --- a/sphinx/ext/jsmath.py +++ b/sphinx/ext/jsmath.py @@ -6,7 +6,7 @@ Set up everything for use of JSMath to display math in HTML via JavaScript. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/linkcode.py b/sphinx/ext/linkcode.py index 37e021e88..336c4c3dc 100644 --- a/sphinx/ext/linkcode.py +++ b/sphinx/ext/linkcode.py @@ -5,7 +5,7 @@ Add external links to module code in Python object descriptions. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/mathbase.py b/sphinx/ext/mathbase.py index 6aaffca87..57a7ec314 100644 --- a/sphinx/ext/mathbase.py +++ b/sphinx/ext/mathbase.py @@ -5,7 +5,7 @@ Set up math support in source files and LaTeX/text output. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/mathjax.py b/sphinx/ext/mathjax.py index f677ff482..26d1e2aa1 100644 --- a/sphinx/ext/mathjax.py +++ b/sphinx/ext/mathjax.py @@ -7,7 +7,7 @@ Sphinx's HTML writer -- requires the MathJax JavaScript library on your webserver/computer. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -64,7 +64,7 @@ def setup(app): # more information for mathjax secure url is here: # http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn app.add_config_value('mathjax_path', - 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?' + 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?' 'config=TeX-AMS-MML_HTMLorMML', False) app.add_config_value('mathjax_inline', [r'\(', r'\)'], 'html') app.add_config_value('mathjax_display', [r'\[', r'\]'], 'html') diff --git a/sphinx/ext/napoleon/__init__.py b/sphinx/ext/napoleon/__init__.py index 9b43d8fda..14a061158 100644 --- a/sphinx/ext/napoleon/__init__.py +++ b/sphinx/ext/napoleon/__init__.py @@ -5,7 +5,7 @@ Support for NumPy and Google style docstrings. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 19f5f395a..c54113fd2 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -7,7 +7,7 @@ Classes for docstring parsing and formatting. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -23,8 +23,9 @@ from sphinx.util.pycompat import UnicodeMixin _directive_regex = re.compile(r'\.\. \S+::') -_google_untyped_arg_regex = re.compile(r'\s*(\w+)\s*:\s*(.*)') -_google_typed_arg_regex = re.compile(r'\s*(\w+)\s*\(\s*(.+?)\s*\)\s*:\s*(.*)') +_google_untyped_arg_regex = re.compile(r'\s*(\*?\*?\w+)\s*:\s*(.*)') +_google_typed_arg_regex = re.compile(r'\s*(\*?\*?\w+)\s*\(\s*(.+?)\s*\)\s*:' + r'\s*(.*)') class GoogleDocstring(UnicodeMixin): @@ -90,6 +91,7 @@ class GoogleDocstring(UnicodeMixin): :returns: Description of return value. :rtype: str + """ def __init__(self, docstring, config=None, app=None, what='', name='', @@ -215,6 +217,11 @@ class GoogleDocstring(UnicodeMixin): _name = match.group(1) _desc = match.group(2) + if _name[:2] == '**': + _name = r'\*\*'+_name[2:] + elif _name[:1] == '*': + _name = r'\*'+_name[1:] + if prefer_type and not _type: _type, _name = _name, _type indent = self._get_indent(line) + 1 @@ -254,6 +261,10 @@ class GoogleDocstring(UnicodeMixin): else: return [] + def _consume_usage_section(self): + lines = self._dedent(self._consume_to_next_section()) + return lines + def _consume_section_header(self): section = next(self._line_iter) stripped_section = section.strip(':') @@ -291,11 +302,10 @@ class GoogleDocstring(UnicodeMixin): padding = ' ' * len(prefix) result_lines = [] for i, line in enumerate(lines): - if line: - if i == 0: - result_lines.append(prefix + line) - else: - result_lines.append(padding + line) + if i == 0: + result_lines.append((prefix + line).rstrip()) + elif line: + result_lines.append(padding + line) else: result_lines.append('') return result_lines @@ -444,6 +454,13 @@ class GoogleDocstring(UnicodeMixin): use_admonition = self._config.napoleon_use_admonition_for_examples return self._parse_generic_section(section, use_admonition) + def _parse_usage_section(self, section): + header = ['.. rubric:: Usage:', ''] + block = ['.. code-block:: python', ''] + lines = self._consume_usage_section() + lines = self._indent(lines, 3) + return header + block + lines + [''] + def _parse_generic_section(self, section, use_admonition): lines = self._strip_empty(self._consume_to_next_section()) lines = self._dedent(lines) @@ -664,6 +681,7 @@ class NumpyDocstring(GoogleDocstring): :returns: Description of return value. :rtype: str + Methods ------- diff --git a/sphinx/ext/napoleon/iterators.py b/sphinx/ext/napoleon/iterators.py index 482fe1dde..50dd67e57 100644 --- a/sphinx/ext/napoleon/iterators.py +++ b/sphinx/ext/napoleon/iterators.py @@ -7,7 +7,7 @@ A collection of helpful iterators. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/pngmath.py b/sphinx/ext/pngmath.py index 81a6f9d57..374b7ab32 100644 --- a/sphinx/ext/pngmath.py +++ b/sphinx/ext/pngmath.py @@ -5,7 +5,7 @@ Render math in HTML via dvipng. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/todo.py b/sphinx/ext/todo.py index ae434dd4d..2e91c9eaf 100644 --- a/sphinx/ext/todo.py +++ b/sphinx/ext/todo.py @@ -8,7 +8,7 @@ all todos of your project and lists them along with a backlink to the original location. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/ext/viewcode.py b/sphinx/ext/viewcode.py index cd3f2ac74..d213430a9 100644 --- a/sphinx/ext/viewcode.py +++ b/sphinx/ext/viewcode.py @@ -5,7 +5,7 @@ Add links to module code in Python object descriptions. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index e257c3702..22f53a45b 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -5,7 +5,7 @@ Highlight code blocks using Pygments. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -96,7 +96,7 @@ class PygmentsBridge(object): source = source.translate(escape_hl_chars) # then, escape all characters nonrepresentable in LaTeX source = source.translate(tex_hl_escape_map_new) - return '\\begin{Verbatim}[frame=single,commandchars=\\\\\\{\\}]\n' + \ + return '\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n' + \ source + '\\end{Verbatim}\n' def try_parse(self, src): @@ -134,7 +134,7 @@ class PygmentsBridge(object): else: return True - def highlight_block(self, source, lang, warn=None, force=False, **kwargs): + def highlight_block(self, source, lang, opts=None, warn=None, force=False, **kwargs): if not isinstance(source, text_type): source = source.decode() @@ -164,7 +164,7 @@ class PygmentsBridge(object): lexer = lexers[lang] else: try: - lexer = lexers[lang] = get_lexer_by_name(lang) + lexer = lexers[lang] = get_lexer_by_name(lang, **opts or {}) except ClassNotFound: if warn: warn('Pygments lexer name %r is not known' % lang) @@ -190,8 +190,6 @@ class PygmentsBridge(object): if self.dest == 'html': return hlsource else: - hlsource = re.sub(r'(?<=\\begin{Verbatim}\[)(?=commandchars)', - r'frame=single,', hlsource) if not isinstance(hlsource, text_type): # Py2 / Pygments < 1.6 hlsource = hlsource.decode() return hlsource.translate(tex_hl_escape_map_new) diff --git a/sphinx/jinja2glue.py b/sphinx/jinja2glue.py index b161b4270..b3f3228fb 100644 --- a/sphinx/jinja2glue.py +++ b/sphinx/jinja2glue.py @@ -5,7 +5,7 @@ Glue code for the jinja2 templating engine. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py index 9332f4745..4f7ebcfb9 100644 --- a/sphinx/locale/__init__.py +++ b/sphinx/locale/__init__.py @@ -5,7 +5,7 @@ Locale utilities. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/make_mode.py b/sphinx/make_mode.py index 7b5e75aae..bb9a7d499 100644 --- a/sphinx/make_mode.py +++ b/sphinx/make_mode.py @@ -11,7 +11,7 @@ This is in its own module so that importing it is fast. It should not import the main Sphinx modules (like sphinx.applications, sphinx.builders). - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function @@ -251,11 +251,15 @@ class Make(object): doctreedir = self.builddir_join('doctrees') orig_cmd = sys.argv[0] - if orig_cmd.endswith('.exe'): + if sys.platform == 'win32' and orig_cmd.endswith('.exe'): + # win32: 'sphinx-build.exe' cmd = [orig_cmd] - elif sys.platform == 'win32': + elif sys.platform == 'win32' and os.path.splitext(orig_cmd)[1] == '': + # win32: 'sphinx-build' without extension cmd = [orig_cmd + '.exe'] - else: # ex. 'sphinx-build' or 'sphinx-build.py' + else: + # win32: 'sphinx-build.py' + # linux, mac: 'sphinx-build' or 'sphinx-build.py' cmd = [sys.executable, orig_cmd] return call(cmd + ['-b', builder] + opts + diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py index 461eea056..3e7228b3f 100644 --- a/sphinx/pycode/__init__.py +++ b/sphinx/pycode/__init__.py @@ -5,7 +5,7 @@ Utilities parsing and analyzing Python code. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/sphinx/pycode/nodes.py b/sphinx/pycode/nodes.py index 8bba3491b..06e664827 100644 --- a/sphinx/pycode/nodes.py +++ b/sphinx/pycode/nodes.py @@ -5,7 +5,7 @@ Parse tree node implementations. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/pygments_styles.py b/sphinx/pygments_styles.py index a7335e609..a15f2f393 100644 --- a/sphinx/pygments_styles.py +++ b/sphinx/pygments_styles.py @@ -5,7 +5,7 @@ Sphinx theme specific highlighting styles. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index 549a7d623..3d3d3eb9f 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -5,7 +5,7 @@ Quickly setup documentation source to work with Sphinx. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/sphinx/roles.py b/sphinx/roles.py index 451cfe60b..9af52da82 100644 --- a/sphinx/roles.py +++ b/sphinx/roles.py @@ -5,7 +5,7 @@ Handlers for additional ReST roles. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 58b611a3c..ebba8a371 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -5,7 +5,7 @@ Create a full-text search index for offline search. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re @@ -313,13 +313,13 @@ class IndexBuilder(object): if fn in fn2index: rv[k] = fn2index[fn] else: - rv[k] = [fn2index[fn] for fn in v if fn in fn2index] + rv[k] = sorted([fn2index[fn] for fn in v if fn in fn2index]) return rvs def freeze(self): """Create a usable data structure for serializing.""" - filenames = list(self._titles.keys()) - titles = list(self._titles.values()) + filenames = sorted(self._titles.keys()) + titles = sorted(self._titles.values()) fn2index = dict((f, i) for (i, f) in enumerate(filenames)) terms, title_terms = self.get_terms(fn2index) diff --git a/sphinx/search/en.py b/sphinx/search/en.py index 3e7aadd34..de77ae294 100644 --- a/sphinx/search/en.py +++ b/sphinx/search/en.py @@ -5,7 +5,7 @@ English search language: includes the JS porter stemmer. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/search/ja.py b/sphinx/search/ja.py index 862645a8f..523520975 100644 --- a/sphinx/search/ja.py +++ b/sphinx/search/ja.py @@ -5,7 +5,7 @@ Japanese search language: includes routine to split words. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py index 22f2727d5..748948e57 100644 --- a/sphinx/setup_command.py +++ b/sphinx/setup_command.py @@ -8,7 +8,7 @@ :author: Sebastian Wiesner :contact: basti.wiesner@gmx.net - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function @@ -77,6 +77,7 @@ class BuildDoc(Command): ('today=', None, 'How to format the current date, used as the ' 'replacement for |today|'), ('link-index', 'i', 'Link index.html to the master doc'), + ('copyright', None, 'The copyright string'), ] boolean_options = ['fresh-env', 'all-files', 'link-index'] @@ -91,6 +92,7 @@ class BuildDoc(Command): self.today = '' self.config_dir = None self.link_index = False + self.copyright = '' def _guess_source_dir(self): for guess in ('doc', 'docs'): @@ -152,6 +154,8 @@ class BuildDoc(Command): confoverrides['release'] = self.release if self.today: confoverrides['today'] = self.today + if self.copyright: + confoverrides['copyright'] = self.copyright app = Sphinx(self.source_dir, self.config_dir, self.builder_target_dir, self.doctree_dir, self.builder, confoverrides, status_stream, diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 444b0373b..b28b204bc 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -39,10 +39,10 @@ \definecolor{TitleColor}{rgb}{0.126,0.263,0.361} \definecolor{InnerLinkColor}{rgb}{0.208,0.374,0.486} \definecolor{OuterLinkColor}{rgb}{0.216,0.439,0.388} -% Redefine these colors to something not white if you want to have colored +% Redefine these colors to something if you want to have colored % background and border for code examples. \definecolor{VerbatimColor}{rgb}{1,1,1} -\definecolor{VerbatimBorderColor}{rgb}{1,1,1} +\definecolor{VerbatimBorderColor}{rgb}{0,0,0} % Uncomment these two lines to ignore the paper size and make the page % size more like a typical published manual. diff --git a/sphinx/themes/agogo/layout.html b/sphinx/themes/agogo/layout.html index a29299b9f..6a80a207f 100644 --- a/sphinx/themes/agogo/layout.html +++ b/sphinx/themes/agogo/layout.html @@ -5,7 +5,7 @@ Sphinx layout template for the agogo theme, originally written by Andi Albrecht. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} diff --git a/sphinx/themes/agogo/static/agogo.css_t b/sphinx/themes/agogo/static/agogo.css_t index dff9ee648..04f377d7b 100644 --- a/sphinx/themes/agogo/static/agogo.css_t +++ b/sphinx/themes/agogo/static/agogo.css_t @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- agogo theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/basic/defindex.html b/sphinx/themes/basic/defindex.html index 9316cfda4..3c1240ebd 100644 --- a/sphinx/themes/basic/defindex.html +++ b/sphinx/themes/basic/defindex.html @@ -4,7 +4,7 @@ Default template for the "index" page. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "layout.html" %} diff --git a/sphinx/themes/basic/domainindex.html b/sphinx/themes/basic/domainindex.html index 4ee62d55b..2ca1111e1 100644 --- a/sphinx/themes/basic/domainindex.html +++ b/sphinx/themes/basic/domainindex.html @@ -4,7 +4,7 @@ Template for domain indices (module index, ...). - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "layout.html" %} diff --git a/sphinx/themes/basic/genindex-single.html b/sphinx/themes/basic/genindex-single.html index ec57a7bf0..ddc988381 100644 --- a/sphinx/themes/basic/genindex-single.html +++ b/sphinx/themes/basic/genindex-single.html @@ -4,7 +4,7 @@ Template for a "single" page of a split index. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {% macro indexentries(firstname, links) %} diff --git a/sphinx/themes/basic/genindex-split.html b/sphinx/themes/basic/genindex-split.html index aca864781..ca8db18b0 100644 --- a/sphinx/themes/basic/genindex-split.html +++ b/sphinx/themes/basic/genindex-split.html @@ -4,7 +4,7 @@ Template for a "split" index overview page. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "layout.html" %} diff --git a/sphinx/themes/basic/genindex.html b/sphinx/themes/basic/genindex.html index 836d7844c..18e29b5e3 100644 --- a/sphinx/themes/basic/genindex.html +++ b/sphinx/themes/basic/genindex.html @@ -4,7 +4,7 @@ Template for an "all-in-one" index. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {% macro indexentries(firstname, links) %} diff --git a/sphinx/themes/basic/globaltoc.html b/sphinx/themes/basic/globaltoc.html index 60ed28a38..9f0296a93 100644 --- a/sphinx/themes/basic/globaltoc.html +++ b/sphinx/themes/basic/globaltoc.html @@ -4,7 +4,7 @@ Sphinx sidebar template: global table of contents. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #}

{{ _('Table Of Contents') }}

diff --git a/sphinx/themes/basic/layout.html b/sphinx/themes/basic/layout.html index a7bbbb9aa..12614876a 100644 --- a/sphinx/themes/basic/layout.html +++ b/sphinx/themes/basic/layout.html @@ -4,7 +4,7 @@ Master layout template for Sphinx themes. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- block doctype -%} diff --git a/sphinx/themes/basic/localtoc.html b/sphinx/themes/basic/localtoc.html index 70afb6a5c..02e7cf38e 100644 --- a/sphinx/themes/basic/localtoc.html +++ b/sphinx/themes/basic/localtoc.html @@ -4,7 +4,7 @@ Sphinx sidebar template: local table of contents. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- if display_toc %} diff --git a/sphinx/themes/basic/page.html b/sphinx/themes/basic/page.html index b4544a26e..e8be92e09 100644 --- a/sphinx/themes/basic/page.html +++ b/sphinx/themes/basic/page.html @@ -4,7 +4,7 @@ Master template for simple pages. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "layout.html" %} diff --git a/sphinx/themes/basic/relations.html b/sphinx/themes/basic/relations.html index c82bbee6f..907b38be1 100644 --- a/sphinx/themes/basic/relations.html +++ b/sphinx/themes/basic/relations.html @@ -4,7 +4,7 @@ Sphinx sidebar template: relation links. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- if prev %} diff --git a/sphinx/themes/basic/search.html b/sphinx/themes/basic/search.html index 4a79aceca..d4a0b7d77 100644 --- a/sphinx/themes/basic/search.html +++ b/sphinx/themes/basic/search.html @@ -4,7 +4,7 @@ Template for the search page. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "layout.html" %} diff --git a/sphinx/themes/basic/searchbox.html b/sphinx/themes/basic/searchbox.html index ffcce73ea..4e128f4c1 100644 --- a/sphinx/themes/basic/searchbox.html +++ b/sphinx/themes/basic/searchbox.html @@ -4,7 +4,7 @@ Sphinx sidebar template: quick search box. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- if pagename != "search" and builder != "singlehtml" %} diff --git a/sphinx/themes/basic/searchresults.html b/sphinx/themes/basic/searchresults.html index b3d372c08..dccd20b6e 100644 --- a/sphinx/themes/basic/searchresults.html +++ b/sphinx/themes/basic/searchresults.html @@ -4,7 +4,7 @@ Template for the body of the search results page. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #}

{{ _('Search') }}

diff --git a/sphinx/themes/basic/sourcelink.html b/sphinx/themes/basic/sourcelink.html index abd6a97fc..a104b8923 100644 --- a/sphinx/themes/basic/sourcelink.html +++ b/sphinx/themes/basic/sourcelink.html @@ -4,7 +4,7 @@ Sphinx sidebar template: "show source" link. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- if show_source and has_source and sourcename %} diff --git a/sphinx/themes/basic/static/basic.css_t b/sphinx/themes/basic/static/basic.css_t index 5f4211bb1..bf000dce0 100644 --- a/sphinx/themes/basic/static/basic.css_t +++ b/sphinx/themes/basic/static/basic.css_t @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- basic theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/basic/static/doctools.js b/sphinx/themes/basic/static/doctools.js index 8c9b995d0..9f0ea0cd4 100644 --- a/sphinx/themes/basic/static/doctools.js +++ b/sphinx/themes/basic/static/doctools.js @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilities for all documentation. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/basic/static/searchtools.js_t b/sphinx/themes/basic/static/searchtools.js_t index 047636c9f..38515a99e 100644 --- a/sphinx/themes/basic/static/searchtools.js_t +++ b/sphinx/themes/basic/static/searchtools.js_t @@ -4,7 +4,7 @@ * * Sphinx JavaScript utilties for the full-text search. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ @@ -259,7 +259,7 @@ var Search = { dataType: "text", complete: function(jqxhr, textstatus) { var data = jqxhr.responseText; - if (data !== '') { + if (data !== '' && data !== undefined) { listItem.append(Search.makeSearchSummary(data, searchterms, hlterms)); } Search.output.append(listItem); diff --git a/sphinx/themes/basic/static/websupport.js b/sphinx/themes/basic/static/websupport.js index 79ed10e28..28d65db4a 100644 --- a/sphinx/themes/basic/static/websupport.js +++ b/sphinx/themes/basic/static/websupport.js @@ -4,7 +4,7 @@ * * sphinx.websupport utilties for all documentation. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/default/layout.html b/sphinx/themes/default/layout.html index 62319059e..149cd86b7 100644 --- a/sphinx/themes/default/layout.html +++ b/sphinx/themes/default/layout.html @@ -4,7 +4,7 @@ Sphinx layout template for the default theme. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} diff --git a/sphinx/themes/default/static/default.css_t b/sphinx/themes/default/static/default.css_t index 137a9e755..15d072954 100644 --- a/sphinx/themes/default/static/default.css_t +++ b/sphinx/themes/default/static/default.css_t @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- default theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/default/static/sidebar.js_t b/sphinx/themes/default/static/sidebar.js_t index 873156920..5b38e532e 100644 --- a/sphinx/themes/default/static/sidebar.js_t +++ b/sphinx/themes/default/static/sidebar.js_t @@ -16,7 +16,7 @@ * Once the browser is closed the cookie is deleted and the position * reset to the default (expanded). * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/epub/epub-cover.html b/sphinx/themes/epub/epub-cover.html index e5a75d7b6..86de4d488 100644 --- a/sphinx/themes/epub/epub-cover.html +++ b/sphinx/themes/epub/epub-cover.html @@ -4,7 +4,7 @@ Sample template for the html cover page. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "layout.html" %} diff --git a/sphinx/themes/epub/layout.html b/sphinx/themes/epub/layout.html index 49183f1ec..83706cf5f 100644 --- a/sphinx/themes/epub/layout.html +++ b/sphinx/themes/epub/layout.html @@ -4,7 +4,7 @@ Sphinx layout template for the epub theme. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} diff --git a/sphinx/themes/epub/static/epub.css b/sphinx/themes/epub/static/epub.css index 264819cb5..847b3511f 100644 --- a/sphinx/themes/epub/static/epub.css +++ b/sphinx/themes/epub/static/epub.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- epub theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/haiku/layout.html b/sphinx/themes/haiku/layout.html index 20d5d3f98..0f4c96f28 100644 --- a/sphinx/themes/haiku/layout.html +++ b/sphinx/themes/haiku/layout.html @@ -4,7 +4,7 @@ Sphinx layout template for the haiku theme. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} diff --git a/sphinx/themes/haiku/static/haiku.css_t b/sphinx/themes/haiku/static/haiku.css_t index c6cb42d85..e2f32368c 100644 --- a/sphinx/themes/haiku/static/haiku.css_t +++ b/sphinx/themes/haiku/static/haiku.css_t @@ -16,7 +16,7 @@ * Braden Ewing * Humdinger * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/nature/static/nature.css_t b/sphinx/themes/nature/static/nature.css_t index 8818e447b..391de6e79 100644 --- a/sphinx/themes/nature/static/nature.css_t +++ b/sphinx/themes/nature/static/nature.css_t @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- nature theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/pyramid/static/epub.css b/sphinx/themes/pyramid/static/epub.css index 603837557..7c6e67806 100644 --- a/sphinx/themes/pyramid/static/epub.css +++ b/sphinx/themes/pyramid/static/epub.css @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- default theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/pyramid/static/pyramid.css_t b/sphinx/themes/pyramid/static/pyramid.css_t index f60f82d26..80252d209 100644 --- a/sphinx/themes/pyramid/static/pyramid.css_t +++ b/sphinx/themes/pyramid/static/pyramid.css_t @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- pylons theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/scrolls/layout.html b/sphinx/themes/scrolls/layout.html index 0940d220c..7120750a9 100644 --- a/sphinx/themes/scrolls/layout.html +++ b/sphinx/themes/scrolls/layout.html @@ -5,7 +5,7 @@ Sphinx layout template for the scrolls theme, originally written by Armin Ronacher. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} diff --git a/sphinx/themes/scrolls/static/scrolls.css_t b/sphinx/themes/scrolls/static/scrolls.css_t index 802fb9cac..63d79e1d3 100644 --- a/sphinx/themes/scrolls/static/scrolls.css_t +++ b/sphinx/themes/scrolls/static/scrolls.css_t @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- scrolls theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/sphinxdoc/layout.html b/sphinx/themes/sphinxdoc/layout.html index 5bf78eb5e..54c03fd55 100644 --- a/sphinx/themes/sphinxdoc/layout.html +++ b/sphinx/themes/sphinxdoc/layout.html @@ -4,7 +4,7 @@ Sphinx layout template for the sphinxdoc theme. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} diff --git a/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t b/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t index 90b5d23a9..712eec085 100644 --- a/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t +++ b/sphinx/themes/sphinxdoc/static/sphinxdoc.css_t @@ -5,7 +5,7 @@ * Sphinx stylesheet -- sphinxdoc theme. Originally created by * Armin Ronacher for Werkzeug. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/themes/traditional/static/traditional.css_t b/sphinx/themes/traditional/static/traditional.css_t index fcdeb067d..e684898d2 100644 --- a/sphinx/themes/traditional/static/traditional.css_t +++ b/sphinx/themes/traditional/static/traditional.css_t @@ -4,7 +4,7 @@ * * Sphinx stylesheet -- traditional docs.python.org theme. * - * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ diff --git a/sphinx/theming.py b/sphinx/theming.py index 100a89316..1c555fd99 100644 --- a/sphinx/theming.py +++ b/sphinx/theming.py @@ -5,7 +5,7 @@ Theming support for HTML builders. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/transforms.py b/sphinx/transforms.py index a62fa99a1..2ef3424e1 100644 --- a/sphinx/transforms.py +++ b/sphinx/transforms.py @@ -5,7 +5,7 @@ Docutils transforms used by Sphinx when reading documents. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py index 024e25b1b..4626b0ae2 100644 --- a/sphinx/util/__init__.py +++ b/sphinx/util/__init__.py @@ -5,7 +5,7 @@ Utility functions for Sphinx. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/compat.py b/sphinx/util/compat.py index a0cb566db..5c5ff3102 100644 --- a/sphinx/util/compat.py +++ b/sphinx/util/compat.py @@ -5,7 +5,7 @@ Stuff for docutils compatibility. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import warnings diff --git a/sphinx/util/console.py b/sphinx/util/console.py index fa7a4a9f5..a9b7ee55d 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -5,7 +5,7 @@ Format colored console output. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py index 46f894306..514efad81 100644 --- a/sphinx/util/docfields.py +++ b/sphinx/util/docfields.py @@ -6,7 +6,7 @@ "Doc fields" are reST field lists in object descriptions that will be domain-specifically transformed to a more appealing presentation. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/docstrings.py b/sphinx/util/docstrings.py index ae973d49e..22c3696ab 100644 --- a/sphinx/util/docstrings.py +++ b/sphinx/util/docstrings.py @@ -5,7 +5,7 @@ Utilities for docstring processing. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py index 589067810..7bd0c34ea 100644 --- a/sphinx/util/i18n.py +++ b/sphinx/util/i18n.py @@ -5,7 +5,7 @@ Builder superclass for all builders. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py index f82f1f451..d2d5dd0a3 100644 --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -5,10 +5,12 @@ Helpers for inspecting Python modules. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ +import re + # this imports the standard library inspect module without resorting to # relatively import this module inspect = __import__('inspect') @@ -18,6 +20,8 @@ from six.moves import builtins from sphinx.util import force_decode +memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>$)') + if PY3: from functools import partial @@ -123,14 +127,17 @@ def safe_getmembers(object, predicate=None, attr_getter=safe_getattr): return results -def safe_repr(object): +def object_description(object): """A repr() implementation that returns text safe to use in reST context.""" try: s = repr(object) except Exception: raise ValueError if isinstance(s, binary_type): - return force_decode(s, None).replace('\n', ' ') + s = force_decode(s, None) + # Strip non-deterministic memory addresses such as + # ``<__main__.A at 0x7f68cb685710>`` + s = memory_address_re.sub('', s) return s.replace('\n', ' ') diff --git a/sphinx/util/jsdump.py b/sphinx/util/jsdump.py index ede4ae7da..49813672d 100644 --- a/sphinx/util/jsdump.py +++ b/sphinx/util/jsdump.py @@ -6,7 +6,7 @@ This module implements a simple JavaScript serializer. Uses the basestring encode function from simplejson by Bob Ippolito. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -89,11 +89,13 @@ def dumps(obj, key=False): elif isinstance(obj, integer_types + (float,)): return str(obj) elif isinstance(obj, dict): - return '{%s}' % ','.join('%s:%s' % ( + return '{%s}' % ','.join(sorted('%s:%s' % ( dumps(key, True), dumps(value) - ) for key, value in iteritems(obj)) - elif isinstance(obj, (tuple, list, set)): + ) for key, value in iteritems(obj))) + elif isinstance(obj, set): + return '[%s]' % ','.join(sorted(dumps(x) for x in obj)) + elif isinstance(obj, (tuple, list)): return '[%s]' % ','.join(dumps(x) for x in obj) elif isinstance(obj, string_types): return encode_string(obj) diff --git a/sphinx/util/jsonimpl.py b/sphinx/util/jsonimpl.py index ac5c54aec..1d296b6b7 100644 --- a/sphinx/util/jsonimpl.py +++ b/sphinx/util/jsonimpl.py @@ -5,7 +5,7 @@ JSON serializer implementation wrapper. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/matching.py b/sphinx/util/matching.py index da8cfa324..e7befcd2f 100644 --- a/sphinx/util/matching.py +++ b/sphinx/util/matching.py @@ -5,7 +5,7 @@ Pattern-matching utility functions for Sphinx. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index 681046f23..0fb2e14d1 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -5,7 +5,7 @@ Docutils node-related utility functions for Sphinx. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index 2ac06d613..0645ee46f 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -5,7 +5,7 @@ Operating system-related utility functions for Sphinx. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py index 7e238ab18..1d1e0a098 100644 --- a/sphinx/util/parallel.py +++ b/sphinx/util/parallel.py @@ -5,7 +5,7 @@ Parallel building utilities. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/png.py b/sphinx/util/png.py index 397adb245..b308a171a 100644 --- a/sphinx/util/png.py +++ b/sphinx/util/png.py @@ -5,7 +5,7 @@ PNG image manipulation helpers. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 5031dd9b5..28ab1b75c 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -5,7 +5,7 @@ Stuff for Python version compatibility. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/tags.py b/sphinx/util/tags.py index d5141587b..e9a9a436d 100644 --- a/sphinx/util/tags.py +++ b/sphinx/util/tags.py @@ -3,7 +3,7 @@ sphinx.util.tags ~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/texescape.py b/sphinx/util/texescape.py index 6fcf9ff08..41a0a6d95 100644 --- a/sphinx/util/texescape.py +++ b/sphinx/util/texescape.py @@ -5,7 +5,7 @@ TeX escaping helper. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/util/websupport.py b/sphinx/util/websupport.py index 65c48296e..2bb23fa81 100644 --- a/sphinx/util/websupport.py +++ b/sphinx/util/websupport.py @@ -3,7 +3,7 @@ sphinx.util.websupport ~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/versioning.py b/sphinx/versioning.py index 1be4d39bc..c6691d52d 100644 --- a/sphinx/versioning.py +++ b/sphinx/versioning.py @@ -6,7 +6,7 @@ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 diff --git a/sphinx/websupport/__init__.py b/sphinx/websupport/__init__.py index 4cdedc0dd..75451e47b 100644 --- a/sphinx/websupport/__init__.py +++ b/sphinx/websupport/__init__.py @@ -5,7 +5,7 @@ Base Module for web support functions. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/errors.py b/sphinx/websupport/errors.py index c401e8d98..1eda97e5c 100644 --- a/sphinx/websupport/errors.py +++ b/sphinx/websupport/errors.py @@ -5,7 +5,7 @@ Contains Error classes for the web support package. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/search/__init__.py b/sphinx/websupport/search/__init__.py index f2a67b4d4..bae6fa73c 100644 --- a/sphinx/websupport/search/__init__.py +++ b/sphinx/websupport/search/__init__.py @@ -5,7 +5,7 @@ Server side search support for the web support package. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/search/nullsearch.py b/sphinx/websupport/search/nullsearch.py index e842356d2..3d46555c0 100644 --- a/sphinx/websupport/search/nullsearch.py +++ b/sphinx/websupport/search/nullsearch.py @@ -5,7 +5,7 @@ The default search adapter, does nothing. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/search/whooshsearch.py b/sphinx/websupport/search/whooshsearch.py index 17adf0584..17a6e75a6 100644 --- a/sphinx/websupport/search/whooshsearch.py +++ b/sphinx/websupport/search/whooshsearch.py @@ -5,7 +5,7 @@ Whoosh search adapter. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/search/xapiansearch.py b/sphinx/websupport/search/xapiansearch.py index bd24879cb..2d056bcce 100644 --- a/sphinx/websupport/search/xapiansearch.py +++ b/sphinx/websupport/search/xapiansearch.py @@ -5,7 +5,7 @@ Xapian search adapter. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/storage/__init__.py b/sphinx/websupport/storage/__init__.py index d9937d847..3f421a7ce 100644 --- a/sphinx/websupport/storage/__init__.py +++ b/sphinx/websupport/storage/__init__.py @@ -5,7 +5,7 @@ Storage for the websupport package. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/storage/differ.py b/sphinx/websupport/storage/differ.py index c6966a720..9ddd54764 100644 --- a/sphinx/websupport/storage/differ.py +++ b/sphinx/websupport/storage/differ.py @@ -5,7 +5,7 @@ A differ for creating an HTML representations of proposal diffs - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/storage/sqlalchemy_db.py b/sphinx/websupport/storage/sqlalchemy_db.py index afabeadea..84cdaefcf 100644 --- a/sphinx/websupport/storage/sqlalchemy_db.py +++ b/sphinx/websupport/storage/sqlalchemy_db.py @@ -6,7 +6,7 @@ SQLAlchemy table and mapper definitions used by the :class:`sphinx.websupport.storage.sqlalchemystorage.SQLAlchemyStorage`. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/websupport/storage/sqlalchemystorage.py b/sphinx/websupport/storage/sqlalchemystorage.py index 354c710e5..6a9513770 100644 --- a/sphinx/websupport/storage/sqlalchemystorage.py +++ b/sphinx/websupport/storage/sqlalchemystorage.py @@ -5,7 +5,7 @@ An SQLAlchemy storage backend. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/writers/__init__.py b/sphinx/writers/__init__.py index a7541b279..fd795b0b9 100644 --- a/sphinx/writers/__init__.py +++ b/sphinx/writers/__init__.py @@ -5,6 +5,6 @@ Custom docutils writers. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index 95de7ce73..c63b27698 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -5,7 +5,7 @@ docutils writers handling Sphinx' custom nodes. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -70,7 +70,9 @@ class HTMLTranslator(BaseTranslator): self.highlighter = builder.highlighter self.no_smarty = 0 self.builder = builder - self.highlightlang = builder.config.highlight_language + self.highlightlang = self.highlightlang_base = \ + builder.config.highlight_language + self.highlightopts = builder.config.highlight_options self.highlightlinenothreshold = sys.maxsize self.protect_literal_text = 0 self.permalink_text = builder.config.html_add_permalinks @@ -301,10 +303,15 @@ class HTMLTranslator(BaseTranslator): highlight_args['force'] = True if 'linenos' in node: linenos = node['linenos'] + if lang is self.highlightlang_base: + # only pass highlighter options for original language + opts = self.highlightopts + else: + opts = {} def warner(msg): self.builder.warn(msg, (self.builder.current_docname, node.line)) highlighted = self.highlighter.highlight_block( - node.rawsource, lang, warn=warner, linenos=linenos, + node.rawsource, lang, opts=opts, warn=warner, linenos=linenos, **highlight_args) starttag = self.starttag(node, 'div', suffix='', CLASS='highlight-%s' % lang) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 09818493d..37811a948 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -8,7 +8,7 @@ Much of this code is adapted from Dave Kuhlman's "docpy" writer from his docutils sandbox. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -288,9 +288,8 @@ class LaTeXTranslator(nodes.NodeVisitor): self.no_contractions = 0 self.compact_list = 0 self.first_param = 0 - self.previous_spanning_row = 0 - self.previous_spanning_column = 0 self.remember_multirow = {} + self.remember_multirowcol = {} def format_docclass(self, docclass): """ prepends prefix to sphinx document classes @@ -767,32 +766,49 @@ class LaTeXTranslator(nodes.NodeVisitor): self.visit_thead(node) self.body = self.tablebody def depart_tbody(self, node): - pass + self.remember_multirow = {} + self.remember_multirowcol = {} def visit_row(self, node): self.table.col = 0 + for key,value in self.remember_multirow.items(): + if not value and key in self.remember_multirowcol: + del self.remember_multirowcol[key] def depart_row(self, node): - if self.previous_spanning_row == 1: - self.previous_spanning_row = 0 self.body.append('\\\\\n') - self.body.append('\\hline') + if any(self.remember_multirow.values()): + linestart = 1 + for col in range(1, self.table.col + 1): + if self.remember_multirow.get(col): + if linestart != col: + linerange = str(linestart) + '-' + str(col - 1) + self.body.append('\\cline{' + linerange + '}') + linestart = col + 1 + if self.remember_multirowcol.get(col, 0): + linestart += self.remember_multirowcol[col] + if linestart <= col: + linerange = str(linestart) + '-' + str(col) + self.body.append('\\cline{' + linerange + '}') + else: + self.body.append('\\hline') self.table.rowcount += 1 def visit_entry(self, node): - if self.table.col > 0: - self.body.append(' & ') - elif self.remember_multirow.get(1, 0) > 1: - self.remember_multirow[1] -= 1 + if self.table.col == 0: + while self.remember_multirow.get(self.table.col + 1, 0): + self.table.col += 1 + self.remember_multirow[self.table.col] -= 1 + if self.remember_multirowcol.get(self.table.col, 0): + extracols = self.remember_multirowcol[self.table.col] + self.body.append(' \multicolumn{') + self.body.append(str(extracols + 1)) + self.body.append('}{|l|}{}') + self.table.col += extracols + self.body.append(' & ') + else: self.body.append(' & ') self.table.col += 1 context = '' - if 'morerows' in node: - self.body.append(' \multirow{') - self.previous_spanning_row = 1 - self.body.append(str(node.get('morerows') + 1)) - self.body.append('}{*}{') - context += '}' - self.remember_multirow[self.table.col] = node.get('morerows') + 1 if 'morecols' in node: self.body.append(' \multicolumn{') self.body.append(str(node.get('morecols') + 1)) @@ -801,12 +817,29 @@ class LaTeXTranslator(nodes.NodeVisitor): else: self.body.append('}{l|}{') context += '}' + if 'morerows' in node: + self.body.append(' \multirow{') + self.body.append(str(node.get('morerows') + 1)) + self.body.append('}{*}{') + context += '}' + self.remember_multirow[self.table.col] = node.get('morerows') + if 'morecols' in node: + if 'morerows' in node: + self.remember_multirowcol[self.table.col] = node.get('morecols') + self.table.col += node.get('morecols') if isinstance(node.parent.parent, nodes.thead): self.body.append('\\textsf{\\relax ') context += '}' - if self.remember_multirow.get(self.table.col + 1, 0) > 1: - self.remember_multirow[self.table.col + 1] -= 1 + while self.remember_multirow.get(self.table.col + 1, 0): + self.table.col += 1 + self.remember_multirow[self.table.col] -= 1 context += ' & ' + if self.remember_multirowcol.get(self.table.col, 0): + extracols = self.remember_multirowcol[self.table.col] + context += ' \multicolumn{' + context += str(extracols + 1) + context += '}{l|}{}' + self.table.col += extracols self.context.append(context) def depart_entry(self, node): self.body.append(self.context.pop()) # header @@ -1378,10 +1411,15 @@ class LaTeXTranslator(nodes.NodeVisitor): highlight_args['force'] = True if 'linenos' in node: linenos = node['linenos'] + if lang is self.hlsettingstack[0][0]: + # only pass highlighter options for original language + opts = self.builder.config.highlight_options + else: + opts = {} def warner(msg): self.builder.warn(msg, (self.curfilestack[-1], node.line)) - hlcode = self.highlighter.highlight_block(code, lang, warn=warner, - linenos=linenos, **highlight_args) + hlcode = self.highlighter.highlight_block(code, lang, opts=opts, + warn=warner, linenos=linenos, **highlight_args) # workaround for Unicode issue hlcode = hlcode.replace(u'€', u'@texteuro[]') # must use original Verbatim environment and "tabular" environment diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py index bc8420570..f062bef9d 100644 --- a/sphinx/writers/manpage.py +++ b/sphinx/writers/manpage.py @@ -5,7 +5,7 @@ Manual page writer, extended for Sphinx custom nodes. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py index f0e4894bc..3eda30c4b 100644 --- a/sphinx/writers/texinfo.py +++ b/sphinx/writers/texinfo.py @@ -5,7 +5,7 @@ Custom docutils writer for Texinfo. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/writers/text.py b/sphinx/writers/text.py index efd32df3a..e2e9db6f6 100644 --- a/sphinx/writers/text.py +++ b/sphinx/writers/text.py @@ -5,7 +5,7 @@ Custom docutils writer for plain text. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os diff --git a/sphinx/writers/websupport.py b/sphinx/writers/websupport.py index bc48c9595..0ba290249 100644 --- a/sphinx/writers/websupport.py +++ b/sphinx/writers/websupport.py @@ -5,7 +5,7 @@ sphinx.websupport writer that adds comment-related annotations. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/sphinx/writers/xml.py b/sphinx/writers/xml.py index 179a9ab4f..40d238cea 100644 --- a/sphinx/writers/xml.py +++ b/sphinx/writers/xml.py @@ -5,7 +5,7 @@ Docutils-native XML and pseudo-XML writers. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/path.py b/tests/path.py index 573d3d3ca..2f0cdc062 100755 --- a/tests/path.py +++ b/tests/path.py @@ -4,7 +4,7 @@ path ~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os diff --git a/tests/root/markup.txt b/tests/root/markup.txt index 1ad7a13b6..4d109eb6b 100644 --- a/tests/root/markup.txt +++ b/tests/root/markup.txt @@ -180,17 +180,17 @@ Tables | 2 | Empty cells: | | +----+----------------+----+ -Table with multicol: +Table with multirow and multicol: .. only:: latex - +----+---------------------+ - | 1 | test! | - +----+---------+------+----+ - | 2 | col | col | c | - | y +---------+------+----+ - | x | test | - +----+---------------------+ + +----+----------------+---------+ + | 1 | test! | c | + +----+---------+------+ | + | 2 | col | col | | + | y +---------+------+----+----+ + | x | multi-column cell | x | + +----+---------------------+----+ Figures diff --git a/tests/run.py b/tests/run.py index 95308212b..432e2318e 100755 --- a/tests/run.py +++ b/tests/run.py @@ -6,7 +6,7 @@ This script runs the Sphinx unit test suite. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/tests/test_api_translator.py b/tests/test_api_translator.py index 4dd70a2c8..4f862eea4 100644 --- a/tests/test_api_translator.py +++ b/tests/test_api_translator.py @@ -5,7 +5,7 @@ Test the Sphinx API for translator. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_apidoc.py b/tests/test_apidoc.py index 3bc16f5c1..215b2e571 100644 --- a/tests/test_apidoc.py +++ b/tests/test_apidoc.py @@ -5,7 +5,7 @@ Test the sphinx.apidoc module. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_application.py b/tests/test_application.py index 1f188de1f..c878cc1b6 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -5,7 +5,7 @@ Test the Sphinx class. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index 0025170f2..2d61edabd 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -6,7 +6,7 @@ Test the autodoc extension. This tests mainly the Documenters; the auto directives are tested in a test source file translated by test_build. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_build.py b/tests/test_build.py index 117bb84ca..5aec0d3d8 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -5,7 +5,7 @@ Test all builders. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_build_gettext.py b/tests/test_build_gettext.py index 677f35055..61565a5cd 100644 --- a/tests/test_build_gettext.py +++ b/tests/test_build_gettext.py @@ -5,7 +5,7 @@ Test the build process with gettext builder with the test root. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/tests/test_build_html.py b/tests/test_build_html.py index f0512aed3..bc99ab3b8 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -5,7 +5,7 @@ Test the HTML builder and check output against XPath. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index 005f99af0..ad8afab6f 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -5,7 +5,7 @@ Test the build process with LaTeX builder with the test root. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/tests/test_build_texinfo.py b/tests/test_build_texinfo.py index bb10f8fa4..8050695d9 100644 --- a/tests/test_build_texinfo.py +++ b/tests/test_build_texinfo.py @@ -5,7 +5,7 @@ Test the build process with Texinfo builder with the test root. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/tests/test_build_text.py b/tests/test_build_text.py index d486bed2f..014deeca3 100644 --- a/tests/test_build_text.py +++ b/tests/test_build_text.py @@ -5,7 +5,7 @@ Test the build process with Text builder with the test root. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_catalogs.py b/tests/test_catalogs.py index c4f5c08f7..b06e71a57 100644 --- a/tests/test_catalogs.py +++ b/tests/test_catalogs.py @@ -5,7 +5,7 @@ Test the base build process. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import shutil diff --git a/tests/test_config.py b/tests/test_config.py index db5a95603..77e61fee0 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -6,7 +6,7 @@ Test the sphinx.config.Config class and its handling in the Application class. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from six import PY2, PY3, StringIO diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py index 651527c7d..d8cb2794c 100644 --- a/tests/test_directive_code.py +++ b/tests/test_directive_code.py @@ -5,7 +5,7 @@ Test the code-block directive. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_directive_only.py b/tests/test_directive_only.py index 0cf446636..de7bea46b 100644 --- a/tests/test_directive_only.py +++ b/tests/test_directive_only.py @@ -5,7 +5,7 @@ Test the only directive with the test root. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_docutilsconf.py b/tests/test_docutilsconf.py index 90fa5db32..5f956942d 100644 --- a/tests/test_docutilsconf.py +++ b/tests/test_docutilsconf.py @@ -5,7 +5,7 @@ Test docutils.conf support for several writers. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py index 1b7dfa6ed..3a47f3e12 100644 --- a/tests/test_domain_cpp.py +++ b/tests/test_domain_cpp.py @@ -5,7 +5,7 @@ Tests the C++ Domain - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -63,6 +63,8 @@ def test_type_definitions(): check("type", "public MyContainer::const_iterator", "MyContainer::const_iterator") + # test decl specs on right + check("type", "bool const b") check('member', ' const std::string & name = 42', diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py index 1d0fcc5ff..3918662dd 100644 --- a/tests/test_domain_py.py +++ b/tests/test_domain_py.py @@ -5,7 +5,7 @@ Tests the Python Domain - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_domain_rst.py b/tests/test_domain_rst.py index 9f70f5b1f..7dabebe06 100644 --- a/tests/test_domain_rst.py +++ b/tests/test_domain_rst.py @@ -5,7 +5,7 @@ Tests the reStructuredText domain. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_domain_std.py b/tests/test_domain_std.py index a1e5bdc1b..1e361f172 100644 --- a/tests/test_domain_std.py +++ b/tests/test_domain_std.py @@ -5,7 +5,7 @@ Tests the std domain - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_environment.py b/tests/test_environment.py index b5da325f5..1e639aeb6 100644 --- a/tests/test_environment.py +++ b/tests/test_environment.py @@ -5,7 +5,7 @@ Test the BuildEnvironment class. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -106,13 +106,12 @@ def test_env_read_docs(): assert len(read_docnames) > 2 and read_docnames == sorted(read_docnames) def on_env_read_docs_2(app, env, docnames): - docnames.reverse() + docnames.remove('images') app.connect('env-before-read-docs', on_env_read_docs_2) read_docnames = env.update(app.config, app.srcdir, app.doctreedir, app) - reversed_read_docnames = sorted(read_docnames, reverse=True) - assert len(read_docnames) > 2 and read_docnames == reversed_read_docnames + assert len(read_docnames) == 2 def test_object_inventory(): diff --git a/tests/test_ext_autosummary.py b/tests/test_ext_autosummary.py index 363c11e99..6bf9f3b9c 100644 --- a/tests/test_ext_autosummary.py +++ b/tests/test_ext_autosummary.py @@ -5,7 +5,7 @@ Test the autosummary extension. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_ext_coverage.py b/tests/test_ext_coverage.py index e59d42bc7..9f401670d 100644 --- a/tests/test_ext_coverage.py +++ b/tests/test_ext_coverage.py @@ -5,7 +5,7 @@ Test the coverage builder. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_ext_doctest.py b/tests/test_ext_doctest.py index 002afff6f..68a0b17e8 100644 --- a/tests/test_ext_doctest.py +++ b/tests/test_ext_doctest.py @@ -5,7 +5,7 @@ Test the doctest extension. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_ext_intersphinx.py b/tests/test_ext_intersphinx.py index fb5406686..d55973220 100644 --- a/tests/test_ext_intersphinx.py +++ b/tests/test_ext_intersphinx.py @@ -5,7 +5,7 @@ Test the intersphinx extension. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_ext_napoleon.py b/tests/test_ext_napoleon.py index e2790d38e..162f98e81 100644 --- a/tests/test_ext_napoleon.py +++ b/tests/test_ext_napoleon.py @@ -6,7 +6,7 @@ Tests for :mod:`sphinx.ext.napoleon.__init__` module. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_ext_napoleon_docstring.py b/tests/test_ext_napoleon_docstring.py index 3b5c4fc74..84e55840a 100644 --- a/tests/test_ext_napoleon_docstring.py +++ b/tests/test_ext_napoleon_docstring.py @@ -6,7 +6,7 @@ Tests for :mod:`sphinx.ext.napoleon.docstring` module. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -155,6 +155,26 @@ class GoogleDocstringTest(BaseDocstringTest): :returns: Extended description of return value""" + ), ( + """ + Single line summary + + Args: + arg1(str):Extended + description of arg1 + *args: Variable length argument list. + **kwargs: Arbitrary keyword arguments. + """, + """ + Single line summary + + :Parameters: * **arg1** (*str*) -- + Extended + description of arg1 + * **\\*args** -- + Variable length argument list. + * **\\*\\*kwargs** -- + Arbitrary keyword arguments.""" )] def test_docstrings(self): @@ -335,6 +355,28 @@ class NumpyDocstringTest(BaseDocstringTest): :returns: *str* -- Extended description of return value""" + ), ( + """ + Single line summary + + Parameters + ---------- + arg1:str + Extended description of arg1 + *args: + Variable length argument list. + **kwargs: + Arbitrary keyword arguments. + """, + """ + Single line summary + + :Parameters: * **arg1** (*str*) -- + Extended description of arg1 + * ***args** -- + Variable length argument list. + * ****kwargs** -- + Arbitrary keyword arguments.""" )] def test_docstrings(self): @@ -362,7 +404,7 @@ param1 : :class:`MyClass ` instance config = Config(napoleon_use_param=True) actual = str(NumpyDocstring(docstring, config)) expected = """\ - +:param param1: :type param1: :class:`MyClass ` instance """ self.assertEqual(expected, actual) @@ -385,7 +427,7 @@ param1 : MyClass instance config = Config(napoleon_use_param=True) actual = str(NumpyDocstring(textwrap.dedent(docstring), config)) expected = """\ - +:param param1: :type param1: MyClass instance """ self.assertEqual(expected, actual) diff --git a/tests/test_ext_napoleon_iterators.py b/tests/test_ext_napoleon_iterators.py index 320047e5a..b99e50f96 100644 --- a/tests/test_ext_napoleon_iterators.py +++ b/tests/test_ext_napoleon_iterators.py @@ -6,7 +6,7 @@ Tests for :mod:`sphinx.ext.napoleon.iterators` module. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_ext_viewcode.py b/tests/test_ext_viewcode.py index fb24f765a..42700f4de 100644 --- a/tests/test_ext_viewcode.py +++ b/tests/test_ext_viewcode.py @@ -5,7 +5,7 @@ Test sphinx.ext.viewcode extension. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_highlighting.py b/tests/test_highlighting.py index 5044ab0ea..02b928916 100644 --- a/tests/test_highlighting.py +++ b/tests/test_highlighting.py @@ -5,7 +5,7 @@ Test the Pygments highlighting bridge. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -62,6 +62,12 @@ def test_detect_interactive(): assert ret.startswith("
") +def test_lexer_options(): + bridge = PygmentsBridge('html') + ret = bridge.highlight_block('//comment', 'php', opts={'startinline' : True}) + assert '//comment' in ret + + def test_set_formatter(): PygmentsBridge.html_formatter = MyFormatter try: diff --git a/tests/test_i18n.py b/tests/test_i18n.py index 8144663cb..986b62566 100644 --- a/tests/test_i18n.py +++ b/tests/test_i18n.py @@ -5,7 +5,7 @@ Test locale features. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_intl.py b/tests/test_intl.py index 69437c1a7..140cff062 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -6,7 +6,7 @@ Test message patching for internationalization purposes. Runs the text builder in the test root. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/tests/test_markup.py b/tests/test_markup.py index 8bac63244..d282d236d 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -5,7 +5,7 @@ Test various Sphinx-specific markup extensions. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -136,7 +136,7 @@ def test_latex_escaping(): r'\(\Gamma\)\textbackslash{}\(\infty\)\$') # in verbatim code fragments yield (verify, u'::\n\n @Γ\\∞${}', None, - u'\\begin{Verbatim}[frame=single,commandchars=\\\\\\{\\}]\n' + u'\\begin{Verbatim}[commandchars=\\\\\\{\\}]\n' u'@\\(\\Gamma\\)\\PYGZbs{}\\(\\infty\\)\\PYGZdl{}\\PYGZob{}\\PYGZcb{}\n' u'\\end{Verbatim}') # in URIs diff --git a/tests/test_metadata.py b/tests/test_metadata.py index 944aa1574..d61f1b522 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -5,7 +5,7 @@ Test our handling of metadata in files with bibliographic metadata. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index 1d3bcd9e5..8cc9e4e54 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -5,7 +5,7 @@ Test the sphinx.quickstart module. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_search.py b/tests/test_search.py index a7e99e042..391c2ee83 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -5,7 +5,7 @@ Test the search index builder. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_searchadapters.py b/tests/test_searchadapters.py index 4a91f96d6..7818ec807 100644 --- a/tests/test_searchadapters.py +++ b/tests/test_searchadapters.py @@ -5,7 +5,7 @@ Test the Web Support Package search adapters. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_setup_command.py b/tests/test_setup_command.py index 708267213..7816fd183 100644 --- a/tests/test_setup_command.py +++ b/tests/test_setup_command.py @@ -5,7 +5,7 @@ Test setup_command for distutils. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_templating.py b/tests/test_templating.py index 5f8fcaeb6..3cf331bbc 100644 --- a/tests/test_templating.py +++ b/tests/test_templating.py @@ -5,7 +5,7 @@ Test templating. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_theming.py b/tests/test_theming.py index 85138b977..931f48468 100644 --- a/tests/test_theming.py +++ b/tests/test_theming.py @@ -5,7 +5,7 @@ Test the Theme class. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_util_i18n.py b/tests/test_util_i18n.py index d69c2acdc..ba18026ca 100644 --- a/tests/test_util_i18n.py +++ b/tests/test_util_i18n.py @@ -5,7 +5,7 @@ Test i18n util. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function diff --git a/tests/test_util_nodes.py b/tests/test_util_nodes.py index a385245d8..5cdd20a19 100644 --- a/tests/test_util_nodes.py +++ b/tests/test_util_nodes.py @@ -5,7 +5,7 @@ Tests uti.nodes functions. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from textwrap import dedent diff --git a/tests/test_versioning.py b/tests/test_versioning.py index bd8c697c9..140082e15 100644 --- a/tests/test_versioning.py +++ b/tests/test_versioning.py @@ -5,7 +5,7 @@ Test the versioning implementation. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/test_websupport.py b/tests/test_websupport.py index 7126e7d22..6ea4588dd 100644 --- a/tests/test_websupport.py +++ b/tests/test_websupport.py @@ -5,7 +5,7 @@ Test the Web Support Package - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/tests/util.py b/tests/util.py index e184c28dd..f7d8411c7 100644 --- a/tests/util.py +++ b/tests/util.py @@ -3,7 +3,7 @@ Sphinx test suite utilities ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ diff --git a/utils/check_sources.py b/utils/check_sources.py index 1b78ab62c..e9b1c311e 100755 --- a/utils/check_sources.py +++ b/utils/check_sources.py @@ -7,7 +7,7 @@ Make sure each Python file has a correct file header including copyright and license information. - :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. + :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function