Sphinx 2.1¶
版本 2.1.2(2019年6月19日发布)¶
Bug 修复¶
#6497:当语法错误时,自定义词法分析器无法突出显示
#6478,#6488:信息字段列表识别错误
版本2.1.1(2019年6月10日发布)¶
不兼容的变更¶
#6447:autodoc:停止为未记录的模块变量生成文档
Bug 修复¶
#6442:LaTeX:警告
note类型可以通过pagebreak与紧靠前面的节标题分隔开#6448:autodoc:当 autodocumenting 与
__slots__ = None归为同类时崩溃#6451:autodoc:为"optional import"模块生成文档作为变量
#6452:autosummary:生成属性文档时崩溃
#6455:napoleon:属性的文档字符串未处理
#6436:napoleon:如果变量名称以下划线结尾,则“未知目标名称”错误
#6440:apidoc:模块之间缺少空行
版本2.1.0(发布于2019年6月2日)¶
不兼容的变更¶
忽略没有直接给
Builder.build_specific()API 扩展名的文件名#6230:如果词汇表指令中的术语锚由非 ASCII 字符组成,则会更改
#4550:html:默认情况下使用 CSS 居中表格
#6239:Latex:xelatex 和 xeCJK 默认用于中文文档
Sphinx.add_lexer()now takes a Lexer class instead of instance. An instance of lexers are still supported until Sphinx 3.x.
已弃用¶
sphinx.builders.latex.LaTeXBuilder.apply_transforms()sphinx.builders._epub_base.EpubBuilder.esc()sphinx.directives.Ackssphinx.directives.Authorsphinx.directives.Centeredsphinx.directives.Classsphinx.directives.CodeBlocksphinx.directives.Figuresphinx.directives.HListsphinx.directives.Highlightsphinx.directives.Includesphinx.directives.Indexsphinx.directives.LiteralIncludesphinx.directives.Metasphinx.directives.Onlysphinx.directives.SeeAlsosphinx.directives.TabularColumnssphinx.directives.TocTreesphinx.directives.VersionChangesphinx.domains.python.PyClassmembersphinx.domains.python.PyModulelevelsphinx.domains.std.StandardDomain._resolve_citation_xref()sphinx.domains.std.StandardDomain.note_citations()sphinx.domains.std.StandardDomain.note_citation_refs()sphinx.domains.std.StandardDomain.note_labels()sphinx.environment.NoUrisphinx.ext.apidoc.format_directive()sphinx.ext.apidoc.format_heading()sphinx.ext.apidoc.makename()sphinx.ext.autodoc.importer.MockFindersphinx.ext.autodoc.importer.MockLoadersphinx.ext.autodoc.importer.mock()sphinx.ext.autosummary.autolink_role()sphinx.ext.imgmath.DOC_BODYsphinx.ext.imgmath.DOC_BODY_PREVIEWsphinx.ext.imgmath.DOC_HEADsphinx.transforms.CitationReferencessphinx.transforms.SmartQuotesSkippersphinx.util.docfields.DocFieldTransformer.preprocess_fieldtypes()sphinx.util.node.find_source_node()sphinx.util.i18n.find_catalog()sphinx.util.i18n.find_catalog_files()sphinx.util.i18n.find_catalog_source_files()
有关更多详细信息,请参见 deprecation APIs list。
新增特性¶
新增帮助类
sphinx.transforms.post_transforms.SphinxPostTransform新增帮助方法
PythonDomain.note_module()PythonDomain.note_object()SphinxDirective.set_source_info()
#6180: Support
--keep-goingwithBuildDocsetup commandmath指令现支持:class:选项Todo:
todo指令现在支持:name:选项启用重写,详见
SPHINXOPTS环境和SPHINXBUILDMakefile 变量 (参考: #6232, #6303)#6287:autodoc:无法记录作为模块函数导出的绑定实例方法
#6289:autodoc:
autodoc_default_options现在支持imported-members选项#4777:autodoc:支持协程
#744:autodoc:支持抽象方法
#6325:autodoc:__slots__中的支持属性。 对于 dict 样式__slots __,autodoc 会将值视为属性的文档字符串
#6361:autodoc:添加
autodoc_typehints禁止来自签名的键入提示#1063:autodoc:
automodule指令现在可以处理未记录的模块级变量#6212: autosummary: Add
autosummary_imported_membersto display imported members on autosummary#6271:如果构建到 '.',
make clean将严重损坏。#6363:在 make.bat 中支持
%O%环境变量#4777:py域:向
py:function指令添加:async:选项Py 域:向
py:method指令添加新选项:abstractmethod::async::classmethod::property::staticmethod:
rst domain: Add
rst:directive:optiondirective to describe the option for directive#6306: html: Add a label to search form for accessibility purposes
#4390:html:签名的一致和语义 CSS
#6358:
production节点的rawsource属性现在包含完整的生产规则#6373:autosectionlabel:允许禁用警告
coverage:支持
coverage_ignore_pyobjects新选项#6239:latex:支持构建中文文档
Bug 修复¶
#6230:如果术语由非 ASCII 字符组成,则词汇表指令已生成不合适的node_id
#6213:ifconfig:标题后的内容未显示
在词汇表指令评论术语误识
#6299:rst域:rst:指示性指令造成空间浪费
#6379:py域:模块索引(py-modindex.html)具有重复的标题
#6331:man:doctest 遵循规则时输出无效
#6351:在被引用时也显示“未引用超链接目标”消息
#6165: autodoc:
tab_widthsetting of Docutils has been ignored#6347:autodoc:在 Python 3.6 和3.5上与普通元组一起崩溃
#6311::autosummary:复杂的类型提示混淆了 autosummary 表
#6350:autosummary:某种默认值的参数混淆了autosummary
生成的 Makefile 缺少最终 EOL(参考:#6232)
#6375:extlinks:无法逃脱链接标题中的尖括号
#6378:linkcheck:使用 User-Agent 作为常见发送方式
#6387:html 搜索:未能使用 haiku 搜索文档或滚动主题
#6408:html 搜索:修复搜索结果的排名
#6406: "SOURCE_DATE_EPOCH" 返回l 错误的年份
#6402:图像指令因未知图像格式而崩溃
#6286:C ++,允许在十六进制整数文字中使用8和9。
#6305:在快速入门中为解析器的 "path" 参数修复字符串
LaTeX:警告的数字产生了错误(参考:#6364)