[issue34871] test_site fails if run after test_inspect

Chih-Hsuan Yen report at bugs.python.org
Tue Oct 2 12:05:35 EDT 2018


Chih-Hsuan Yen <yan12125 at gmail.com> added the comment:

Thanks very much for the test.bisect hint! After some more trials, I guess it's an issue in the `inspect` module rather than the newly-added test in test_site. Here's an example script:


import inspect
import sys
import _testcapi

builtin = _testcapi.docstring_with_signature_with_defaults
spec = inspect.getfullargspec(builtin)
print(type(sys.modules['__builtins__']))


After inspect.getfullargspec(), sys.modules['__builtins__'] is a dict. That's a little bit strange as every other item in sys.modules is a module.

----------

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


More information about the Python-bugs-list mailing list