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.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()
有关更多详细信息,请参见 废弃的API列表 .
添加的功能¶
添加一个辅助类
sphinx.transforms.post_transforms.SphinxPostTransform添加辅助方法
PythonDomain.note_module()PythonDomain.note_object()SphinxDirective.set_source_info()
#6180: 在
BuildDoc设置命令中支持--keep-goingmathdirective now supports:class:optiontodo:
todo指令现在支持:name:选项通过环境启用对
SPHINXOPTS和SPHINXBUILDMakefile变量的覆盖(参考:#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)