Fix warning in CHANGES

This commit is contained in:
Takeshi KOMIYA 2016-06-25 10:31:30 +09:00
commit 7a81169e4c
8 changed files with 40 additions and 19 deletions

16
CHANGES
View File

@ -64,18 +64,18 @@ Incompatible changes
* latex, inclusion of non-inline images from image directive resulted in * latex, inclusion of non-inline images from image directive resulted in
non-coherent whitespaces depending on original image width; new behaviour non-coherent whitespaces depending on original image width; new behaviour
by necessity from earlier one in some cases. (ref: #2672) by necessity differs from earlier one in some cases. (ref: #2672)
* latex, use of ``\includegraphics`` to refer to Sphinx custom variant is * latex, use of ``\includegraphics`` to refer to Sphinx custom variant is
deprecated; in future it will revert to original LaTeX macro, custom one has deprecated; in future it will revert to original LaTeX macro, custom one
already alternative name ``\sphinxincludegraphics``. already has alternative name ``\sphinxincludegraphics``.
Features added Features added
-------------- --------------
* new config option ``latex_keep_old_macro_names``, defaults to True. If False, * new config option ``latex_keep_old_macro_names``, defaults to True. If False,
let macros (for text styling) be defined only with ``\sphinx``-prefixed names. lets macros (for text styling) be defined only with ``\sphinx``-prefixed names.
* latex writer allows user customization of "shadowed" boxes (topics), via * latex writer allows user customization of "shadowed" boxes (topics), via
three length variables three length variables.
Bugs fixed Bugs fixed
---------- ----------
@ -85,6 +85,10 @@ Bugs fixed
* #2684: `sphinx.ext.intersphinx` crashes with six-1.4.1 * #2684: `sphinx.ext.intersphinx` crashes with six-1.4.1
* #2679: ``float`` package needed for ``'figure_align': 'H'`` latex option * #2679: ``float`` package needed for ``'figure_align': 'H'`` latex option
* #2671: image directive may lead to inconsistent spacing in pdf * #2671: image directive may lead to inconsistent spacing in pdf
* #2705: ``toctree`` generates empty bullet_list if ``:titlesonly:`` specified
* #2479: `sphinx.ext.viewcode` uses python2 highlighter by default
* #2700: HtmlHelp builder has hard coded index.html
* latex, since 1.4.4 inline literal text is followed by spurious space
Release 1.4.4 (released Jun 12, 2016) Release 1.4.4 (released Jun 12, 2016)
@ -111,6 +115,8 @@ Bugs fixed
* Failed to build PDF with framed.sty 0.95 * Failed to build PDF with framed.sty 0.95
* Sphinx now bundles needspace.sty * Sphinx now bundles needspace.sty
* #2666: C++, properly look up nested names involving constructors. * #2666: C++, properly look up nested names involving constructors.
* #2579: Could not refer a label including both spaces and colons via
`sphinx.ext.intersphinx`
Release 1.4.3 (released Jun 5, 2016) Release 1.4.3 (released Jun 5, 2016)

View File

@ -63,7 +63,7 @@ Binary Index=No
Compiled file=%(outname)s.chm Compiled file=%(outname)s.chm
Contents file=%(outname)s.hhc Contents file=%(outname)s.hhc
Default Window=%(outname)s Default Window=%(outname)s
Default topic=index.html Default topic=%(master_doc)s
Display compile progress=No Display compile progress=No
Full text search stop list file=%(outname)s.stp Full text search stop list file=%(outname)s.stp
Full-text search=Yes Full-text search=Yes
@ -73,7 +73,7 @@ Title=%(title)s
[WINDOWS] [WINDOWS]
%(outname)s="%(title)s","%(outname)s.hhc","%(outname)s.hhk",\ %(outname)s="%(title)s","%(outname)s.hhc","%(outname)s.hhk",\
"index.html","index.html",,,,,0x63520,220,0x10384e,[0,0,1024,768],,,,,,,0 "%(master_doc)s","%(master_doc)s",,,,,0x63520,220,0x10384e,[0,0,1024,768],,,,,,,0
[FILES] [FILES]
''' '''
@ -204,11 +204,14 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
self.info('writing project file...') 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, f.write(project_template % {
'title': self.config.html_title, 'outname': outname,
'version': self.config.version, 'title': self.config.html_title,
'project': self.config.project, 'version': self.config.version,
'lcid': self.lcid}) 'project': self.config.project,
'lcid': self.lcid,
'master_doc': self.config.master_doc + self.out_suffix
})
if not outdir.endswith(os.sep): if not outdir.endswith(os.sep):
outdir += os.sep outdir += os.sep
olen = len(outdir) olen = len(outdir)
@ -225,7 +228,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
f.write(contents_header) f.write(contents_header)
# special books # special books
f.write('<LI> ' + object_sitemap % (self.config.html_short_title, f.write('<LI> ' + object_sitemap % (self.config.html_short_title,
'index.html')) self.config.master_doc + self.out_suffix))
for indexname, indexcls, content, collapse in self.domain_indices: for indexname, indexcls, content, collapse in self.domain_indices:
f.write('<LI> ' + object_sitemap % (indexcls.localname, f.write('<LI> ' + object_sitemap % (indexcls.localname,
'%s.html' % indexname)) '%s.html' % indexname))

View File

@ -279,6 +279,9 @@ class CDomain(Domain):
typ, target, node, contnode): typ, target, node, contnode):
# strip pointer asterisk # strip pointer asterisk
target = target.rstrip(' *') target = target.rstrip(' *')
# becase TypedField can generate xrefs
if target in CObject.stopwords:
return contnode
if target not in self.data['objects']: if target not in self.data['objects']:
return None return None
obj = self.data['objects'][target] obj = self.data['objects'][target]

View File

@ -1438,7 +1438,10 @@ class BuildEnvironment:
# nodes with length 1 don't have any children anyway # nodes with length 1 don't have any children anyway
if len(toplevel) > 1: if len(toplevel) > 1:
subtrees = toplevel.traverse(addnodes.toctree) subtrees = toplevel.traverse(addnodes.toctree)
toplevel[1][:] = subtrees if subtrees:
toplevel[1][:] = subtrees
else:
toplevel.pop(1)
# resolve all sub-toctrees # resolve all sub-toctrees
for subtocnode in toc.traverse(addnodes.toctree): for subtocnode in toc.traverse(addnodes.toctree):
if not (subtocnode.get('hidden', False) and if not (subtocnode.get('hidden', False) and
@ -1484,6 +1487,9 @@ class BuildEnvironment:
_toctree_add_classes(newnode, 1) _toctree_add_classes(newnode, 1)
self._toctree_prune(newnode, 1, prune and maxdepth or 0, collapse) self._toctree_prune(newnode, 1, prune and maxdepth or 0, collapse)
if len(newnode[-1]) == 0: # No titles found
return None
# set the target paths in the toctrees (they are not known at TOC # set the target paths in the toctrees (they are not known at TOC
# generation time) # generation time)
for refnode in newnode.traverse(nodes.reference): for refnode in newnode.traverse(nodes.reference):

View File

@ -106,7 +106,7 @@ def read_inventory_v2(f, uri, join, bufsize=16*1024):
for line in split_lines(read_chunks()): for line in split_lines(read_chunks()):
# be careful to handle names with embedded spaces correctly # be careful to handle names with embedded spaces correctly
m = re.match(r'(?x)(.+?)\s+(\S*:\S*)\s+(\S+)\s+(\S+)\s+(.*)', m = re.match(r'(?x)(.+?)\s+(\S*:\S*)\s+(-?\d+)\s+(\S+)\s+(.*)',
line.rstrip()) line.rstrip())
if not m: if not m:
continue continue

View File

@ -139,8 +139,8 @@ def collect_pages(app):
# construct a page name for the highlighted source # construct a page name for the highlighted source
pagename = '_modules/' + modname.replace('.', '/') pagename = '_modules/' + modname.replace('.', '/')
# highlight the source using the builder's highlighter # highlight the source using the builder's highlighter
if env.config.highlight_language == 'python3': if env.config.highlight_language in ('python3', 'default'):
lexer = 'python3' lexer = env.config.highlight_language
else: else:
lexer = 'python' lexer = 'python'
highlighted = highlighter.highlight_block(code, lexer, linenos=False) highlighted = highlighter.highlight_block(code, lexer, linenos=False)

View File

@ -162,7 +162,7 @@
% let \sphinxcode and \sphinxbfcode use straight quotes. \@noligs patched by upquote, % let \sphinxcode and \sphinxbfcode use straight quotes. \@noligs patched by upquote,
% but needs protection in "moving arguments" such as for captions. % but needs protection in "moving arguments" such as for captions.
% Use \scantokens to handle e.g. \item[{\sphinxcode{'fontenc'}}] % Use \scantokens to handle e.g. \item[{\sphinxcode{'fontenc'}}]
\DeclareRobustCommand{\sphinxcode}[1]{{\@noligs\scantokens{\texttt{#1}}}} \DeclareRobustCommand{\sphinxcode}[1]{{\@noligs\scantokens{\texttt{#1}\relax}}}
\newcommand{\sphinxbfcode}[1]{\sphinxcode{\bfseries#1}} \newcommand{\sphinxbfcode}[1]{\sphinxcode{\bfseries#1}}
\newcommand{\sphinxemail}[1]{\textsf{#1}} \newcommand{\sphinxemail}[1]{\textsf{#1}}
\newcommand{\sphinxtablecontinued}[1]{\textsf{#1}} \newcommand{\sphinxtablecontinued}[1]{\textsf{#1}}
@ -1005,7 +1005,7 @@
} }
% robustified case needs special treatment % robustified case needs special treatment
\newcommand\code{}\let\code\relax \newcommand\code{}\let\code\relax
\DeclareRobustCommand{\code}[1]{{\@noligs\scantokens{\texttt{#1}}}} \DeclareRobustCommand{\code}[1]{{\@noligs\scantokens{\texttt{#1}\relax}}}
\def\sphinxcode{\code}% \def\sphinxcode{\code}%
\fi \fi

View File

@ -43,6 +43,7 @@ module2 py:module 0 foo.html#module-$ -
module1.func py:function 1 sub/foo.html#$ - module1.func py:function 1 sub/foo.html#$ -
CFunc c:function 2 cfunc.html#CFunc - CFunc c:function 2 cfunc.html#CFunc -
a term std:term -1 glossary.html#term-a-term - a term std:term -1 glossary.html#term-a-term -
a term including:colon std:term -1 glossary.html#term-a-term-including-colon -
'''.encode('utf-8')) '''.encode('utf-8'))
@ -78,6 +79,8 @@ def test_read_inventory_v2():
assert invdata1['c:function']['CFunc'][2] == '/util/cfunc.html#CFunc' assert invdata1['c:function']['CFunc'][2] == '/util/cfunc.html#CFunc'
assert invdata1['std:term']['a term'][2] == \ assert invdata1['std:term']['a term'][2] == \
'/util/glossary.html#term-a-term' '/util/glossary.html#term-a-term'
assert invdata1['std:term']['a term including:colon'][2] == \
'/util/glossary.html#term-a-term-including-colon'
@with_app() @with_app()