Sphinx 1.2¶
Release 1.2.3 (released Sep 1, 2014)¶
新增特性¶
#1518:
sphinx-apidoccommand now has a--versionoption to show version information and exitNew locales: Hebrew, European Portuguese, Vietnamese.
Bug 修复¶
#636: Keep straight single quotes in literal blocks in the LaTeX build.
#1419: Generated i18n sphinx.js files are missing message catalog entries from '.js_t' and '.html'. The issue was introduced from Sphinx 1.1
#1363: Fix i18n: missing python domain's cross-references with currentmodule directive or currentclass directive.
#1444: autosummary does not create the description from attributes docstring.
#1457: In python3 environment, make linkcheck cause "Can't convert 'bytes' object to str implicitly" error when link target url has a hash part. Thanks to Jorge_C.
#1467: Exception on Python3 if nonexistent method is specified by automethod
#1441: autosummary can't handle nested classes correctly.
#1499: With non-callable
setupin a conf.py, now sphinx-build emits a user-friendly error message.#1502: In autodoc, fix display of parameter defaults containing backslashes.
#1226: autodoc, autosummary: importing setup.py by automodule will invoke setup process and execute
sys.exit(). Now Sphinx avoids SystemExit exception and emits warnings without unexpected termination.#1503: py:function directive generate incorrectly signature when specifying a default parameter with an empty list
[]. Thanks to Geert Jansen.#1508: Non-ASCII filename raise exception on make singlehtml, latex, man, texinfo and changes.
#1531: On Python3 environment, docutils.conf with 'source_link=true' in the general section cause type error.
PR#270, #1533: Non-ASCII docstring cause UnicodeDecodeError when uses with inheritance-diagram directive. Thanks to WAKAYAMA shirou.
PR#281, PR#282, #1509: TODO extension not compatible with websupport. Thanks to Takeshi Komiya.
#1477: gettext does not extract nodes.line in a table or list.
#1544:
make textgenerates wrong table when it has empty table cells.#1522: Footnotes from table get displayed twice in LaTeX. This problem has been appeared from Sphinx 1.2.1 by #949.
#508: Sphinx every time exit with zero when is invoked from setup.py command. ex.
python setup.py build_sphinx -b doctestreturn zero even if doctest failed.
版本1.2.2(2014年3月2日发布)¶
Bug 修复¶
PR#211: When checking for existence of the
html_logofile, check the full relative path and not the basename.PR#212: Fix traceback with autodoc and
__init__methods without docstring.PR#213: Fix a missing import in the setup command.
#1357: Option names documented by
optionare now again allowed to not start with a dash or slash, and referencing them will work correctly.#1358: Fix handling of image paths outside of the source directory when using the "wildcard" style reference.
#1374: Fix for autosummary generating overly-long summaries if first line doesn't end with a period.
#1383: Fix Python 2.5 compatibility of sphinx-apidoc.
#1391: Actually prevent using "pngmath" and "mathjax" extensions at the same time in sphinx-quickstart.
#1386: Fix bug preventing more than one theme being added by the entry point mechanism.
#1370: Ignore "toctree" nodes in text writer, instead of raising.
#1364: Fix 'make gettext' fails when the '.. todolist::' directive is present.
#1367: Fix a change of PR#96 that break sphinx.util.docfields.Field.make_field interface/behavior for
itemargument usage.
文档¶
Extended the documentation about building extensions.
1.2.1版(2014年1月19日发布)¶
Bug 修复¶
#1335:修复带有感叹号前缀的自动摘要模板重载,如“{% extends "!autosummary/class.rst" %}” 导致无限递归函数调用。这是由PR 181引起的。
#1337:修复带有“autoclass”的autodoc“content=”both“`”的 autodoc 使用无用的
object.__init__。当类没有__init__时,docstring。这是由1138年的变化引起的。#1340:无法在使用language='ja' 生成的 HTML 快速搜索中搜索字母顺序的单词。
#1319: Do not crash if the
html_logofile does not exist.#603:不要使用HTML化的标题来构建搜索索引(这会导致在标题中包含文本的每个页面上都会找到“literal”)。
#751:使用 longtable 允许生产列表比LaTeX 中的页面长。
#764:总是在JS搜索中查找小写的停止字。
#814:autodoc:防止没有“__bases__”的奇怪类型对象。
#932: autodoc: 如果
__doc__不是字符串,则不崩溃。#933:以下情况不会崩溃:
option值的格式不正确(包含空格,但没有选项名称)。#908:在 Python 3上,在pngmath扩展中正确处理来自LaTeX的错误消息。
#943:在 autosummary 中,识别要从 docstring 中提取的“第一个句子”(如果它们包含大写字母)。
#923:缓存pngmath生成的图像时,要考虑整个LaTeX文档。当“pngmath_latex_preamble”更改时,这将正确地重建它们。
#901: Emit a warning when using Docutils' new "math" markup without a Sphinx math extension active.
#845:在代码块中,当选定的lexer失败时,仍然显示行号(如果配置)。
#929:正确支持LaTeX输出中解析的文本块。
#949:更新表格.sty塞满了 Sphinx。
#1050:将匿名标签添加到
对象.inv参考方式intersphinx。#修复打印媒体样式表总是包含在“滚动”主题中。
#1085: Fix current classname not getting set if class description has
:noindex:set.#1181: Report option errors in autodoc directives more gracefully.
#1155: Fix autodocumenting C-defined methods as attributes in Python 3.
#1233: Allow finding both Python classes and exceptions with the "class" and "exc" roles in intersphinx.
#1198: Allow "image" for the "figwidth" option of the figure directive as documented by docutils.
#1152: Fix pycode parsing errors of Python 3 code by including two grammar versions for Python 2 and 3, and loading the appropriate version for the running Python version.
#1017: Be helpful and tell the user when the argument to
optiondoes not match the required format.#1345: Fix two bugs with
nitpick_ignore; now you don't have to remove the store environment for changes to have effect.#1072: In the JS search, fix issues searching for upper-cased words by lowercasing words before stemming.
#1299: Make behavior of the
mathdirective more consistent and avoid producing empty environments in LaTeX output.#1308: Strip HTML tags from the content of "raw" nodes before feeding it to the search indexer.
#1249: Fix duplicate LaTeX page numbering for manual documents.
#1292: In the linkchecker, retry HEAD requests when denied by HTTP 405. Also make the redirect code apparent and tweak the output a bit to be more obvious.
#1285: Avoid name clashes between C domain objects and section titles.
#848: Always take the newest code in incremental rebuilds with the
sphinx.ext.viewcodeextension.#979, #1266: Fix exclude handling in
sphinx-apidoc.#1302: Fix regression in
sphinx.ext.inheritance_diagramwhen documenting classes that can't be pickled.#1316: Remove hard-coded
font-faceresources from epub theme.#1329: Fix traceback with empty translation msgstr in .po files.
#1300: Fix references not working in translated documents in some instances.
#1283: Fix a bug in the detection of changed files that would try to access doctrees of deleted documents.
#1330: Fix
exclude_patternsbehavior with subdirectories in thehtml_static_path.#1323: Fix emitting empty
<ul>tags in the HTML writer, which is not valid HTML.#1147: Don't emit a sidebar search box in the "singlehtml" builder.
文档¶
#1325: Added a "Intersphinx" tutorial section. (
doc/tutorial.rst)
1.2版(2013年12月10日发布)¶
新增特性¶
Added
sphinx.version_infotuple for programmatic checking of the Sphinx version.
不兼容的变更¶
Removed the
sphinx.ext.refcountingextension -- it is very specific to CPython and has no place in the main distribution.
Bug 修复¶
Restore
versionmodifiedCSS class for versionadded/changed and deprecated directives.PR#181: Fix
html_theme_path = ['.']is a trigger of rebuild all documents always (This change keeps the current "theme changes cause a rebuild" feature).#1296: Fix invalid charset in HTML help generated HTML files for default locale.
PR#190: Fix gettext does not extract figure caption and rubric title inside other blocks. Thanks to Michael Schlenker.
PR#176: Make sure setup_command test can always import Sphinx. Thanks to Dmitry Shachnev.
#1311: Fix test_linkcode.test_html fails with C locale and Python 3.
#1269: Fix ResourceWarnings with Python 3.2 or later.
#1138: Fix: When
autodoc_docstring_signature = Trueandautoclass_content = 'init'or'both', __init__ line should be removed from class documentation.
1.2版beta3(2013年10月3日发布)¶
新增特性¶
The Sphinx error log files will now include a list of the loaded extensions for help in debugging.
不兼容的变更¶
PR#154: Remove "sphinx" prefix from LaTeX class name except 'sphinxmanual' and 'sphinxhowto'. Now you can use your custom document class without 'sphinx' prefix. Thanks to Erik B.
Bug 修复¶
#1265: Fix i18n: crash when translating a section name that is pointed to from a named target.
A wrong condition broke the search feature on first page that is usually index.rst. This issue was introduced in 1.2b1.
#703: When Sphinx can't decode filenames with non-ASCII characters, Sphinx now catches UnicodeError and will continue if possible instead of raising the exception.
版本1.2 beta2(2013年9月17日发布)¶
新增特性¶
apidoc现在默认忽略“_private”模块,并有一个选项“-P”来包含它们。apidoc现在可以选择不为包和模块生成标题,因为模块docstring已经包含了reST标题。PR#161:
apidoc现在可以将每个模块写入一个独立的页面,而不是将所有模块组合在一个页面上。生成器:在目录更新时重新生成 i18n 目标文档。
Support docutils.conf 'writers' and 'html4css1 writer' section in the HTML writer. The latex, manpage and texinfo writers also support their respective 'writers' sections.
The new
html_extra_pathconfig value allows to specify directories with files that should be copied directly to the HTML output directory.Autodoc directives for module data and attributes now support an
annotationoption, so that the default display of the data/attribute value can be overridden.PR#136: Autodoc directives now support an
imported-membersoption to include members imported from different modules.New locales: Macedonian, Sinhala, Indonesian.
Theme package collection by using setuptools plugin mechanism.
不兼容的变更¶
PR#144, #1182: Force timezone offset to LocalTimeZone on POT-Creation-Date that was generated by gettext builder. Thanks to masklinn and Jakub Wilk.
Bug 修复¶
PR#132:将 jQuery 版本更新为1.8.3。
PR#141, #982: Avoid crash when writing PNG file using Python 3. Thanks to Marcin Wojdyr.
PR#145: In parallel builds, Sphinx drops second document file to write. Thanks to tychoish.
PR#151: Some styling updates to tables in LaTeX.
PR#153: The "extensions" config value can now be overridden.
PR#155: Added support for some C++11 function qualifiers.
Fix: 'make gettext' caused UnicodeDecodeError when templates contain utf-8 encoded strings.
#828: use inspect.getfullargspec() to be able to document functions with keyword-only arguments on Python 3.
#1090: Fix i18n: multiple cross references (term, ref, doc) in the same line return the same link.
#1157: Combination of 'globaltoc.html' and hidden toctree caused exception.
#1159: fix wrong generation of objects inventory for Python modules, and add a workaround in intersphinx to fix handling of affected inventories.
#1160: Citation target missing caused an AssertionError.
#1162, PR#139: singlehtml builder didn't copy images to _images/.
#1173: Adjust setup.py dependencies because Jinja2 2.7 discontinued compatibility with Python < 3.3 and Python < 2.6. Thanks to Alexander Dupuy.
#1185: Don't crash when a Python module has a wrong or no encoding declared, and non-ASCII characters are included.
#1188: sphinx-quickstart raises UnicodeEncodeError if "Project version" includes non-ASCII characters.
#1189: "Title underline is too short" WARNING is given when using fullwidth characters to "Project name" on quickstart.
#1190: Output TeX/texinfo/man filename has no basename (only extension) when using non-ASCII characters in the "Project name" on quickstart.
#1192: Fix escaping problem for hyperlinks in the manpage writer.
#1193: Fix i18n: multiple link references in the same line return the same link.
#1176: Fix i18n: footnote reference number missing for auto numbered named footnote and auto symbol footnote.
PR#146,#1172: Fix ZeroDivisionError in parallel builds. Thanks to tychoish.
#1204: Fix wrong generation of links to local intersphinx targets.
#1206: Fix i18n: gettext did not translate admonition directive's title.
#1232: Sphinx generated broken ePub files on Windows.
#1259: Guard the debug output call when emitting events; to prevent the repr() implementation of arbitrary objects causing build failures.
#1142: Fix NFC/NFD normalizing problem of rst filename on Mac OS X.
#1234:略仅由空白字符组成的字符串。
版本1.2 beta1(2013年3月31日发布)¶
不兼容的变更¶
已删除
sphinx.util.util.compat.directive_dwim()和sphinx.roles.xfileref_role(),自1.0版起已弃用。PR#122: the files given in
latex_additional_filesnow override TeX files included by Sphinx, such assphinx.sty.PR#124: the node generated by
versionadded,versionchangedanddeprecateddirectives now includes all added markup (such as "New in version X") as child nodes, and no additional text must be generated by writers.PR#99:
seealso指令现在生成警告节点,而不是自定义的seealso节点。
新增特性¶
Markup
The
toctreedirective and thetoctree()template function now have anincludehiddenoption that includes hidden toctree entries (bugs #790 and #1047). A bug in themaxdepthoption for thetoctree()template function has been fixed (bug #1046).PR#99:删除请参阅正常警告指示。这将删除它们不寻常的CSS类(adminion seal),不一致的LaTeX警告标题(“请参见”而不是“另请参阅”)以及文本生成器中虚假的缩进。
HTML 生成器
#783:创建一个链接到全尺寸图像,如果它是按宽度或高度缩放的。
#1067:改进JavaScript搜索结果的排序:标题中的匹配项在全文中的匹配项之前,并且对象结果可以更好地分类。同时实现一个可插入的搜索记分器。
#1053:“rightsidebar”和“collapsablesidebar”HTML 主题选项现在可以一起使用。
更新到jQuery 1.7.1和下划线.js1.3.1条。
Texinfo 生成器
当没有条目时,不再添加“Index”节点。
“deffn” 类别如果包含大写字母,则不再大写。
desc_annotationnodes are now rendered.strongandemphasisnodes are now formatted likeliterals. The reason for this is because the standard Texinfo markup (*strong*and_emphasis_) resulted in confusing output due to the common usage of using these constructs for documenting parameter names.Field lists formatting has been tweaked to better display "Info field lists".
system_messageandproblematicnodes are now formatted in a similar fashion as done by the text builder."en-dash" and "em-dash" conversion of hyphens is no longer performed in option directive signatures.
@refis now used instead of@pxreffor cross-references which prevents the word "see" from being added before the link (does not affect the Info output).The
@finaloutcommand has been added for better TeX output.transitionnodes are now formatted using underscores ("_") instead of asterisks ("*").The default value for the
paragraphindenthas been changed from 2 to 0 meaning that paragraphs are no longer indented by default.#1110: A new configuration value
texinfo_no_detailmenuhas been added for controlling whether a@detailmenuis added in the "Top" node's menu.除“Top”节点外,不再创建详细菜单。
除“Top”节点外,不再创建详细菜单。
LaTeX 生成器:
PR#115: Add
'transition'item inlatex_elementsfor customizing how transitions are displayed. Thanks to Jeff Klukas.PR#114: The LaTeX writer now includes the "cmap" package by default. The
'cmappkg'item inlatex_elementscan be used to control this. Thanks to Dmitry Shachnev.The
'fontpkg'item inlatex_elementsnow defaults to''when thelanguageuses the Cyrillic script. Suggested by Dmitry Shachnev.The
latex_documents,texinfo_documents, andman_pagesconfiguration values will be set to default values based on themaster_docif not explicitly set inconf.py. Previously, if these values were not set, no output would be generated by their respective builders.
Internationalization:
Add i18n capabilities for custom templates. For example: The Sphinx reference documentation in doc directory provides a
sphinx.potfile with message strings fromdoc/_templates/*.htmlwhen usingmake gettext.PR#61,#703: Add support for non-ASCII filename handling.
Other builders:
Added the Docutils-native XML and pseudo-XML builders. See
XMLBuilderandPseudoXMLBuilder.PR#45: The linkcheck builder now checks
#anchors for existence.PR#123, #1106: Add
epub_use_indexconfiguration value. If provided, it will be used instead ofhtml_use_indexfor epub builder.PR#126: Add
epub_tocscopeconfiguration value. The setting controls the generation of the epub toc. The user can now also include hidden toc entries.PR#112: Add
epub_show_urlsconfiguration value.
Extensions:
PR#52:
special_membersflag to autodoc now behaves likemembers.PR#47: Added
sphinx.ext.linkcodeextension.PR#25: In inheritance diagrams, the first line of the class docstring is now the tooltip for the class.
Command-line interfaces:
PR#75: Added
--follow-linksoption to sphinx-apidoc.#869: sphinx-build now has the option
-Tfor printing the full traceback after an unhandled exception.sphinx-build now supports the standard
--helpand--versionoptions.sphinx-build now provides more specific error messages when called with invalid options or arguments.
sphinx-build now has a verbose option
-vwhich can be repeated for greater effect. A single occurrence provides a slightly more verbose output than normal. Two or more occurrences of this option provides more detailed output which may be useful for debugging.
Locales:
PR#74: Fix some Russian translation.
PR#54: Added Norwegian bokmaal translation.
PR#35: Added Slovak translation.
PR#28: Added Hungarian translation.
#1113: Add Hebrew locale.
#1097: Add Basque locale.
#1037: Fix typos in Polish translation. Thanks to Jakub Wilk.
#1012: Update Estonian translation.
Optimizations:
Speed up building the search index by caching the results of the word stemming routines. Saves about 20 seconds when building the Python documentation.
PR#108: Add experimental support for parallel building with a new
sphinx-build -joption.
文档¶
PR#88: Added the "Sphinx Developer's Guide" (
doc/devguide.rst) which outlines the basic development process of the Sphinx project.Added a detailed "Installing Sphinx" document (
doc/install.rst).
Bug 修复¶
PR#124: Fix paragraphs in versionmodified are ignored when it has no dangling paragraphs. Fix wrong html output (nested
<p>tag). Fix versionmodified is not translatable. Thanks to Nozomu Kaneko.PR#111: Respect add_autodoc_attrgetter() even when inherited-members is set. Thanks to A. Jesse Jiryu Davis.
PR#97: Fix footnote handling in translated documents.
Fix text writer not handling visit_legend for figure directive contents.
Fix text builder not respecting wide/fullwidth characters: title underline width, table layout width and text wrap width.
Fix leading space in LaTeX table header cells.
#1132: Fix LaTeX table output for multi-row cells in the first column.
#1128: Fix Unicode errors when trying to format time strings with a non-standard locale.
#1127: Fix traceback when autodoc tries to tokenize a non-Python file.
#1126: Fix double-hyphen to en-dash conversion in wrong places such as command-line option names in LaTeX.
#1123: Allow whitespaces in filenames given to
literalinclude.#1120: Added improvements about i18n for themes "basic", "haiku" and "scrolls" that Sphinx built-in. Thanks to Leonardo J. Caballero G.
#1118: Updated Spanish translation. Thanks to Leonardo J. Caballero G.
#1117: Handle .pyx files in sphinx-apidoc.
#1112: Avoid duplicate download files when referenced from documents in different ways (absolute/relative).
#1111: Fix failure to find uppercase words in search when
html_search_languageis 'ja'. Thanks to Tomo Saito.#1108: The text writer now correctly numbers enumerated lists with non-default start values (based on patch by Ewan Edwards).
#1102: Support multi-context "with" statements in autodoc.
#1090: Fix gettext not extracting glossary terms.
#1074: Add environment version info to the generated search index to avoid compatibility issues with old builds.
#1070: Avoid un-pickling issues when running Python 3 and the saved environment was created under Python 2.
#1069: Fixed error caused when autodoc would try to format signatures of "partial" functions without keyword arguments (patch by Artur Gaspar).
#1062: sphinx.ext.autodoc use __init__ method signature for class signature.
#1055: Fix web support with relative path to source directory.
#1043: Fix sphinx-quickstart asking again for yes/no questions because
input()returns values with an extra 'r' on Python 3.2.0 + Windows. Thanks to Régis Décamps.#1041: Fix failure of the cpp domain parser to parse a const type with a modifier.
#1038: Fix failure of the cpp domain parser to parse C+11 "static constexpr" declarations. Thanks to Jakub Wilk.
#1029: Fix intersphinx_mapping values not being stable if the mapping has plural key/value set with Python 3.3.
#1028: Fix line block output in the text builder.
#1024: Improve Makefile/make.bat error message if Sphinx is not found. Thanks to Anatoly Techtonik.
#1018: Fix "container" directive handling in the text builder.
#1015: Stop overriding jQuery contains() in the JavaScript.
#1010: Make pngmath images transparent by default; IE7+ should handle it.
#1008: Fix test failures with Python 3.3.
#995: Fix table-of-contents and page numbering for the LaTeX "howto" class.
#976: Fix gettext does not extract index entries.
PR#72: #975: Fix gettext not extracting definition terms before Docutils 0.10.
#961: Fix LaTeX output for triple quotes in code snippets.
#958: Do not preserve
environment.pickleafter a failed build.#955: Fix i18n transformation.
#940: Fix gettext does not extract figure caption.
#920: Fix PIL packaging issue that allowed to import
Imagewithout PIL namespace. Thanks to Marc Schlaich.#723: Fix the search function on local files in WebKit based browsers.
#440: Fix coarse timestamp resolution in some filesystem generating a wrong list of outdated files.