← 返回首页
Regression in help(sqlite3) between Python 3.10.8 and Python 3.11.0 · Issue #99003 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Regression in help(sqlite3) between Python 3.10.8 and Python 3.11.0 #99003

New issue
New issue

Description

Bug report

When running the Python interactive interpreter as follows

$ ./python3 Python 3.10.8 (tags/v3.10.8:aaaf517424, Nov 2 2022, 07:29:14) [GCC 12.1.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> help(sqlite3)

Python 3.10.8 displays the help for sqlite3, but 3.11.0 gives a trackback

$ ./python3 Python 3.11.0 (main, Nov 2 2022, 07:13:10) [GCC 12.1.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> help(sqlite3) Traceback (most recent call last): File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 2219, in wrap_value value = eval(s, module_dict) ^^^^^^^^^^^^^^^^^^^^ File "<string>", line 1, in <module> NameError: name 'ConnectionType' is not defined. Did you mean: 'Connection'? During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 2222, in wrap_value value = eval(s, sys_module_dict) ^^^^^^^^^^^^^^^^^^^^^^^^ File "<string>", line 1, in <module> NameError: name 'ConnectionType' is not defined. Did you mean: 'ConnectionError'? During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<frozen _sitebuiltins>", line 103, in __call__ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/pydoc.py", line 2001, in __call__ self.help(request) File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/pydoc.py", line 2060, in help else: doc(request, 'Help on %s:', output=self._output) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/pydoc.py", line 1784, in doc pager(render_doc(thing, title, forceload)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/pydoc.py", line 1778, in render_doc return title % desc + '\n\n' + renderer.document(object, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/pydoc.py", line 479, in document if inspect.ismodule(object): return self.docmodule(*args) ^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/pydoc.py", line 1275, in docmodule contents.append(self.document(value, key, name)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/pydoc.py", line 481, in document if inspect.isroutine(object): return self.docroutine(*args) ^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/pydoc.py", line 1494, in docroutine signature = inspect.signature(object) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 3272, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 3020, in from_callable return _signature_from_callable(obj, sigcls=cls, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 2512, in _signature_from_callable return _signature_from_builtin(sigcls, obj, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 2324, in _signature_from_builtin return _signature_fromstr(cls, func, s, skip_bound_arg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 2272, in _signature_fromstr p(name, default) File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 2254, in p default_node = RewriteSymbolics().visit(default_node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/ast.py", line 410, in visit return visitor(node) ^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 2246, in visit_Name return wrap_value(node.id) ^^^^^^^^^^^^^^^^^^^ File "/home/LOCAL/tjk/python-3.11.0/lib/python3.11/inspect.py", line 2224, in wrap_value raise RuntimeError() RuntimeError

Your environment

  • CPython versions tested on: 3.10.8 and 3.11.0
  • Operating system and architecture: CentOS 7, x86_64

Built with GCC 12.1.0 and sqlite3 3.37.2

Metadata

Metadata

Labels

3.11only security fixes3.12only security fixestopic-sqlite3type-bugAn unexpected behavior, bug, or error

Fields

No fields configured for issues without a type.

Projects

Status
Discarded

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

  • Open in GitHub Copilot app

Footer

© 2026 GitHub, Inc.