Sphinx 3.0

3.0.4版(2020年5月27日发布)

Bug 修复

  • #7567:autodoc:对于泛型类型,参数化类型显示两次

  • #7637:autodoc:Python3.9中显示了系统定义的 TypeVars

  • #7696:html:出于安全原因,将 jQuery 版本从 3.4.1 更新到 3.5.1

  • #7611:启用 OpenSSL FIPS 时 md5 报错

  • #7626:发布了不含 CODE_OF_CONDUCT 的包

3.0.3版(2020年4月26日发布)

新增特性

  • C,使用静态、限定符和 VLA 规范解析数组声明符。

Bug 修复

  • #7516:autodoc:如果目标对象在访问其属性时引发错误则崩溃

3.0.2版(2020年4月19日发布)

新增特性

Bug 修复

  • #7461:py domain:类型批注中空元组的索引错误失败

  • #7510:py domain:keyword-only 参数被记录为默认值为空

  • #7418:std domain: term 与 case-insensitively 不匹配

  • #7461:autodoc:类型批注中的空元组未正确显示

  • #7479:autodoc:3.0.0 版本以来,Sphinx 构建速度较慢

  • C++,修正 east-onst 声明中的间距问题。

  • #7414:LaTeX:Xindy 语言选项有误

  • Sphinx crashes with ImportError on python3.5.1

3.0.1版(2020年4月11日发布)

不兼容的变更

  • #7418: std domain: term role becomes case sensitive

Bug 修复

  • #7428:py domain:引用 None 类引发警告

  • #7445:py domain:使用 interspinx 时,函数签名中的返回注释 “None” 不会转换为超链接

  • #7418:std domain:术语表术语的重复警告大小写不敏感

  • #7438:C++,修复在并行生成中合并重载函数的问题。

  • #7422:autodoc:使用 autodoc_mock_导入时失败,返回 ValueError

  • #7435: autodoc: autodoc_typehints='description' doesn't suppress typehints in signature for classes/methods

  • #7451:autodoc:当对象将非字符串对象作为“成员”返回时,出现 AttributeError 失败

  • #7423:向记录器提供非字符串对象时崩溃

  • #7479:html主题:不在 html 5 doctype 中包含 xmlns 属性

  • #7426:html主题:对 html 模板中的某些链接进行转义

3.0.0版(2020年4月6日发布)

依赖

3.0.0b1

  • LaTeX:删除对以下项的依赖项 extractbb,以便在日语文档中以 .xbb 形式包含图像: dvipdfmx,自TeXLive2015 起不再需要这些文件(参考文献:#6189)

  • babel-2.0 及以上版本可用(非稳定版)

不兼容的变更

3.0.0b1

  • 删除1.8.x中使用不佳的功能和API

  • #247:autosummary:默认情况下自动覆盖存根文件。详见 autosummary_generate_overwrite 以更改行为

  • #5923:autodoc:在给定了 :inherited-members::special-members: 时,默认情况下不记录 object 类的成员。

  • #6830:py domain: info-field-list中的 meta 字段变为保留字段。目前未显示在输出文档上

  • #6417:py 域:desc_parameterlist 的 doctree 已更改。参数名、注释和默认值用内嵌节点封装

  • 更改 sphinx.events.EventManager.listeners 的结构

  • 由于范围的变化: productionlist 的一些用法 token 必须修改为包含以前被忽略的作用域。

  • #6903:Python、reST 和标准域的内部数据结构已经改变。节点_id 被添加到对象和模块的索引中。现在,它们包含一对 docname 和 nodeu id,用于交叉引用。

  • #7276:C++ 域:无意行为将被移除,例如: say_hello_ links to .. cpp:function:: say_hello()

  • #7210:js domain:删除了非预期行为,例如 parseInt_ links to .. js:function:: parseInt

  • #7229:rst 域:删除了非预期行为,例如 numref_ links to .. rst:role:: numref

  • #6903:py 域:删除了无意行为,例如 say_hello_ links to .. py:function:: say_hello()

  • #7246:Py 域:删除异常、函数和方法的特殊交叉引用帮助程序

  • C 语言域已经被重写,并添加了额外的指令和角色。现有的规则现在更加严格,产生了新的警告。

  • desc_signature_line 节点中的属性 sphinx_cpp_tagname 已重命名为 sphinx_line_type

  • #6462: double backslashes in domain directives are no longer replaced by single backslashes as default. A new configuration value strip_signature_backslash can be used by users to re-enable it.

3.0.0 终版

  • #7222: sphinx.util.inspect.unwrap() is renamed to unwrap_all()

已弃用

3.0.0b1

  • desc_signature['first']

  • sphinx.directives.DescDirective

  • sphinx.domains.std.StandardDomain.add_object()

  • sphinx.domains.python.PyDecoratorMixin

  • sphinx.ext.autodoc.get_documenters()

  • sphinx.ext.autosummary.process_autosummary_toc()

  • sphinx.parsers.Parser.app

  • sphinx.testing.path.Path.text()

  • sphinx.testing.path.Path.bytes()

  • sphinx.util.inspect.getargspec()

  • sphinx.writers.latex.LaTeXWriter.format_docclass()

新增特性

3.0.0b1

  • #247:autosummary: 增加 autosummary_generate_overwrite 以重写旧的根文件

  • #5923: autodoc: :inherited-members: option takes a name of ancestor class not to document inherited members of the class and uppers

  • #6830:autodoc:如果文档字符串在info-field-list中包含“:meta private:”,则将其视为私有成员

  • #7165:autodoc:支持带注释的类型(PEP-593)

  • #2815:autodoc:支持 singledispatch 函数和方法

  • #7079:autodoc: autodoc_typehints 接受“描述”配置。 它显示类型提示作为对象描述

  • #7314:apidoc:通过软件包文档传播 --maxdepth 选项

  • #6558:词汇表:发出重复的词汇表条目警告

  • #3106:域:自动为索引页面注册超链接目标

  • #6558:std域:对重复的通用对象发出警告

  • #6830:py domain:添加新事件: object-description-transform

  • #6895:Py 域:不要针对内置类型发出挑剔的警告

  • Py 域:在函数签名中支持lambda函数

  • #6417:Py 域:允许为函数和方法的参数制作样式

  • #7238,#7239:py 域:如果已添加相同名称的条目,则在描述python对象时发出警告

  • #7341: py domain: type annotations in signature are converted to cross refs

  • 事件处理程序的支持优先级。更多信息详见 Sphinx.connect()

  • #3077:按照文档 productionlist 中的指示,对范围进行界定。

  • #1027: 支持 productionlist 中连续出现多个反斜线

  • #7108:配置:允许通过 ConfigError 显示来自 conf.py 的错误消息

  • #7032:html:html_scaled_image_link 对于具有 no-scaled-link 类的图像将被禁用

  • #7144:为每个 desc 点添加指示其域的 CSS 类

  • #7211:latex:使用 Xeletex 时,请使用 babel 生成中文文档

  • #6672:LaTeX:支持 LaTeX 主题功能(实验中)

  • #7005:LaTeX:为 kbd 添加 LaTeX 样式

  • #7220:genindex:首位展示"main"索引项

  • #7103:linkcheck:写 output.json 的所有链接

  • #7025:html搜索:可以使用 :nosearch: 文件范围的元数据”为单个文档禁用全文搜索

  • #7293:html 搜索:允许重写 JavaScript 拆分器,详见 SearchLanguage.js_splitter_code

  • #7142:html主题:添加一个主题选项:pygments_dark_style 以暗模式切换代码块的样式

  • C 域已重写,添加了例如:

    • 交叉索引遵循当前范围。

    • 可以记录匿名实体。

    • More specific directives and roles for each type of entity, e.g., handling scoping of enumerators.

    • 新角色 c:expr 用于在文本中呈现表达式和类型。

  • 新增 SphinxDirective.get_source_info()SphinxRole.get_source_info()

  • #7324:Sphinx 内部版本:如果找到同一文档具有不同文件扩展名的多个文件,则发出警告

3.0.0 终版

  • 新增 ObjectDescription.transform_content()

Bug 修复

3.0.0b1

  • C++,修复涉及某些函数重载的情况下得交叉引用查找。

  • #5078:C++,修复指令包含多个声明时的交叉引用查找。

  • C++ 中,在签名中自动生成交叉引用的直接依赖类型名的警告。

  • #5637:autodoc:对 show 继承的嵌套类名的处理不正确

  • #7267:autodoc:无效指令选项的错误消息具有错误的位置

  • #7329:autodoc:info 字段列表错误地从类型提示生成到类描述中,即使设置了` autoclass_content='class'

  • #7331:autodoc:cython 函数未被识别为函数

  • #5637:inheritance_diagram:嵌套类名的处理错误

  • #7139: code-block:: guess 未起作用

  • #7325:html:source_suffix 链接到了错误的链接

  • #7357:html:调整 SVG 图像大小失败,返回 ValueError

  • #7278: html search: 修复搜索结果中的 html_file_suffix 而非 html_link_suffix

  • #7297: html theme: bizstyle 并不支持 sidebarwidth

  • #3842:singlehtml:主控文档不在源根目录中时图像断开的路径

  • #7179:std域:引用 GenericObject 时不显示修复空白

  • #7289: consol:使用亮色而非醒目色

  • #1539:C,解析数组类型。

  • #2377:C,即使在复杂类型中也要解析函数指针。

  • #7345:sphinx内部版本:如果输出目录作为文件存在,Sphinx 将崩溃

  • #7290: sphinx-build: 处理意外时忽略 bdb.BdbQuit

  • #6240: napoleon: Attributes 和 Methods 部分 忽视 :noindex: 选项

3.0.0 终版

  • #7364: autosummary: crashed when autosummary_generate is False

  • #7370: autosummary: 当所给模块未知时,引发 UnboundLocalError

  • 7367:C++,支持交替运算符拼写。

  • C 语言现在支持替换运算符拼写。

  • 7368:C++语言中的逗号运算符、模板参数列表中的包展开以及一些情况下更全面的错误消息。

  • C、C++语言,修复与ANON符号相关的崩溃和错误重复警告。

  • #6477:Escape first "!" 在交叉引用中不可用

  • #7219: Py 域:py:function 指令生成的索引项与具有 index 类型的 index 指令不同

  • #7301:节点标识不允许使用大写字符

  • #7301:epub:生成重复的节点标识

  • #6564:html:在 html 生成器上忽略了表的宽度

  • #7401:为 env-get-outdated 处理程序传递了不正确的参数

  • #7355: autodoc: cython 函数的签名识别不好

  • #7222: autodoc: __wrapped__ 功能记录错误

  • #7409: intersphinx: 当一个扩展设置 intersphinx_mappingconfig-inited 上,ValueError 被触发

  • #7343:Sphinx 构建自调试模式下的2.4.0以来较为缓慢