Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The docstring ofenum.Enum is invalid in reStructuredText since 3.11 #92120

Closed
Assignees
ethanfurman
Labels
3.11only security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@tk0miya

Description

@tk0miya

Bug report

The docstring ofenum.Enum is invalid in reStructuredText since 3.11.

$ python3.11                                                                                                ~/work/tmp/docPython 3.11.0a7+ (heads/main:ad5e852, May  2 2022, 01:40:38) [Clang 11.0.3 (clang-1103.0.32.62)] on darwinType "help", "copyright", "credits" or "license" for more information.>>> import enum>>> print(enum.Enum.__doc__)(snip)    - attribute access::    >>> Color.RED    <Color.RED: 1>(snip)>>>

The "attribute access" line ends with a code-block marker "::". But no code-block follows.

As a result, Sphinx emits a warning for the subclasses of Enum as following:

/Users/tkomiya/work/tmp/doc/example.py:docstring of example.Transpose:7: WARNING: Literal block expected; none found.

refs:sphinx-doc/sphinx#10410

Additionally, the bullet list is interrupted by code-blocks. IMO, these code-blocks should be indented to the item level of the bullet list.

Your environment

  • CPython versions tested on: Python 3.11.0a7+ (heads/main:ad5e852, May 2 2022, 01:40:38)
  • Operating system and architecture: macOS 10.15

Linked PRs

Metadata

Metadata

Assignees

Labels

3.11only security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp