Sphinx 3.4

发行版 3.4.3(发布于 2021年1月8日)

修复的 bug

  • #8655: autodoc: 如果目标模块包含在 hasattr() 上引发异常的对象,则无法生成文档

Release 3.4.2(发布于2021年1月4日)

修复的 bug

  • #8164: autodoc: 继承被模拟类的类未被文档化

  • #8602: autodoc:autodoc-process-docstring 事件意外地被发射到非数据描述符上

  • #8616: autodoc: 当传入非类对象给autoclass指令时引发AttributeError

发布 3.4.1(发布于2020年12月25日)

修复的 bug

  • #8559: autodoc: 使用前向引用类型注解时引发AttributeError

  • #8568: autodoc: 检查槽属性时引发TypeError

  • #8567: autodoc: 实例属性错误地被添加到父类

  • #8566: autodoc:autodoc-process-docstring 事件意外地被发射到别名类

  • #8583: autodoc: 通过 __eq__ 方法进行不必要的对象比较

  • #8565: linkcheck: 修复PriorityQueue崩溃问题,当链接元组不可比较时

发布版本 3.4.0(发布于 2020 年 12 月 20 日)

不兼容的更改

  • #8105: autodoc: 装饰类的构造函数签名将被显示,而不是装饰器的签名

已弃用

  • The follow_wrapped argument of sphinx.util.inspect.signature()

  • The no_docstring argument of sphinx.ext.autodoc.Documenter.add_content()

  • sphinx.ext.autodoc.Documenter.get_object_members()

  • sphinx.ext.autodoc.DataDeclarationDocumenter

  • sphinx.ext.autodoc.GenericAliasDocumenter

  • sphinx.ext.autodoc.InstanceAttributeDocumenter

  • sphinx.ext.autodoc.SlotsAttributeDocumenter

  • sphinx.ext.autodoc.TypeVarDocumenter

  • sphinx.ext.autodoc.importer._getannotations()

  • sphinx.ext.autodoc.importer._getmro()

  • sphinx.pycode.ModuleAnalyzer.parse()

  • sphinx.util.osutil.movefile()

  • sphinx.util.requests.is_ssl_error()

新增功能

  • #8119: autodoc: 允许通过 autodoc-skip-member 事件确定模块中未包含在 __all__ 属性中的成员是否应被文档化

  • #8219: autodoc: 当超类是通用类且给出了显示继承选项时,通用类的参数不会显示(在 Python 3.7 或更高版本中)

  • autodoc: 添加 Documenter.config 作为访问配置对象的快捷方式

  • autodoc: 如果默认值等于 None ,则在函数和方法的注释中添加 Optional[t] .

  • #8209: autodoc: 在:rst:dir:autoattribute 和:rst:dir:autodata 指令中添加 :no-value: 选项,以抑制变量的默认值

  • #8460: autodoc: 支持由 typing.NewType 定义的自定义类型

  • #8285: napoleon: 添加 napoleon_attr_annotations 以在文档字符串中如果指定了类型,自动合并源代码上的类型提示

  • #8236: napoleon: 支持numpydoc的 “接收” 部分

  • #6914: 添加一个新事件 warn-missing-reference 用于当无法解析交叉引用时自定义警告信息

  • #6914: 当无法解析 :ref: 引用时发出详细警告

  • #6629: linkcheck: 该构建器现在处理速率限制.详情请参见 linkcheck_rate_limit_timeout .

修复的 bug

  • #7613: autodoc: autodoc不尊重类的__signature__

  • #4606: autodoc: 继承方法的警告位置不正确

  • #8105:autodoc:如果类被装饰,类构造函数的签名不正确

  • #8434: autodoc: autodoc_type_aliases 对变量和属性没有影响

  • #8443: autodoc: autodata 指令无法为基于 PEP-526 的类型注解变量创建文档

  • #8443: autodoc: autoattribute 指令无法为基于 PEP-526 的未初始化变量创建文档

  • #8480: autodoc: autoattribute 无法为 __slots__ 属性创建文档

  • #8503: autodoc: autoattribute 无法正确为 GenericAlias 创建类属性的文档

  • #8534: autodoc: autoattribute无法为别名类中的注释属性创建文档

  • #8452: autodoc: autodoc_type_aliases 在 autodoc_typehints 设置为 “description” 时不起作用

  • #8541: autodoc: autodoc_type_aliases 不适用于实例属性的类型注解

  • #8460: autodoc: autodata 和 autoattribute 指令不显示 TypeVars 的类型信息

  • #8493: autodoc: 对类别名的内置引用不起作用

  • #8522: autodoc:__bool__ 方法可能被调用

  • #8067: autodoc: 具有类型注释的超类实例变量的类型提示未显示

  • #8545: autodoc: __slots__ 属性即使有文档字符串也未被记录

  • #741:autodoc:inherited-members 对超类的实例属性无效

  • #8477: autosummary: 当模板包含多字节字符时生成非utf-8的reST文件

  • #8501: autosummary: 概要提取在 “el at.” 之后意外拆分文本

  • #8524: html: 在名为 “index” 的文档上生成了错误的 url_root

  • #8419:HTML搜索:在非搜索页面中不加载 language_data.js

  • #8549: i18n:-D gettext_compact=0 不再起作用

  • #8454: graphviz: 图形和有向图指令的布局选项无效

  • #8131: linkcheck: 在HEAD请求导致重定向过多时使用GET,以适应HEAD上的无限重定向循环

  • #8437: Makefile:make clean 在空BUILDDIR中是危险的

  • #8365: py 域::type::rtype: 产生错误的模糊类查找警告

  • #8352: std 域:解析以括号开头的选项失败

  • #8519: LaTeX: 防止在seealso中间分页

  • #8520: C,修复AliasNode的复制.