Sphinx 2.1¶
发布版本 2.1.2(发布于 2019 年 6 月 19 日)¶
修复的错误¶
#6497: 自定义词法分析器在语法错误时无法高亮显示
#6478, #6488:信息字段列表识别不正确
发布 2.1.1(发布日期:2019年6月10日)¶
不兼容更改¶
#6447: autodoc: 停止为未文档化的模块变量生成文档
修复的错误¶
#6442: LaTeX:
note
类型的警告可能与紧接前面的节标题因分页而分开#6448: autodoc: 自动文档生成时出现错误,当类的
__slots__ = None
时#6451: autodoc: 为 “可选导入” 的模块生成功能文档作为变量
#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.Acks
sphinx.directives.Author
sphinx.directives.Centered
sphinx.directives.Class
sphinx.directives.CodeBlock
sphinx.directives.Figure
sphinx.directives.HList
sphinx.directives.Highlight
sphinx.directives.Include
sphinx.directives.Index
sphinx.directives.LiteralInclude
sphinx.directives.Meta
sphinx.directives.Only
sphinx.directives.SeeAlso
sphinx.directives.TabularColumns
sphinx.directives.TocTree
sphinx.directives.VersionChange
sphinx.domains.python.PyClassmember
sphinx.domains.python.PyModulelevel
sphinx.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.NoUri
sphinx.ext.apidoc.format_directive()
sphinx.ext.apidoc.format_heading()
sphinx.ext.apidoc.makename()
sphinx.ext.autodoc.importer.MockFinder
sphinx.ext.autodoc.importer.MockLoader
sphinx.ext.autodoc.importer.mock()
sphinx.ext.autosummary.autolink_role()
sphinx.ext.imgmath.DOC_BODY
sphinx.ext.imgmath.DOC_BODY_PREVIEW
sphinx.ext.imgmath.DOC_HEAD
sphinx.transforms.CitationReferences
sphinx.transforms.SmartQuotesSkipper
sphinx.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()
有关更多详细信息,请参见 废弃的API列表 .
添加的功能¶
添加一个辅助类
sphinx.transforms.post_transforms.SphinxPostTransform
添加辅助方法
PythonDomain.note_module()
PythonDomain.note_object()
SphinxDirective.set_source_info()
#6180: 在
BuildDoc
设置命令中支持--keep-going
math
directive now supports:class:
optiontodo:
todo
指令现在支持:name:
选项通过环境启用对
SPHINXOPTS
和SPHINXBUILD
Makefile变量的覆盖(参考:#6232,#6303)#6287: autodoc: 无法记录作为模块函数导出的绑定实例方法
#6289: autodoc:
autodoc_default_options
现在支持imported-members
选项#4777: autodoc: 支持协程
#744: autodoc: 支持抽象方法
#6325: autodoc: 支持 __slots__ 中的属性.对于字典样式的 __slots__,autodoc 将值视为属性的文档字符串
#6361: autodoc: 添加
autodoc_typehints
以抑制签名中的类型提示#1063: autodoc:
automodule
指令现在可以处理未文档化的模块级变量#6212: autosummary: 添加
autosummary_imported_members
以在autosummary中显示导入的成员#6271:
make clean
如果构建到 ‘.’ 会严重损坏#6363: 支持在make.bat中使用
%O%
环境变量#4777: py 域:向
py:function
指令添加:async:
选项py 域:向
py:method
指令添加新选项:abstractmethod:
:async:
:classmethod:
:property:
:staticmethod:
rst领域:添加:rst:dir:rst:directive:option 指令以描述指令的选项
#6306: html: 为搜索表单添加标签以提高无障碍性
#4390: html: 一致且语义化的签名CSS
#6358:
production
节点的rawsource
属性现在包含完整的产生式规则#6373: autosectionlabel: 允许抑制警告
coverage: 支持一个新的
coverage_ignore_pyobjects
选项#6239: latex: 支持构建中文文档
修复的错误¶
#6230: 如果术语包含非ASCII字符,词汇指令生成了不适当的node_id
#6213: ifconfig:标题后面的内容未显示
在词汇表指令中注释的术语被错误识别
#6299: rst领域: rst:指令 指令产生多余的空间
#6379: py 域: 模块索引 (py-modindex.html) 存在重复标题
#6331: man: doctest跟在rubric后时输出无效
#6351: 即使有引用,仍显示 “超链接目标未被引用” 消息
#6165: autodoc: Docutils 的
tab_width
设置已被忽略#6347: autodoc: 在Python 3.6和3.5上,使用普通元组时崩溃
#6311: autosummary: autosummary 表格被复杂的类型提示所困扰
#6350: autosummary: 被具有某种默认值的参数困扰
生成的Makefile缺少最终行结束符(参考:#6232)
#6375: extlinks: 无法在链接标题中转义尖括号
#6378: linkcheck: 发送常用的 User-Agent
#6387: html 搜索:使用 haiku 和 scrolls 主题时无法搜索文档
#6408: html搜索:修复搜索结果的排名
#6406: 对于
SOURCE_DATE_EPOCH
返回错误的年份#6402: 图像指令因未知图像格式崩溃
#6286: C++,允许在十六进制整数字面量中使用8和9.
#6305: 修复解析器的’path’参数的快速入门中的字符串
LaTeX:在警告中的图形产生错误(参考:#6364)