Skip to content

Commit

Permalink
Merge branch 'stable' into 3256_update_release_script
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Jan 13, 2017
2 parents ed6742f + 234379b commit c03da8f
Show file tree
Hide file tree
Showing 126 changed files with 3,053 additions and 3,682 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@
*.swp

.dir-locals.el
.cache/
.mypy_cache/
.ropeproject/
TAGS
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -4,15 +4,15 @@ cache:
directories:
- $HOME/.cache/pip
python:
- "pypy"
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "nightly"
- "pypy"
env:
global:
- TEST='-v --with-timer --timer-top-n 25'
- TEST='-v --durations 25'
- PYTHONFAULTHANDLER=x
- PYTHONWARNINGS=all
matrix:
Expand Down
12 changes: 12 additions & 0 deletions CHANGES
@@ -1,12 +1,18 @@
Release 1.5.2 (in development)
===============================

Incompatible changes
--------------------

* Dependency requirement updates: requests 2.4.0 or above (refs: #3268, #3310)

Features added
--------------

* #3241: emit latex warning if buggy titlesec (ref #3210)
* #3194: Refer the $MAKE environment variable to determine ``make`` command
* Emit warning for nested numbered toctrees (refs: #3142)
* #978: `intersphinx_mapping` also allows a list as a parameter

Bugs fixed
----------
Expand All @@ -21,6 +27,12 @@ Bugs fixed
* The warning type ``misc.highlighting_failure`` does not work
* #3294: ``add_latex_package()`` make crashes non-LaTeX builders
* The caption of table are rendered as invalid HTML (refs: #3287)
* #3268: Sphinx crashes with requests package from Debian jessie
* #3284: Sphinx crashes on parallel build with an extension which raises
unserializable exception
* #3315: Bibliography crashes on latex build with docclass 'memoir'
* #3328: Could not refer rubric implicitly
* #3329: emit warnings if po file is invalid and can't read it. Also writing mo too.


Release 1.5.1 (released Dec 13, 2016)
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Expand Up @@ -6,7 +6,7 @@ PYTHON ?= python
DONT_CHECK = -i build -i dist -i sphinx/style/jquery.js \
-i sphinx/pycode/pgen2 -i sphinx/util/smartypants.py \
-i .ropeproject -i doc/_build -i tests/path.py \
-i tests/coverage.py -i utils/convert.py \
-i utils/convert.py \
-i tests/typing_test_data.py \
-i tests/test_autodoc_py35.py \
-i tests/roots/test-warnings/undecodable.rst \
Expand Down Expand Up @@ -65,6 +65,7 @@ clean-testfiles:
rm -rf tests/.coverage
rm -rf tests/build
rm -rf .tox/
rm -rf .cache/

clean-buildfiles:
rm -rf build
Expand All @@ -79,14 +80,13 @@ reindent:
@$(PYTHON) utils/reindent.py -r -n .

test:
@cd tests; $(PYTHON) run.py -I py35 -d -m '^[tT]est' $(TEST)
@cd tests; $(PYTHON) run.py --ignore py35 -v $(TEST)

test-async:
@cd tests; $(PYTHON) run.py -d -m '^[tT]est' $(TEST)
@cd tests; $(PYTHON) run.py -v $(TEST)

covertest:
@cd tests; $(PYTHON) run.py -d -m '^[tT]est' --with-coverage \
--cover-package=sphinx $(TEST)
@cd tests; $(PYTHON) run.py -v --cov=sphinx --junitxml=.junit.xml $(TEST)

build:
@$(PYTHON) setup.py build
4 changes: 2 additions & 2 deletions doc/intl.rst
Expand Up @@ -94,14 +94,14 @@ This section describe a easy way to translate with sphinx-intl.
$ make gettext
As a result, many pot files are generated under ``_build/locale``
As a result, many pot files are generated under ``_build/gettext``
directory.

#. Setup/Update your `locale_dir`:

.. code-block:: console
$ sphinx-intl update -p _build/locale -l de -l ja
$ sphinx-intl update -p _build/gettext -l de -l ja
Done. You got these directories that contain po files:

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -25,5 +25,5 @@ universal = 1

[flake8]
max-line-length = 95
ignore = E113,E116,E221,E226,E241,E251,E901
ignore = E116,E241,E251
exclude = .git,.tox,tests/*,build/*,sphinx/search/*,sphinx/pycode/pgen2/*,doc/ext/example*.py
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -50,7 +50,7 @@
'babel>=1.3,!=2.0',
'alabaster>=0.7,<0.8',
'imagesize',
'requests',
'requests>=2.4.0',
]
extras_require = {
# Environment Marker works for wheel 0.24 or later
Expand Down
2 changes: 1 addition & 1 deletion sphinx/__init__.py
Expand Up @@ -30,7 +30,7 @@
warnings.filterwarnings('ignore', "'U' mode is deprecated",
DeprecationWarning, module='docutils.io')

__version__ = '1.5.2+'
__version__ = '1.5.2+'
__released__ = '1.5.2' # used when Sphinx builds its own docs

# version info for better programmatic use
Expand Down
4 changes: 2 additions & 2 deletions sphinx/apidoc.py
Expand Up @@ -368,8 +368,8 @@ def main(argv=sys.argv):
text += ' %s\n' % module
d = dict(
path = opts.destdir,
sep = False,
dot = '_',
sep = False,
dot = '_',
project = opts.header,
author = opts.author or 'Author',
version = opts.version or '',
Expand Down
8 changes: 4 additions & 4 deletions sphinx/application.py
Expand Up @@ -258,7 +258,7 @@ def _init_i18n(self):
for catinfo in find_catalog_source_files(
user_locale_dirs, self.config.language, domains=['sphinx'],
charset=self.config.source_encoding):
catinfo.write_mo(self.config.language)
catinfo.write_mo(self.config.language, self.warn)
locale_dirs = [None, path.join(package_dir, 'locale')] + user_locale_dirs
else:
locale_dirs = []
Expand Down Expand Up @@ -484,7 +484,7 @@ def status_iterator(self, iterable, summary, colorfunc=darkgreen, length=0,
summary = bold(summary)
for item in iterable:
l += 1
s = '%s[%3d%%] %s' % (summary, 100*l/length,
s = '%s[%3d%%] %s' % (summary, 100 * l / length,
colorfunc(stringify_func(item)))
if self.verbosity:
s += '\n'
Expand Down Expand Up @@ -660,9 +660,9 @@ def add_node(self, node, **kwds):
else:
# ignore invalid keys for compatibility
continue
setattr(translator, 'visit_'+node.__name__, visit)
setattr(translator, 'visit_' + node.__name__, visit)
if depart:
setattr(translator, 'depart_'+node.__name__, depart)
setattr(translator, 'depart_' + node.__name__, depart)

def add_enumerable_node(self, node, figtype, title_getter=None, **kwds):
self.enumerable_nodes[node] = (figtype, title_getter)
Expand Down
2 changes: 1 addition & 1 deletion sphinx/builders/__init__.py
Expand Up @@ -167,7 +167,7 @@ def cat2relpath(cat):
for catalog in self.app.status_iterator(
catalogs, 'writing output... ', darkgreen, len(catalogs),
cat2relpath):
catalog.write_mo(self.config.language)
catalog.write_mo(self.config.language, self.warn)

def compile_all_catalogs(self):
catalogs = i18n.find_catalog_source_files(
Expand Down
2 changes: 1 addition & 1 deletion sphinx/builders/changes.py
Expand Up @@ -130,7 +130,7 @@ def hl(no, line):
targetfn = path.join(self.outdir, 'rst', os_path(docname)) + '.html'
ensuredir(path.dirname(targetfn))
with codecs.open(targetfn, 'w', 'utf-8') as f:
text = ''.join(hl(i+1, line) for (i, line) in enumerate(lines))
text = ''.join(hl(i + 1, line) for (i, line) in enumerate(lines))
ctx = {
'filename': self.env.doc2path(docname, None),
'text': text
Expand Down
6 changes: 3 additions & 3 deletions sphinx/builders/html.py
Expand Up @@ -498,7 +498,7 @@ def gen_additional_pages(self):

# additional pages from conf.py
for pagename, template in self.config.html_additional_pages.items():
self.info(' '+pagename, nonl=1)
self.info(' ' + pagename, nonl=1)
self.handle_page(pagename, {}, template)

# the search page
Expand Down Expand Up @@ -953,7 +953,7 @@ def fix_refuris(self, tree):
hashindex = refuri.find('#')
if hashindex < 0:
continue
hashindex = refuri.find('#', hashindex+1)
hashindex = refuri.find('#', hashindex + 1)
if hashindex >= 0:
refnode['refuri'] = fname + refuri[hashindex:]

Expand Down Expand Up @@ -1059,7 +1059,7 @@ def finish(self):

# additional pages from conf.py
for pagename, template in self.config.html_additional_pages.items():
self.info(' '+pagename, nonl=1)
self.info(' ' + pagename, nonl=1)
self.handle_page(pagename, {}, template)

if self.config.html_use_opensearch:
Expand Down
10 changes: 5 additions & 5 deletions sphinx/builders/htmlhelp.py
Expand Up @@ -208,12 +208,12 @@ def write_doc(self, docname, doctree):

def build_hhx(self, outdir, outname):
self.info('dumping stopword list...')
with self.open_file(outdir, outname+'.stp') as f:
with self.open_file(outdir, outname + '.stp') as f:
for word in sorted(stopwords):
print(word, file=f)

self.info('writing project file...')
with self.open_file(outdir, outname+'.hhp') as f:
with self.open_file(outdir, outname + '.hhp') as f:
f.write(project_template % {
'outname': outname,
'title': self.config.html_title,
Expand All @@ -234,7 +234,7 @@ def build_hhx(self, outdir, outname):
file=f)

self.info('writing TOC file...')
with self.open_file(outdir, outname+'.hhc') as f:
with self.open_file(outdir, outname + '.hhc') as f:
f.write(contents_header)
# special books
f.write('<LI> ' + object_sitemap % (self.config.html_short_title,
Expand All @@ -259,7 +259,7 @@ def write_toc(node, ullevel=0):
if ullevel != 0:
f.write('<UL>\n')
for subnode in node:
write_toc(subnode, ullevel+1)
write_toc(subnode, ullevel + 1)
if ullevel != 0:
f.write('</UL>\n')
elif isinstance(node, addnodes.compact_paragraph):
Expand All @@ -275,7 +275,7 @@ def istoctree(node):

self.info('writing index file...')
index = self.env.create_index(self)
with self.open_file(outdir, outname+'.hhk') as f:
with self.open_file(outdir, outname + '.hhk') as f:
f.write('<UL>\n')

def write_index(title, refs, subitems):
Expand Down
6 changes: 3 additions & 3 deletions sphinx/builders/latex.py
Expand Up @@ -74,7 +74,7 @@ def init_document_data(self):
'document %s' % docname)
continue
self.document_data.append(entry)
if docname.endswith(SEP+'index'):
if docname.endswith(SEP + 'index'):
docname = docname[:-5]
self.titles.append((docname, entry[2]))

Expand Down Expand Up @@ -188,7 +188,7 @@ def finish(self):
if self.images:
self.info(bold('copying images...'), nonl=1)
for src, dest in iteritems(self.images):
self.info(' '+src, nonl=1)
self.info(' ' + src, nonl=1)
copy_asset_file(path.join(self.srcdir, src),
path.join(self.outdir, dest))
self.info()
Expand All @@ -206,7 +206,7 @@ def finish(self):
if self.config.latex_additional_files:
self.info(bold('copying additional files...'), nonl=1)
for filename in self.config.latex_additional_files:
self.info(' '+filename, nonl=1)
self.info(' ' + filename, nonl=1)
copy_asset_file(path.join(self.confdir, filename), self.outdir)
self.info()

Expand Down
4 changes: 2 additions & 2 deletions sphinx/builders/linkcheck.py
Expand Up @@ -225,7 +225,7 @@ def process_result(self, result):
self.info(darkgray('-local- ') + uri)
self.write_entry('local', docname, lineno, uri)
elif status == 'working':
self.info(darkgreen('ok ') + uri + info)
self.info(darkgreen('ok ') + uri + info)
elif status == 'broken':
self.write_entry('broken', docname, lineno, uri + ': ' + info)
if self.app.quiet or self.app.warningiserror:
Expand All @@ -243,7 +243,7 @@ def process_result(self, result):
}[code]
self.write_entry('redirected ' + text, docname, lineno,
uri + ' to ' + info)
self.info(color('redirect ') + uri + color(' - ' + text + ' to ' + info))
self.info(color('redirect ') + uri + color(' - ' + text + ' to ' + info))

def get_target_uri(self, docname, typ=None):
return ''
Expand Down
16 changes: 8 additions & 8 deletions sphinx/builders/qthelp.py
Expand Up @@ -89,7 +89,7 @@
'''

section_template = '<section title="%(title)s" ref="%(ref)s"/>'
file_template = ' '*12 + '<file>%(filename)s</file>'
file_template = ' ' * 12 + '<file>%(filename)s</file>'


class QtHelpBuilder(StandaloneHTMLBuilder):
Expand Down Expand Up @@ -190,7 +190,7 @@ def istoctree(node):
nspace = nspace.lower()

# write the project file
with codecs.open(path.join(outdir, outname+'.qhp'), 'w', 'utf-8') as f:
with codecs.open(path.join(outdir, outname + '.qhp'), 'w', 'utf-8') as f:
f.write(project_template % {
'outname': htmlescape(outname),
'title': htmlescape(self.config.html_title),
Expand All @@ -207,7 +207,7 @@ def istoctree(node):
startpage = 'qthelp://' + posixpath.join(nspace, 'doc', 'index.html')

self.info('writing collection project file...')
with codecs.open(path.join(outdir, outname+'.qhcp'), 'w', 'utf-8') as f:
with codecs.open(path.join(outdir, outname + '.qhcp'), 'w', 'utf-8') as f:
f.write(collection_template % {
'outname': htmlescape(outname),
'title': htmlescape(self.config.html_short_title),
Expand Down Expand Up @@ -236,10 +236,10 @@ def write_toc(self, node, indentlevel=4):
title = htmlescape(refnode.astext()).replace('"', '&quot;')
item = '<section title="%(title)s" ref="%(ref)s">' % \
{'title': title, 'ref': link}
parts.append(' '*4*indentlevel + item)
parts.append(' ' * 4 * indentlevel + item)
for subnode in node.children[1]:
parts.extend(self.write_toc(subnode, indentlevel+1))
parts.append(' '*4*indentlevel + '</section>')
parts.extend(self.write_toc(subnode, indentlevel + 1))
parts.append(' ' * 4 * indentlevel + '</section>')
elif isinstance(node, nodes.list_item):
for subnode in node:
parts.extend(self.write_toc(subnode, indentlevel))
Expand Down Expand Up @@ -272,10 +272,10 @@ def keyword_item(self, name, ref):
id = None

if id:
item = ' '*12 + '<keyword name="%s" id="%s" ref="%s"/>' % (
item = ' ' * 12 + '<keyword name="%s" id="%s" ref="%s"/>' % (
name, id, ref[1])
else:
item = ' '*12 + '<keyword name="%s" ref="%s"/>' % (name, ref[1])
item = ' ' * 12 + '<keyword name="%s" ref="%s"/>' % (name, ref[1])
item.encode('ascii', 'xmlcharrefreplace')
return item

Expand Down
4 changes: 2 additions & 2 deletions sphinx/builders/texinfo.py
Expand Up @@ -122,7 +122,7 @@ def init_document_data(self):
'document %s' % docname)
continue
self.document_data.append(entry)
if docname.endswith(SEP+'index'):
if docname.endswith(SEP + 'index'):
docname = docname[:-5]
self.titles.append((docname, entry[2]))

Expand Down Expand Up @@ -210,7 +210,7 @@ def finish(self):
if self.images:
self.info(bold('copying images...'), nonl=1)
for src, dest in iteritems(self.images):
self.info(' '+src, nonl=1)
self.info(' ' + src, nonl=1)
copyfile(path.join(self.srcdir, src),
path.join(self.outdir, dest))
self.info()
Expand Down
2 changes: 1 addition & 1 deletion sphinx/builders/websupport.py
Expand Up @@ -141,7 +141,7 @@ def handle_page(self, pagename, addctx, templatename='page.html',
# "show source" link
if ctx.get('sourcename'):
source_name = path.join(self.staticdir,
'_sources', os_path(ctx['sourcename']))
'_sources', os_path(ctx['sourcename']))
ensuredir(path.dirname(source_name))
copyfile(self.env.doc2path(pagename), source_name)

Expand Down

0 comments on commit c03da8f

Please sign in to comment.