[issue40956] Use Argument Clinic in sqlite3

Erlend Egeberg Aasland report at bugs.python.org
Wed Jan 13 05:32:24 EST 2021


Erlend Egeberg Aasland <erlend.aasland at innova.no> added the comment:

GH-24007 introduced a regression:

>>> import sqlite3
>>> help(sqlite3)
Traceback (most recent call last):
  File "Lib/inspect.py", line 2049, in wrap_value
    value = eval(s, module_dict)
  File "<string>", line 1, in <module>
NameError: name 'cursor' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "Lib/inspect.py", line 2052, in wrap_value
    value = eval(s, sys_module_dict)
  File "<string>", line 1, in <module>
NameError: name 'cursor' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "Lib/_sitebuiltins.py", line 103, in __call__
    return pydoc.help(*args, **kwds)
  File "Lib/pydoc.py", line 2000, in __call__
    self.help(request)
  File "Lib/pydoc.py", line 2059, in help
    else: doc(request, 'Help on %s:', output=self._output)
  File "Lib/pydoc.py", line 1779, in doc
    pager(render_doc(thing, title, forceload))
  File "Lib/pydoc.py", line 1772, in render_doc
    return title % desc + '\n\n' + renderer.document(object, name)
  File "Lib/pydoc.py", line 472, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "Lib/pydoc.py", line 1267, in docmodule
    contents.append(self.document(value, key, name))
  File "Lib/pydoc.py", line 473, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "Lib/pydoc.py", line 1433, in docclass
    attrs = spill("Methods %s:\n" % tag, attrs,
  File "Lib/pydoc.py", line 1382, in spill
    push(self.document(value,
  File "Lib/pydoc.py", line 474, in document
    if inspect.isroutine(object): return self.docroutine(*args)
  File "Lib/pydoc.py", line 1492, in docroutine
    signature = inspect.signature(object)
  File "Lib/inspect.py", line 3129, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
  File "Lib/inspect.py", line 2877, in from_callable
    return _signature_from_callable(obj, sigcls=cls,
  File "Lib/inspect.py", line 2351, in _signature_from_callable
    return _signature_from_builtin(sigcls, obj,
  File "Lib/inspect.py", line 2164, in _signature_from_builtin
    return _signature_fromstr(cls, func, s, skip_bound_arg)
  File "Lib/inspect.py", line 2102, in _signature_fromstr
    p(name, default)
  File "Lib/inspect.py", line 2084, in p
    default_node = RewriteSymbolics().visit(default_node)
  File "Lib/ast.py", line 410, in visit
    return visitor(node)
  File "Lib/inspect.py", line 2071, in visit_Attribute
    return wrap_value(value)
  File "Lib/inspect.py", line 2054, in wrap_value
    raise RuntimeError()
RuntimeError

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40956>
_______________________________________


More information about the Python-bugs-list mailing list