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

Python3.11: invalid help query raises an ImportError #98374

Closed
Labels
3.11only security fixes3.12only security fixesstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@qexat

Description

@qexat

Bug report

Running this on Python 3.11 REPL:

>>>help("invalid query")

Raises the following error:

Traceback (most recent call last):  File "<stdin>", line 1, in <module>  File "<frozen _sitebuiltins>", line 103, in __call__  File "/usr/lib/python3.11/pydoc.py", line 2001, in __call__    self.help(request)  File "/usr/lib/python3.11/pydoc.py", line 2057, in help    elif request: doc(request, 'Help on %s:', output=self._output)    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/lib/python3.11/pydoc.py", line 1784, in doc    pager(render_doc(thing, title, forceload))          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/lib/python3.11/pydoc.py", line 1758, in render_doc    object, name = resolve(thing, forceload)                   ^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/lib/python3.11/pydoc.py", line 1744, in resolve    raise ImportError('''\ImportError: No Python documentation found for 'invalid query'.Use help() to get the interactive help utility.Use help(str) for help on the str class.

Python 3.10.8 (and most probably any 3.10.*) simply prints this:

No Python documentation found for 'invalid query'.Use help() to get the interactive help utility.Use help(str) for help on the str class.

Your environment

  • CPython versions tested on: 3.11.0, 3.10.8
  • Operating system and architecture: EndeavourOS, kernel: 6.0.1-arch2-1 (64-bit)

Apparently, this is due to commit8868d48712aee2b490efaf60bed8dfe9fb14d6b7 (thanks to@asottile for finding it).

Is it expected behavior though?

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.11only security fixes3.12only 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