[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

Komiya Takeshi report at bugs.python.org
Wed Feb 3 10:07:05 EST 2021


Komiya Takeshi <i.tkomiya at gmail.com> added the comment:

FWIW, I succeeded to inspect the class with importing the constant from the base module as a workaround:

```
import inspect
import io

from io import DEFAULT_BUFFER_SIZE


class MyBufferedReader(io.BufferedReader):
    """buffer reader class."""


inspect.signature(MyBufferedReader)
```

----------

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


More information about the Python-bugs-list mailing list