Author erlendaasland
Recipients berker.peksag, corona10, erlendaasland, serhiy.storchaka, vstinner
Date 2021-01-13.10:32:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610533944.59.0.930331131769.issue40956@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-01-13 10:32:24erlendaaslandsetrecipients: + erlendaasland, vstinner, berker.peksag, serhiy.storchaka, corona10
2021-01-13 10:32:24erlendaaslandsetmessageid: <1610533944.59.0.930331131769.issue40956@roundup.psfhosted.org>
2021-01-13 10:32:24erlendaaslandlinkissue40956 messages
2021-01-13 10:32:24erlendaaslandcreate